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

RETURN VALUE

58       Returns the previous callback pointer.
59
60

SEE ALSO

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

AUTHOR

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