2
* Copyright 2009 Alexandros Frantzis, Michael Iatrou
4
* This file is part of libbls.
6
* libbls is free software: you can redistribute it and/or modify it under the
7
* terms of the GNU Lesser General Public License as published by the Free Software
8
* Foundation, either version 3 of the License, or (at your option) any later
11
* libbls is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16
* You should have received a copy of the GNU General Public License along with
17
* libbls. If not, see <http://www.gnu.org/licenses/>.
21
* @file buffer_action_internal.h
23
* Buffer actions internal API
25
#ifndef _BUFFER_ACTION_INTERNAL_H
26
#define _BUFFER_ACTION_INTERNAL_H
28
#include "data_object.h"
29
#include "buffer_action.h"
36
* @addtogroup buffer_action
42
* Struct that holds the function pointers for an implementation of a
45
struct buffer_action_funcs {
46
int (*do_func)(buffer_action_t *action);
47
int (*undo_func)(buffer_action_t *action);
48
int (*private_copy_func)(buffer_action_t *action, data_object_t *obj);
49
int (*to_event_func)(buffer_action_t *action,
50
struct bless_buffer_event_info *event_info);
51
int (*free_func)(buffer_action_t *action);
55
* @name Internal functions
59
int buffer_action_create_impl(buffer_action_t **action, void *impl,
60
struct buffer_action_funcs *funcs);
62
void *buffer_action_get_impl(buffer_action_t *action);
72
#endif /* _BUFFER_ACTION_INTERNAL_H */