Main Page | Modules | Data Structures | File List | Data Fields

kdbbackend.h

00001 /***************************************************************************
00002                 kdbbackend.h  -  Methods for backend programing
00003                              -------------------
00004     begin                : Mon Dec 25 2004
00005     copyright            : (C) 2004 by Avi Alkalay
00006     email                : avi@unix.sh
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the BSD License (revised).                      *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 
00017 /* Subversion stuff
00018 
00019 $Id: kdbbackend.h 549 2006-02-05 16:31:30Z ylecaillez $
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 /* Let the backend be aware of default implementations we provide */
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 /* KDBBACKEND_H */

Generated on Sun Feb 19 10:05:36 2006 for Elektra Project by  doxygen 1.3.9.1