Elektra: kdbprivate.h File Reference

Elektra 0.8.14

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

Macros | Enumerations
kdbprivate.h File Reference

Private declarations. More...

`#include <kdb.h>`
`#include <kdbtypes.h>`
`#include <kdbhelper.h>`
`#include <kdbconfig.h>`
`#include <kdbplugin.h>`
`#include <kdbproposal.h>`
`#include <kdbextension.h>`
`#include <limits.h>`

## Macros
#define | KEYSET_SIZE 16
| The minimal allocation size of a keyset inclusive NULL byte. More...
#define | NR_OF_PLUGINS 10
| How many plugins can exist in an backend. More...
#define | COMMIT_PLUGIN 7
| The index of the commit plugin.
#define | STORAGE_PLUGIN 5
| The index of the storage plugin.
#define | RESOLVER_PLUGIN 0
| The index of the resolver plugin.
#define | APPROXIMATE_NR_OF_BACKENDS 16
| Trie optimization.
#define | MAX_LEN_INT 31
| The maximum of how many characters an integer needs as decimal number. More...
#define | KDB_KEY_MOUNTPOINTS "system/elektra/mountpoints"
| Backend mounting information. More...
#define | test_bit(var, bit) ((var) & (bit))
| Test a bit. More...
#define | set_bit(var, bit) ((var) |= (bit))
| Set a bit. More...
#define | clear_bit(var, bit) ((var) &= ~(bit))
| Clear a bit. More...

## Enumerations
enum | keyflag_t { KEY_FLAG_SYNC =1, KEY_FLAG_RO_NAME =1<<1, KEY_FLAG_RO_VALUE =1<<2, KEY_FLAG_RO_META =1<<3 }
| Key Flags. More...
enum | ksflag_t { KS_FLAG_SYNC =1 }
| Ks Flags. More...
enum | splitflag_t { SPLIT_FLAG_SYNC =1, SPLIT_FLAG_CASCADING =1<<1 }

## Detailed Description

Private declarations.

Copyright
  BSD License (see doc/COPYING or http://www.libelektra.org)

## Macro Definition Documentation

#define clear_bit | ( |  | var,
|  |  | bit
| ) |  | ((var) &= ~(bit))

Clear a bit.

See also
  set_bit()

#define KDB_KEY_MOUNTPOINTS "system/elektra/mountpoints"

Backend mounting information.

This key directory tells you where each backend is mounted to which mountpoint.

#define KEYSET_SIZE 16

The minimal allocation size of a keyset inclusive NULL byte.

ksGetAlloc() will return one less because it says how much can actually be stored.

#define MAX_LEN_INT 31

The maximum of how many characters an integer needs as decimal number.

#define NR_OF_PLUGINS 10

How many plugins can exist in an backend.

#define set_bit | ( |  | var,
|  |  | bit
| ) |  | ((var) |= (bit))

Set a bit.

See also
  clear_bit()

#define test_bit | ( |  | var,
|  |  | bit
| ) |  | ((var) & (bit))

Test a bit.

See also
  set_bit(), clear_bit()

## Enumeration Type Documentation

enum keyflag_t

Key Flags.

Store a synchronizer state so that the Elektra knows if something has changed or not.

Enumerator
KEY_FLAG_SYNC | Key need sync. If name, value or metadata are changed this flag will be set, so that the backend will sync the key to database.
KEY_FLAG_RO_NAME | Read only flag for name. Key name is read only and not allowed to be changed. All attempts to change the name will lead to an error. Needed for meta keys and keys that are in a data structure that depends on name ordering.
KEY_FLAG_RO_VALUE | Read only flag for value. Key value is read only and not allowed to be changed. All attempts to change the value will lead to an error. Needed for meta keys
KEY_FLAG_RO_META | Read only flag for meta. Key meta is read only and not allowed to be changed. All attempts to change the value will lead to an error. Needed for meta keys.

enum ksflag_t

Ks Flags.

Store a synchronizer state so that the Elektra knows if something has changed or not.

Enumerator
KS_FLAG_SYNC | KeySet need sync. If keys were popped from the Keyset this flag will be set, so that the backend will sync the keys to database.

enum splitflag_t

Enumerator
SPLIT_FLAG_SYNC | KeySet in Split need sync. Is there any key in there which need to be synced? If keys were popped from the Keyset this flag will be set, so that the backend will sync the keys to database.
SPLIT_FLAG_CASCADING | Do we need relative checks? Is this a cascading backend?