cmap.c File Reference
`#include <config.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <pthread.h>`
`#include <sys/types.h>`
`#include <sys/uio.h>`
`#include <errno.h>`
`#include <corosync/corotypes.h>`
`#include <corosync/corodefs.h>`
`#include <corosync/hdb.h>`
`#include <qb/qbipcc.h>`
`#include <corosync/cmap.h>`
`#include <corosync/ipc_cmap.h>`
`#include "util.h"`
`#include <stdio.h>`
Include dependency graph for lib/cmap.c:

Go to the source code of this file.

## Data Structures

struct | cmap_inst
struct | cmap_track_inst

## Functions

| DECLARE_HDB_DATABASE (cmap_handle_t_db, cmap_inst_free)
| DECLARE_HDB_DATABASE (cmap_track_handle_t_db, NULL)
cs_error_t | cmap_initialize (cmap_handle_t *handle)
| Create a new cmap connection.
cs_error_t | cmap_initialize_map (cmap_handle_t *handle, cmap_map_t map)
| Create a new cmap connection on a specified map.
cs_error_t | cmap_finalize (cmap_handle_t handle)
| Close the cmap handle.
cs_error_t | cmap_fd_get (cmap_handle_t handle, int *fd)
| Get a file descriptor on which to poll.
cs_error_t | cmap_dispatch (cmap_handle_t handle, cs_dispatch_flags_t dispatch_types)
| Dispatch data from service.
cs_error_t | cmap_context_get (cmap_handle_t handle, const void **context)
| cmap_context_get
cs_error_t | cmap_context_set (cmap_handle_t handle, const void *context)
| cmap_context_set
cs_error_t | cmap_set (cmap_handle_t handle, const char *key_name, const void *value, size_t value_len, cmap_value_types_t type)
| Store value in cmap.
cs_error_t | cmap_set_int8 (cmap_handle_t handle, const char *key_name, int8_t value)
cs_error_t | cmap_set_uint8 (cmap_handle_t handle, const char *key_name, uint8_t value)
cs_error_t | cmap_set_int16 (cmap_handle_t handle, const char *key_name, int16_t value)
cs_error_t | cmap_set_uint16 (cmap_handle_t handle, const char *key_name, uint16_t value)
cs_error_t | cmap_set_int32 (cmap_handle_t handle, const char *key_name, int32_t value)
cs_error_t | cmap_set_uint32 (cmap_handle_t handle, const char *key_name, uint32_t value)
cs_error_t | cmap_set_int64 (cmap_handle_t handle, const char *key_name, int64_t value)
cs_error_t | cmap_set_uint64 (cmap_handle_t handle, const char *key_name, uint64_t value)
cs_error_t | cmap_set_float (cmap_handle_t handle, const char *key_name, float value)
cs_error_t | cmap_set_double (cmap_handle_t handle, const char *key_name, double value)
cs_error_t | cmap_set_string (cmap_handle_t handle, const char *key_name, const char *value)
cs_error_t | cmap_delete (cmap_handle_t handle, const char *key_name)
| Deletes key from cmap database.
cs_error_t | cmap_get (cmap_handle_t handle, const char *key_name, void *value, size_t *value_len, cmap_value_types_t *type)
| Retrieve value of key key_name and store it in user preallocated value pointer.
cs_error_t | cmap_get_int8 (cmap_handle_t handle, const char *key_name, int8_t *i8)
cs_error_t | cmap_get_uint8 (cmap_handle_t handle, const char *key_name, uint8_t *u8)
cs_error_t | cmap_get_int16 (cmap_handle_t handle, const char *key_name, int16_t *i16)
cs_error_t | cmap_get_uint16 (cmap_handle_t handle, const char *key_name, uint16_t *u16)
cs_error_t | cmap_get_int32 (cmap_handle_t handle, const char *key_name, int32_t *i32)
cs_error_t | cmap_get_uint32 (cmap_handle_t handle, const char *key_name, uint32_t *u32)
cs_error_t | cmap_get_int64 (cmap_handle_t handle, const char *key_name, int64_t *i64)
cs_error_t | cmap_get_uint64 (cmap_handle_t handle, const char *key_name, uint64_t *u64)
cs_error_t | cmap_get_float (cmap_handle_t handle, const char *key_name, float *flt)
cs_error_t | cmap_get_double (cmap_handle_t handle, const char *key_name, double *dbl)
cs_error_t | cmap_get_string (cmap_handle_t handle, const char *key_name, char **str)
| Shortcut for cmap_get for string type.
cs_error_t | cmap_inc (cmap_handle_t handle, const char *key_name)
| Increment value of key_name if it is [u]int* type.
cs_error_t | cmap_dec (cmap_handle_t handle, const char *key_name)
| Decrement value of key_name if it is [u]int* type.
cs_error_t | cmap_iter_init (cmap_handle_t handle, const char *prefix, cmap_iter_handle_t *cmap_iter_handle)
| Initialize iterator with given prefix.
cs_error_t | cmap_iter_next (cmap_handle_t handle, cmap_iter_handle_t iter_handle, char key_name[], size_t *value_len, cmap_value_types_t *type)
| Return next item in iterator iter.
cs_error_t | cmap_iter_finalize (cmap_handle_t handle, cmap_iter_handle_t iter_handle)
| Finalize iterator.
cs_error_t | cmap_track_add (cmap_handle_t handle, const char *key_name, int32_t track_type, cmap_notify_fn_t notify_fn, void *user_data, cmap_track_handle_t *cmap_track_handle)
| Add tracking function for given key_name.
cs_error_t | cmap_track_delete (cmap_handle_t handle, cmap_track_handle_t track_handle)
| Delete track created previously by cmap_track_add.

## Function Documentation

## DECLARE_HDB_DATABASE() [1/2]

DECLARE_HDB_DATABASE | ( | cmap_handle_t_db | ,
|  | cmap_inst_free |
| ) |  |

## DECLARE_HDB_DATABASE() [2/2]

DECLARE_HDB_DATABASE | ( | cmap_track_handle_t_db | ,
|  | NULL |
| ) |  |