ARB
gb_prot.h
Go to the documentation of this file.
1 /* Internal database interface.
2  *
3  * This file is generated by aisc_mkpt.
4  * Any changes you make here will be overwritten later!
5  */
6 
7 #ifndef GB_PROT_H
8 #define GB_PROT_H
9 
10 /* define ARB attributes: */
11 #ifndef ATTRIBUTES_H
12 # include <attributes.h>
13 #endif
14 
15 
16 /* ad_cb.cxx */
19 
20 /* ad_core.cxx */
21 void gb_touch_entry(GBDATA *gbd, GB_CHANGE val);
22 void gb_touch_header(GBCONTAINER *gbc);
24 void gb_untouch_me(GBENTRY *gbe);
26 void gb_create_header_array(GBCONTAINER *gbc, int size);
27 GBDATA *gb_make_pre_defined_entry(GBCONTAINER *father, GBDATA *gbd, long index_pos, GBQUARK keyq);
28 GBENTRY *gb_make_entry(GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq, GB_TYPES type);
30 GBCONTAINER *gb_make_container(GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq);
31 void gb_pre_delete_entry(GBDATA *gbd);
32 void gb_delete_entry(GBDATA*& gbd);
38 void gb_write_index_key(GBCONTAINER *father, long index, GBQUARK new_index);
39 void gb_create_key_array(GB_MAIN_TYPE *Main, int index);
40 long gb_create_key(GB_MAIN_TYPE *Main, const char *key, bool create_gb_key);
41 char *gb_abort_entry(GBDATA *gbd);
43 GB_ERROR gb_commit_transaction_local_rek(GBDATA*& gbd, long mode, int *pson_created) __ATTR__USERESULT;
44 
45 /* ad_load.cxx */
47 
48 /* ad_save_load.cxx */
49 char *gb_findExtension(char *path);
50 GB_CSTR gb_oldQuicksaveName(GB_CSTR path, int nr);
51 GB_CSTR gb_quicksaveName(GB_CSTR path, int nr);
53 long gb_ascii_2_bin(const char *source, GBENTRY *gbe);
54 long gb_read_bin_error(FILE *in, GBDATA *gbd, const char *text);
55 
56 /* adcache.cxx */
57 char *gb_read_cache(GBENTRY *gbe);
58 void gb_free_cache(GB_MAIN_TYPE *Main, GBENTRY *gbe);
59 void gb_uncache(GBENTRY *gbe);
60 char *gb_alloc_cache_index(GBENTRY *gbe, size_t size);
61 
62 /* adcomm.cxx */
63 GB_ERROR gbcm_unfold_client(GBCONTAINER *gbc, long deep, long index_pos) __ATTR__USERESULT;
74 long gbcmc_key_alloc(GBDATA *gbd, const char *key);
79 GB_ERROR gbcm_logout(GB_MAIN_TYPE *Main, const char *loginname);
80 
81 /* adcompr.cxx */
82 gb_compress_tree *gb_build_uncompress_tree(const unsigned char *data, long short_flag, char **end);
84 gb_compress_list *gb_build_compress_list(const unsigned char *data, long short_flag, long *size);
85 char *gb_compress_bits(const char *source, long size, const unsigned char *c_0, long *msize);
86 GB_BUFFER gb_uncompress_bits(const char *source, long size, char c_0, char c_1);
87 void gb_compress_equal_bytes_2(const char *source, size_t size, size_t *msize, char *dest);
88 GB_BUFFER gb_uncompress_bytes(GB_CBUFFER source, size_t size, size_t *new_size);
89 GB_BUFFER gb_uncompress_longs_old(GB_CBUFFER source, size_t size, size_t *new_size);
91 GB_BUFFER gb_compress_data(GBDATA *gbd, int key, GB_CBUFFER source, size_t size, size_t *msize, GB_COMPRESSION_MASK max_compr, bool pre_compressed);
92 GB_CBUFFER gb_uncompress_data(GBDATA *gbd, GB_CBUFFER source, size_t size);
93 
94 /* adfile.cxx */
96 
97 /* adhash.cxx */
98 size_t gbs_get_a_prime(size_t above_or_equal_this);
99 
100 /* adindex.cxx */
102 GBDATA *gb_index_find(GBCONTAINER *gbf, gb_index_files *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index);
103 void gb_init_undo_stack(GB_MAIN_TYPE *Main);
104 void gb_free_undo_stack(GB_MAIN_TYPE *Main);
109 void gb_check_in_undo_delete(GB_MAIN_TYPE *Main, GBDATA*& gbd);
110 
111 /* admalloc.cxx */
112 void gbm_flush_mem(void);
113 void gbm_init_mem(void);
114 void gbm_debug_mem(void);
115 
116 /* admap.cxx */
118 int gb_is_valid_mapfile(const char *path, gb_map_header *mheader, int verbose);
119 GBDATA *gb_map_mapfile(const char *path);
120 int gb_isMappedMemory(void *mem);
121 
122 /* adoptimize.cxx */
124 char *gb_uncompress_by_dictionary(GBDATA *gbd, GB_CSTR s_source, size_t size, size_t *new_size);
125 char *gb_compress_by_dictionary(GB_DICTIONARY *dict, GB_CSTR s_source, size_t size, size_t *msize, int last_flag, int search_backward, int search_forward);
126 
127 /* adquery.cxx */
129 GBDATA *gb_search(GBCONTAINER *gbc, const char *key, GB_TYPES create, int internflag);
130 
131 /* adsocket.cxx */
132 void gbcm_read_flush(void);
133 long gbcm_read(int socket, char *ptr, long size);
135 GBCM_ServerResult gbcm_write(int socket, const char *ptr, long size);
136 GB_ERROR gbcm_open_socket(const char *path, bool do_connect, int *psocket, char **unix_name);
138 gbcmc_comm *gbcmc_open(const char *path);
139 long gbcm_write_two(int socket, long a, long c);
140 GBCM_ServerResult gbcm_read_two(int socket, long a, long *b, long *c);
141 GBCM_ServerResult gbcm_write_string(int socket, const char *key);
142 char *gbcm_read_string(int socket);
143 GBCM_ServerResult gbcm_write_long(int socket, long data);
144 long gbcm_read_long(int socket);
145 
146 /* adsystem.cxx */
147 GB_ERROR gb_load_dictionary_data(GBDATA *gb_main, const char *key, char **dict_data, long *size);
149 GB_ERROR gb_save_dictionary_data(GBDATA *gb_main, const char *key, const char *dict, int size);
151 
152 /* arbdb.cxx */
153 GB_ERROR gb_unfold(GBCONTAINER *gbc, long deep, int index_pos);
154 void gb_abort_and_close_all_DBs(void);
155 int gb_read_nr(GBDATA *gbd);
156 GB_ERROR gb_write_compressed_pntr(GBENTRY *gbe, const char *s, long memsize, long stored_size);
157 int gb_get_compression_mask(GB_MAIN_TYPE *Main, GBQUARK key, int gb_type);
159 GBQUARK gb_find_or_create_quark(GB_MAIN_TYPE *Main, const char *key);
160 GBQUARK gb_find_or_create_NULL_quark(GB_MAIN_TYPE *Main, const char *key);
163 GBENTRY *gb_create(GBCONTAINER *father, const char *key, GB_TYPES type);
167 
168 #else
169 #error gb_prot.h included twice
170 #endif /* GB_PROT_H */
GB_CSTR gb_oldQuicksaveName(GB_CSTR path, int nr)
GB_ERROR gbcmc_abort_transaction(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1615
GB_CHANGE
Definition: gb_local.h:73
GBCM_ServerResult gbcm_write(int socket, const char *ptr, long size)
Definition: adsocket.cxx:128
void gb_uncache(GBENTRY *gbe)
Definition: adcache.cxx:215
GB_BUFFER gb_uncompress_bits(const char *source, long size, char c_0, char c_1)
Definition: adcompr.cxx:294
GB_ERROR gbcmc_begin_sendupdate(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1356
GB_ERROR gb_delete_force(GBDATA *source)
Definition: arbdb.cxx:1945
const char * GB_ERROR
Definition: arb_core.h:25
char * gb_read_cache(GBENTRY *gbe)
Definition: adcache.cxx:179
GB_ERROR gbcmc_begin_transaction(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1469
GB_TYPES type
char * gb_disable_undo(GBDATA *gb_main)
Definition: adindex.cxx:610
long gb_ascii_2_bin(const char *source, GBENTRY *gbe)
GBDATA * gb_index_find(GBCONTAINER *gbf, gb_index_files *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index)
Definition: adindex.cxx:267
void gb_save_extern_data_in_ts(GBENTRY *gbe)
Definition: ad_core.cxx:639
GB_ERROR gb_commit_transaction_local_rek(GBDATA *&gbd, long mode, int *pson_created) __ATTR__USERESULT
Definition: ad_core.cxx:818
gb_undo_commands
Definition: gb_local.h:61
void gb_init_undo_stack(GB_MAIN_TYPE *Main)
Definition: adindex.cxx:344
GBQUARK gb_find_or_create_NULL_quark(GB_MAIN_TYPE *Main, const char *key)
Definition: arbdb.cxx:1678
void gb_abort_and_close_all_DBs(void)
Definition: arbdb.cxx:710
long gbcm_read(int socket, char *ptr, long size)
Definition: adsocket.cxx:79
GBENTRY * gb_make_entry(GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq, GB_TYPES type)
Definition: ad_core.cxx:353
char * gb_abort_entry(GBDATA *gbd)
Definition: ad_core.cxx:768
GB_ERROR gb_scan_directory(char *basename, gb_scandir *sd) __ATTR__USERESULT_TODO
Definition: adfile.cxx:30
GB_ERROR gb_load_key_data_and_dictionaries(GB_MAIN_TYPE *Main) __ATTR__USERESULT
Definition: adsystem.cxx:209
GB_CSTR gb_read_key_pntr(GBDATA *gbd)
Definition: arbdb.cxx:1664
GB_MAIN_TYPE * gb_get_main_during_cb(void)
Definition: ad_cb.cxx:108
GBDATA * gb_search(GBCONTAINER *gbc, const char *key, GB_TYPES create, int internflag)
Definition: adquery.cxx:445
int gb_get_compression_mask(GB_MAIN_TYPE *Main, GBQUARK key, int gb_type)
Definition: arbdb.cxx:1329
void gb_write_index_key(GBCONTAINER *father, long index, GBQUARK new_index)
Definition: ad_core.cxx:660
GB_ERROR gbcmc_sendupdate_create(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1389
void gb_touch_entry(GBDATA *gbd, GB_CHANGE val)
Definition: ad_core.cxx:83
void gb_free_cache(GB_MAIN_TYPE *Main, GBENTRY *gbe)
Definition: adcache.cxx:204
long gb_create_key(GB_MAIN_TYPE *Main, const char *key, bool create_gb_key)
Definition: ad_core.cxx:708
void gb_delete_entry(GBDATA *&gbd)
Definition: ad_core.cxx:511
void gb_pre_delete_entry(GBDATA *gbd)
Definition: ad_core.cxx:445
GB_BUFFER gb_uncompress_bytes(GB_CBUFFER source, size_t size, size_t *new_size)
Definition: adcompr.cxx:761
void gbm_init_mem(void)
Definition: admalloc.cxx:219
char * gb_compress_bits(const char *source, long size, const unsigned char *c_0, long *msize)
Definition: adcompr.cxx:250
char * gb_alloc_cache_index(GBENTRY *gbe, size_t size)
Definition: adcache.cxx:260
GB_ERROR gbcm_login(GBCONTAINER *gb_main, const char *loginname) __ATTR__USERESULT
Definition: adcomm.cxx:1883
GB_BUFFER gb_uncompress_longs_old(GB_CBUFFER source, size_t size, size_t *new_size)
Definition: adcompr.cxx:772
GB_ERROR gbcmc_sendupdate_delete(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1406
gbcmc_comm * gbcmc_open(const char *path)
Definition: adsocket.cxx:170
POS_TREE1 * father
Definition: probe_tree.h:39
GB_ERROR gbcmc_send_undo_commands(GBDATA *gbd, enum gb_undo_commands command) __ATTR__USERESULT
Definition: adcomm.cxx:1824
boolean verbose
Definition: readseq.c:461
void gb_check_in_undo_delete(GB_MAIN_TYPE *Main, GBDATA *&gbd)
Definition: adindex.cxx:674
void gb_check_in_undo_modify(GB_MAIN_TYPE *Main, GBDATA *gbd)
Definition: adindex.cxx:647
GBCM_ServerResult
Definition: gb_local.h:93
GB_ERROR gb_write_compressed_pntr(GBENTRY *gbe, const char *s, long memsize, long stored_size)
Definition: arbdb.cxx:1317
GBCONTAINER * gb_make_container(GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq)
Definition: ad_core.cxx:414
GB_CSTR gb_quicksaveName(GB_CSTR path, int nr)
void gb_create_key_array(GB_MAIN_TYPE *Main, int index)
Definition: ad_core.cxx:697
void gb_compress_equal_bytes_2(const char *source, size_t size, size_t *msize, char *dest)
Definition: adcompr.cxx:392
GB_ERROR gbcm_logout(GB_MAIN_TYPE *Main, const char *loginname)
Definition: adcomm.cxx:1934
char * gb_set_undo_sync(GBDATA *gb_main)
Definition: adindex.cxx:582
void gb_untouch_children_and_me(GBCONTAINER *gbc)
Definition: ad_core.cxx:159
GB_ERROR gbcmc_end_sendupdate(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1365
GBCONTAINER * gb_create_container(GBCONTAINER *father, const char *key)
Definition: arbdb.cxx:1773
int gb_is_valid_mapfile(const char *path, gb_map_header *mheader, int verbose)
Definition: admap.cxx:652
void gb_load_single_key_data(GBDATA *gb_main, GBQUARK q)
Definition: adsystem.cxx:112
char * gbcm_read_string(int socket)
Definition: adsocket.cxx:240
char * gb_uncompress_by_dictionary(GBDATA *gbd, GB_CSTR s_source, size_t size, size_t *new_size)
Definition: adoptimize.cxx:578
GB_ERROR gb_convert_V2_to_V3(GBDATA *gb_main)
Definition: adoptimize.cxx:259
GB_ERROR gbcmc_init_transaction(GBCONTAINER *gbc) __ATTR__USERESULT
Definition: adcomm.cxx:1549
long gbcm_write_two(int socket, long a, long c)
Definition: adsocket.cxx:186
GBCM_ServerResult gbcmc_close(gbcmc_comm *link)
Definition: adcomm.cxx:1916
GB_ERROR gb_save_dictionary_data(GBDATA *gb_main, const char *key, const char *dict, int size)
Definition: adsystem.cxx:168
void gb_abort_transaction_local_rek(GBDATA *&gbd)
Definition: ad_core.cxx:787
GB_ERROR gb_load_dictionary_data(GBDATA *gb_main, const char *key, char **dict_data, long *size)
Definition: adsystem.cxx:33
void gb_untouch_children(GBCONTAINER *gbc)
Definition: ad_core.cxx:114
GB_ERROR gbcm_unfold_client(GBCONTAINER *gbc, long deep, long index_pos) __ATTR__USERESULT
Definition: adcomm.cxx:1305
GBCONTAINER * gb_get_root(GBENTRY *gbe)
Definition: arbdb.cxx:1741
gb_compress_tree * gb_build_uncompress_tree(const unsigned char *data, long short_flag, char **end)
Definition: adcompr.cxx:120
GB_CSTR gb_mapfile_name(GB_CSTR path)
void gbm_debug_mem(void)
Definition: admalloc.cxx:549
GBCM_ServerResult gbcm_write_string(int socket, const char *key)
Definition: adsocket.cxx:228
size_t gbs_get_a_prime(size_t above_or_equal_this)
Definition: adhash.cxx:193
int gb_isMappedMemory(void *mem)
Definition: admap.cxx:725
GB_CASE
Definition: arb_core.h:30
GB_ERROR gbcmc_sendupdate_update(GBDATA *gbd, int send_headera) __ATTR__USERESULT
Definition: adcomm.cxx:1415
char * gb_compress_by_dictionary(GB_DICTIONARY *dict, GB_CSTR s_source, size_t size, size_t *msize, int last_flag, int search_backward, int search_forward)
Definition: adoptimize.cxx:591
GB_ERROR gbcmc_commit_transaction(GBDATA *gbd) __ATTR__USERESULT
Definition: adcomm.cxx:1596
long gbcm_read_long(int socket)
Definition: adsocket.cxx:265
GB_ERROR gb_unfold(GBCONTAINER *gbc, long deep, int index_pos)
Definition: arbdb.cxx:586
void gb_add_ref_gb_transaction_save(gb_transaction_save *ts)
Definition: ad_core.cxx:586
aisc_com * link
void gbm_flush_mem(void)
Definition: admalloc.cxx:198
void gb_remove_callbacks_marked_for_deletion(GBDATA *gbd)
Definition: ad_cb.cxx:295
long index
Definition: gb_data.h:133
short GB_MAIN_IDX
Definition: gb_local.h:32
#define __ATTR__USERESULT
Definition: attributes.h:58
GBDATA * gb_map_mapfile(const char *path)
Definition: admap.cxx:706
void gb_check_in_undo_create(GB_MAIN_TYPE *Main, GBDATA *gbd)
Definition: adindex.cxx:636
GBCONTAINER * gb_make_pre_defined_container(GBCONTAINER *father, GBCONTAINER *gbc, long index_pos, GBQUARK keyq)
Definition: ad_core.cxx:395
void gb_create_header_array(GBCONTAINER *gbc, int size)
Definition: ad_core.cxx:176
void gb_free_undo_stack(GB_MAIN_TYPE *Main)
Definition: adindex.cxx:417
GB_CBUFFER gb_uncompress_data(GBDATA *gbd, GB_CBUFFER source, size_t size)
Definition: adcompr.cxx:990
void gbcm_read_flush(void)
Definition: adsocket.cxx:50
GB_ERROR gb_resort_system_folder_to_top(GBCONTAINER *gb_main)
Definition: arbdb.cxx:2705
GB_MAIN_IDX gb_make_main_idx(GB_MAIN_TYPE *Main)
Definition: ad_load.cxx:922
gb_compress_list * gb_build_compress_list(const unsigned char *data, long short_flag, long *size)
Definition: adcompr.cxx:193
GBDATA * gb_make_pre_defined_entry(GBCONTAINER *father, GBDATA *gbd, long index_pos, GBQUARK keyq)
Definition: ad_core.cxx:327
int GB_COMPRESSION_MASK
Definition: arbdb.h:35
GB_ERROR gbcms_add_to_delete_list(GBDATA *gbd)
Definition: adcomm.cxx:1635
GBCM_ServerResult gbcm_write_flush(int socket)
Definition: adsocket.cxx:91
static char * command
Definition: arb_a2ps.c:319
GBDATA * gb_find_by_nr(GBCONTAINER *father, int index)
Definition: adquery.cxx:367
GB_DICTIONARY * gb_get_dictionary(GB_MAIN_TYPE *Main, GBQUARK key)
Definition: adcompr.cxx:857
GB_ERROR gbcm_open_socket(const char *path, bool do_connect, int *psocket, char **unix_name)
Definition: adsocket.cxx:144
GB_TYPES
Definition: arbdb.h:62
const char * GB_CBUFFER
Definition: arbdb_base.h:27
void gb_destroy_indices(GBCONTAINER *gbc)
Definition: adindex.cxx:166
void gb_del_ref_gb_transaction_save(gb_transaction_save *ts)
Definition: ad_core.cxx:591
GBQUARK gb_find_or_create_quark(GB_MAIN_TYPE *Main, const char *key)
Definition: arbdb.cxx:1668
GBDATA * gb_main
Definition: adname.cxx:32
#define __ATTR__USERESULT_TODO
Definition: attributes.h:103
void gb_del_ref_and_extern_gb_transaction_save(gb_transaction_save *ts)
Definition: ad_core.cxx:606
void gb_untouch_me(GBENTRY *gbe)
Definition: ad_core.cxx:149
GBCM_ServerResult gbcm_read_two(int socket, long a, long *b, long *c)
Definition: adsocket.cxx:196
GBENTRY * gb_create(GBCONTAINER *father, const char *key, GB_TYPES type)
Definition: arbdb.cxx:1763
char * gb_findExtension(char *path)
void gb_free_compress_tree(gb_compress_tree *tree)
Definition: adcompr.cxx:183
void gb_delete_dummy_father(GBCONTAINER *&gbc)
Definition: ad_core.cxx:542
const char * GB_CSTR
Definition: arbdb_base.h:25
long gbcmc_key_alloc(GBDATA *gbd, const char *key)
Definition: adcomm.cxx:1788
int GBQUARK
Definition: arbdb_base.h:30
char * GB_BUFFER
Definition: arbdb_base.h:26
int gb_read_nr(GBDATA *gbd)
Definition: arbdb.cxx:900
GBCM_ServerResult gbcm_write_long(int socket, long data)
Definition: adsocket.cxx:260
char * gbcmc_send_undo_info_commands(GBDATA *gbd, enum gb_undo_commands command)
Definition: adcomm.cxx:1847
void gb_touch_header(GBCONTAINER *gbc)
Definition: ad_core.cxx:108
long gbcms_close(gbcmc_comm *link)
GB_ERROR gb_save_mapfile(GB_MAIN_TYPE *Main, GB_CSTR path)
Definition: admap.cxx:587
long gb_read_bin_error(FILE *in, GBDATA *gbd, const char *text)
GB_BUFFER gb_compress_data(GBDATA *gbd, int key, GB_CBUFFER source, size_t size, size_t *msize, GB_COMPRESSION_MASK max_compr, bool pre_compressed)
Definition: adcompr.cxx:923
GB_write_int const char s
Definition: AW_awar.cxx:154