00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _EYEDB_BASE_H
00026 #define _EYEDB_BASE_H
00027
00028 #include <eyedblib/machtypes.h>
00029 #include <eyedbsm/eyedbsm.h>
00030
00031 class rpcDB_LocalDBContext;
00032
00033 namespace eyedb {
00034
00040 class DbHandle;
00041 class ConnHandle;
00042
00043 typedef unsigned char *Data;
00044 typedef eyedblib::uint32 Size;
00045 typedef eyedblib::uint32 Type;
00046 typedef eyedblib::uint32 Offset;
00047 typedef void * Any;
00048 typedef eyedbsm::DatType DatType;
00049
00050 enum Bool {
00051 False = 0,
00052 True = 1
00053 };
00054
00055 enum {
00056 _DBRead = 0x2,
00057 _DBRW = 0x4,
00058 _DBSRead = 0x8,
00059
00060
00061 _DBAdmin = 0x10,
00062 _DBOpenLocal = 0x20
00063 };
00064
00065 struct DbCreateDescription {
00066 char dbfile[256];
00067 eyedbsm::DbCreateDescription sedbdesc;
00068 };
00069
00070 typedef DbCreateDescription DbInfoDescription;
00071
00072 enum LockMode {
00073 DefaultLock = eyedbsm::DefaultLock,
00074 LockN = eyedbsm::LockN,
00075 LockX = eyedbsm::LockX,
00076 LockSX = eyedbsm::LockSX,
00077 LockS = eyedbsm::LockS,
00078 LockP = eyedbsm::LockP
00079 };
00080
00081 enum TransactionMode {
00082 TransactionOff = eyedbsm::TransactionOff,
00083 TransactionOn = eyedbsm::TransactionOn
00084 };
00085
00086 enum MapHints {
00087 DefaultMap = 0,
00088 WholeMap = eyedbsm::WholeMap,
00089 SegmentMap = eyedbsm::SegmentMap
00090 };
00091
00092 struct OpenHints {
00093 MapHints maph;
00094 unsigned int mapwide;
00095 };
00096
00097
00098
00099 enum TransactionLockMode {
00100 ReadSWriteS = eyedbsm::ReadSWriteS,
00101 ReadSWriteSX = eyedbsm::ReadSWriteSX,
00102 ReadSWriteX = eyedbsm::ReadSWriteX,
00103 ReadSXWriteSX = eyedbsm::ReadSXWriteSX,
00104 ReadSXWriteX = eyedbsm::ReadSXWriteX,
00105 ReadXWriteX = eyedbsm::ReadXWriteX,
00106 ReadNWriteS = eyedbsm::ReadNWriteS,
00107 ReadNWriteSX = eyedbsm::ReadNWriteSX,
00108 ReadNWriteX = eyedbsm::ReadNWriteX,
00109 ReadNWriteN = eyedbsm::ReadNWriteN,
00110 DatabaseW = eyedbsm::DatabaseW,
00111 DatabaseRW = eyedbsm::DatabaseRW,
00112 DatabaseWtrans = eyedbsm::DatabaseWtrans
00113 };
00114
00115 enum RecoveryMode {
00116 RecoveryOff = eyedbsm::RecoveryOff,
00117 RecoveryPartial = eyedbsm::RecoveryPartial,
00118 RecoveryFull = eyedbsm::RecoveryFull
00119 };
00120
00121 extern const char NullString[];
00122 extern const char NilString[];
00123
00124 #define IDBBOOL(X) ((X) ? True : False)
00125
00130 }
00131
00132 #endif