1CONFDB_INITIALIZE(3C)orosync Cluster Engine Programmer's ManuCaOlNFDB_INITIALIZE(3)
2
3
4

NAME

6       confdb_initialize - Create a new connection to the ConfDb service
7

SYNOPSIS

9       #include <corosync/confdb.h>
10
11       int   confdb_initialize(confdb_handle_t   *handle,   confdb_callbacks_t
12       *callbacks);
13

DESCRIPTION

15       The confdb_initialize function is used to initialize  a  connection  to
16       the configuration database API.
17
18       Each  application may have several connections to the CONFDB API.  Each
19       application uses the handle argument to uniquely identify  the  connec‐
20       tion.   The  handle  argument  is  then used in other function calls to
21       identify the connection to be used for communication  with  the  CONFDB
22       service.
23
24       Every  time  the  configuration  database  is  updated, the callback is
25       called.  The callback function is described by the following type defi‐
26       nitions:
27
28              typedef void (*confdb_change_notify_fn_t) (
29                  confdb_handle_t handle,
30                  unsigned int parent_object_handle,
31                  unsigned int object_handle,
32                  void *object_name,
33                  int  object_name_len,
34                  void *key_name,
35                  int key_name_len,
36                  void *key_value,
37                  int key_value_len);
38
39
40       The callbacks argument is of the type:
41
42              typedef struct {
43              confdb_change_notify_fn_t confdb_change_notify_fn;
44              } confdb_callbacks_t;
45
46       When  a  configuration  change  occurs, the callback is called from the
47       confdb_dispatch() function.
48

RETURN VALUE

50       This call returns the CONFDB_OK value if successful, otherwise an error
51       is returned.
52

BUGS

54       Callbacks are not support at the moment.
55

ERRORS

57       The errors are undocumented.
58

SEE ALSO

60       confdb_overview(8),  confdb_finalize(3),  confdb_fd_get(3), confdb_dis‐
61       patch(3),
62
63corosync Man Page                 2004-08-31              CONFDB_INITIALIZE(3)
Impressum