~libbls/libbls/libbls-package

« back to all changes in this revision

Viewing changes to src/buffer_action_internal.h

  • Committer: Alexandros Frantzis
  • Date: 2011-10-01 10:10:46 UTC
  • Revision ID: alf82@freemail.gr-20111001101046-etz52jurwzwc007x
Tags: upstream-0.3.2
ImportĀ upstreamĀ versionĀ 0.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2009 Alexandros Frantzis, Michael Iatrou
 
3
 *
 
4
 * This file is part of libbls.
 
5
 *
 
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
 
9
 * version.
 
10
 *
 
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
 
14
 * details.
 
15
 *
 
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/>.
 
18
 */
 
19
 
 
20
/**
 
21
 * @file buffer_action_internal.h
 
22
 *
 
23
 * Buffer actions internal API
 
24
 */
 
25
#ifndef _BUFFER_ACTION_INTERNAL_H
 
26
#define _BUFFER_ACTION_INTERNAL_H
 
27
 
 
28
#include "data_object.h"
 
29
#include "buffer_action.h"
 
30
 
 
31
#ifdef __cplusplus
 
32
extern "C" {
 
33
#endif
 
34
 
 
35
/**
 
36
 * @addtogroup buffer_action
 
37
 *
 
38
 * @{
 
39
 */
 
40
 
 
41
/** 
 
42
 * Struct that holds the function pointers for an implementation of a
 
43
 * buffer_action_t.
 
44
 */
 
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);
 
52
};
 
53
 
 
54
/**
 
55
 * @name Internal functions
 
56
 * 
 
57
 * @{
 
58
 */
 
59
int buffer_action_create_impl(buffer_action_t **action, void *impl,
 
60
                struct buffer_action_funcs *funcs);
 
61
 
 
62
void *buffer_action_get_impl(buffer_action_t *action);
 
63
 
 
64
/** @} */
 
65
 
 
66
/** @} */
 
67
 
 
68
#ifdef __cplusplus
 
69
}
 
70
#endif
 
71
 
 
72
#endif /* _BUFFER_ACTION_INTERNAL_H */