1QB_MAP_NOTIFY_ADD(3)       libqb Programmer's Manual      QB_MAP_NOTIFY_ADD(3)
2
3
4

NAME

6       qb_map_notify_add - Add a notifier to the map.
7
8

SYNOPSIS

10       #include <qb/qbmap.h>
11
12       int32_t qb_map_notify_add(
13           qb_map_t         *m,          /* the map instance */
14           /*
15            * the key (or prefix) to attach the notification to.
16            */
17           const char       *key,
18           qb_map_notify_fn  fn,         /* the callback */
19           int32_t           events,     /* the type of events to register for. */
20           void             *user_data   /* a pointer to be passed into the callback*/
21       );
22

PARAMS

24       m         the map instance
25
26       key       the key (or prefix) to attach the notification to.
27
28       fn        the callback
29
30       events    the type of events to register for.
31
32       user_data a pointer to be passed into the callback
33

DESCRIPTION

RETURN VALUE

36       0          success
37
38       -errno     failure
39

NOTE

41       you can use key prefixes with trie maps.
42

SEE ALSO

44       qb_trie_dump(3), qb_map_iter_create(3), qb_skiplist_create(3),
45       qb_map_notify_del(3), qb_map_put(3), qb_map_count_get(3),
46       qb_map_foreach(3), qb_map_pref_iter_create(3), qb_map_iter_next(3),
47       qb_map_get(3), qb_map_destroy(3), qb_hashtable_create(3),
48       qb_map_iter_free(3), qb_trie_create(3), qb_map_notify_del_2(3),
49       qb_map_rm(3)
50
52       Copyright (C) 2010-2020 Red Hat, Inc.
53
54
55
56LIBQB                             2023-07-21              QB_MAP_NOTIFY_ADD(3)
Impressum