1 | // =============================================================== // |
---|
2 | // // |
---|
3 | // File : gb_local.h // |
---|
4 | // Purpose : declarations needed to include local prototypes // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // =============================================================== // |
---|
10 | |
---|
11 | #ifndef GB_LOCAL_H |
---|
12 | #define GB_LOCAL_H |
---|
13 | |
---|
14 | #ifndef ARBDB_H |
---|
15 | #include <arbdb.h> |
---|
16 | #endif |
---|
17 | |
---|
18 | #define gb_assert(cond) arb_assert(cond) |
---|
19 | |
---|
20 | // ------------------ |
---|
21 | // constants |
---|
22 | |
---|
23 | #define GB_MAX_USERS 4 |
---|
24 | |
---|
25 | #define GBTUM_MAGIC_NUMBER 0x17488400 |
---|
26 | #define GBTUM_MAGIC_NUMBER_FILTER 0xffffff00 |
---|
27 | #define GBTUM_MAGIC_REVERSED 0x00844817 |
---|
28 | |
---|
29 | // --------------------- |
---|
30 | // simple types |
---|
31 | |
---|
32 | typedef short GB_MAIN_IDX; // random-index |
---|
33 | |
---|
34 | // ------------------------------ |
---|
35 | // forward declare types |
---|
36 | |
---|
37 | struct GBDATA; |
---|
38 | struct GBENTRY; |
---|
39 | struct GBCONTAINER; |
---|
40 | struct GB_MAIN_TYPE; |
---|
41 | |
---|
42 | struct gb_transaction_save; |
---|
43 | struct gb_header_list; |
---|
44 | struct gb_index_files; |
---|
45 | |
---|
46 | struct GB_DICTIONARY; |
---|
47 | struct gb_compress_list; |
---|
48 | struct gb_compress_tree; |
---|
49 | |
---|
50 | struct TypedDatabaseCallback; |
---|
51 | |
---|
52 | struct gb_map_header; |
---|
53 | |
---|
54 | struct gb_scandir; |
---|
55 | |
---|
56 | struct gbcmc_comm; |
---|
57 | |
---|
58 | // ------------------- |
---|
59 | // enum types |
---|
60 | |
---|
61 | enum gb_undo_commands { |
---|
62 | _GBCMC_UNDOCOM_REQUEST_NOUNDO_KILL, |
---|
63 | _GBCMC_UNDOCOM_REQUEST_NOUNDO, |
---|
64 | _GBCMC_UNDOCOM_REQUEST_UNDO, |
---|
65 | _GBCMC_UNDOCOM_INFO_UNDO, |
---|
66 | _GBCMC_UNDOCOM_INFO_REDO, |
---|
67 | _GBCMC_UNDOCOM_UNDO, |
---|
68 | _GBCMC_UNDOCOM_REDO, |
---|
69 | |
---|
70 | _GBCMC_UNDOCOM_SET_MEM = 10000 // Minimum |
---|
71 | }; |
---|
72 | |
---|
73 | enum GB_CHANGE { |
---|
74 | GB_UNCHANGED = 0, |
---|
75 | GB_SON_CHANGED = 2, |
---|
76 | GB_NORMAL_CHANGE = 4, |
---|
77 | GB_CREATED = 5, |
---|
78 | GB_DELETED = 6, |
---|
79 | GB_DELETED_IN_MASTER = 7 |
---|
80 | }; |
---|
81 | |
---|
82 | enum GB_COMPRESSION_TYPES { |
---|
83 | GB_COMPRESSION_NONE = 0, |
---|
84 | GB_COMPRESSION_RUNLENGTH = 1, |
---|
85 | GB_COMPRESSION_HUFFMANN = 2, |
---|
86 | GB_COMPRESSION_DICTIONARY = 4, |
---|
87 | GB_COMPRESSION_SEQUENCE = 8, |
---|
88 | GB_COMPRESSION_SORTBYTES = 16, |
---|
89 | GB_COMPRESSION_BITS = 32, |
---|
90 | GB_COMPRESSION_LAST = 128 |
---|
91 | }; |
---|
92 | |
---|
93 | enum GBCM_ServerResult { |
---|
94 | GBCM_SERVER_OK = 0, |
---|
95 | GBCM_SERVER_FAULT = 1, |
---|
96 | GBCM_SERVER_ABORTED = 2, |
---|
97 | GBCM_SERVER_OK_WAIT = 3, |
---|
98 | }; |
---|
99 | |
---|
100 | // ------------------------------------------------------ |
---|
101 | // include generated local prototypes and macros |
---|
102 | |
---|
103 | #ifndef GB_PROT_H |
---|
104 | #include "gb_prot.h" |
---|
105 | #endif |
---|
106 | |
---|
107 | |
---|
108 | #else |
---|
109 | #error gb_local.h included twice |
---|
110 | #endif // GB_LOCAL_H |
---|