1AUPARSE_ADD_CALLBACK(3)         Linux Audit API        AUPARSE_ADD_CALLBACK(3)
2
3
4

NAME

6       auparse_add_callback - add a callback handler for notifications
7

SYNOPSIS

9       #include <auparse.h>
10
11       void
12       auparse_add_callback(auparse_state_t *au, auparse_callback_ptr callback,
13                            void *user_data, user_destroy user_destroy_func);
14

DESCRIPTION

16       auparse_add_callback  adds a callback function to the parse state which
17       is invoked to notify the application of parsing events. This is part of
18       the event feed API.
19
20       The signature of the callback is:
21
22       void
23       auparse_callback(auparse_state_t *au, auparse_cb_event_t cb_event_type,
24                        void *user_data);
25
26       When the callback is invoked it is passed:
27
28
29       au
30               a pointer to the parse_state
31
32       cb_event_type
33              enumerated  value indicating the reason why the callback was in‐
34              voked
35
36       user_data
37              pointer to user supplied private data. May be NULL.
38
39       user_destroy_func
40              pointer to function called when user_data is destroyed.  May  be
41              NULL.  The signature is:
42
43              void destroy(void *user_data);
44
45              The  destroy()  function  should be prepared to accept user_data
46              possibly being NULL.
47
48       The cb_event_type argument indicates why the callback was invoked. It's
49       possible values are:
50
51       AUPARSE_CB_EVENT_READY
52              A  complete  event  has been parsed and is ready to be examined.
53              This is logically equivalent to the parse state immediately fol‐
54              lowing auparse_next_event()
55
56       See auparse_feed(3) for a complete code example.
57

RETURN VALUE

59       None.
60
61

SEE ALSO

63       auparse_feed(3), auparse_flush_feed(3).
64
65

AUTHOR

67       John Dennis
68
69
70
71Red Hat                            May 2007            AUPARSE_ADD_CALLBACK(3)
Impressum