00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDBBACKEND_H
00024 #define KDBBACKEND_H
00025
00026 #include <kdb.h>
00027 #include <kdbprivate.h>
00028
00029 #ifdef __STATIC
00030 #define KDBEXPORT(module) KDBBackend *libelektra_##module##_LTX_kdbBackendFactory(void)
00031 #else
00032 #define KDBEXPORT(module) KDBBackend *kdbBackendFactory(void)
00033 #endif
00034
00035 typedef struct _KDBBackend KDBBackend;
00036
00037
00043 enum KDBBackendMethod {
00044 KDB_BE_OPEN=1,
00045 KDB_BE_CLOSE=1<<1,
00046 KDB_BE_STATKEY=1<<2,
00047 KDB_BE_GETKEY=1<<3,
00048 KDB_BE_SETKEY=1<<4,
00049 KDB_BE_SETKEYS=1<<5,
00050 KDB_BE_RENAME=1<<6,
00051 KDB_BE_REMOVEKEY=1<<7,
00052 KDB_BE_GETCHILD=1<<8,
00053 KDB_BE_MONITORKEY=1<<9,
00054 KDB_BE_MONITORKEYS=1<<10,
00055 KDB_BE_END=0
00056 };
00057
00058
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif
00062
00063 KDBBackend *kdbBackendExport(const char *backendName, ...);
00064
00065 typedef KDBBackend *(*KDBBackendFactory)(void);
00066
00067
00068 int kdbSetKeys_default(KeySet *ks);
00069 uint32_t kdbMonitorKeys_default(KeySet *interests, uint32_t diffMask,
00070 unsigned long iterations, unsigned sleep);
00071 uint32_t kdbMonitorKey_default(Key *interest, uint32_t diffMask,
00072 unsigned long iterations, unsigned sleep);
00073
00074
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078
00079
00080
00081
00082
00083 #endif