#ifndef __ISD_HPP #define __ISD_HPP struct ISD; #define OD_ACCESS_READ 0x0000 #define OD_ACCESS_UPDATE 0x0001 #define OD_FAIL_IF_EXISTS 0x0000 #define OD_REPLACE_IF_EXISTS 0x0010 #define OD_OPEN_IF_EXISTS 0x0020 #define OD_FAIL_IF_NOT_EXISTS 0x0000 #define OD_CREATE_IF_NOT_EXISTS 0x0100 ISD *Open(const char *dbname, int flags, int blocksize ); int Close(ISD *isd); int CanFind(ISD *isd, const void *key, int keylen); int Read(ISD *isd, const void *key, int keylen, void *data, int datalen); int Write(ISD *isd, const void *key, int keylen, const void *data, int datalen, int replace); int Delete(ISD *isd, const void *key, int keylen); int Flush(ISD *isd); int FirstKey(ISD *isd, void *key, int *keylen); int NextKey(ISD *isd, const void *okey, int okeylen, void *nkey, int *nkeylen); #endif