source: branches/port5/ARBDB/ad_lpro.h

Last change on this file was 6079, checked in by westram, 16 years ago
  • avoid crash during deletion of main db entry (delete __SYSTEM__ container after other containers)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.0 KB
Line 
1/*
2 * Internal database interface.
3 *
4 * This file is generated by aisc_mkpt.
5 * Any changes you make here will be overwritten later!
6 *
7 */
8
9#ifndef AD_LPRO_H
10#define AD_LPRO_H
11
12#ifndef P_
13# error P_ is not defined
14#endif
15
16/* define ARB attributes: */
17#ifndef ATTRIBUTES_H
18# include <attributes.h>
19#endif
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25
26/* adlang1.c */
27void gbl_install_standard_commands P_((GBDATA *gb_main));
28
29/* adstring.c */
30GB_ERROR gb_scan_directory P_((char *basename, struct gb_scandir *sd)) __ATTR__USERESULT;
31void gbs_uppercase P_((char *str));
32void gbs_memcopy P_((char *dest, const char *source, long len));
33char *gbs_malloc_copy P_((const char *source, long len));
34char *gbs_add_path P_((char *path, char *name));
35
36/* arbdb.c */
37GB_ERROR gb_unfold P_((GBCONTAINER *gbd, long deep, int index_pos));
38int gb_read_nr P_((GBDATA *gbd));
39GB_ERROR gb_write_compressed_pntr P_((GBDATA *gbd, const char *s, long memsize, long stored_size));
40int gb_get_compression_mask P_((GB_MAIN_TYPE *Main, GBQUARK key, int gb_type));
41GB_ERROR gb_security_error P_((GBDATA *gbd));
42GB_CSTR gb_read_key_pntr P_((GBDATA *gbd));
43GBQUARK gb_key_2_quark P_((GB_MAIN_TYPE *Main, const char *s));
44GBDATA *gb_create P_((GBDATA *father, const char *key, GB_TYPES type));
45GBDATA *gb_create_container P_((GBDATA *father, const char *key));
46void gb_rename P_((GBCONTAINER *gbc, const char *new_key));
47GB_ERROR gb_delete_force P_((GBDATA *source));
48GB_ERROR gb_set_compression P_((GBDATA *source));
49GB_ERROR gb_init_transaction P_((GBCONTAINER *gbd));
50GB_ERROR gb_add_changed_callback_list P_((GBDATA *gbd, struct gb_transaction_save *old, GB_CB_TYPE gbtype, GB_CB func, int *clientdata));
51GB_ERROR gb_add_delete_callback_list P_((GBDATA *gbd, struct gb_transaction_save *old, GB_CB func, int *clientdata));
52GB_ERROR gb_do_callback_list P_((GB_MAIN_TYPE *Main));
53GB_MAIN_TYPE *gb_get_main_during_cb P_((void));
54GBDATA *GB_get_gb_main_during_cb P_((void));
55GB_CSTR gb_read_pntr_ts P_((GBDATA *gbd, struct gb_transaction_save *ts));
56int gb_info P_((GBDATA *gbd, int deep));
57
58/* ad_core.c */
59void gb_touch_entry P_((GBDATA *gbd, GB_CHANGED val));
60void gb_touch_header P_((GBCONTAINER *gbc));
61void gb_untouch_children P_((GBCONTAINER *gbc));
62void gb_untouch_me P_((GBDATA *gbc));
63void gb_set_update_in_server_flags P_((GBCONTAINER *gbc));
64void gb_create_header_array P_((GBCONTAINER *gbc, int size));
65void gb_link_entry P_((GBCONTAINER *father, GBDATA *gbd, long index_pos));
66void gb_unlink_entry P_((GBDATA *gbd));
67void gb_create_extended P_((GBDATA *gbd));
68struct gb_main_type *gb_make_gb_main_type P_((const char *path));
69char *gb_destroy_main P_((struct gb_main_type *Main));
70GBDATA *gb_make_pre_defined_entry P_((GBCONTAINER *father, GBDATA *gbd, long index_pos, GBQUARK keyq));
71void gb_rename_entry P_((GBCONTAINER *gbc, const char *new_key));
72GBDATA *gb_make_entry P_((GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq, GB_TYPES type));
73GBCONTAINER *gb_make_pre_defined_container P_((GBCONTAINER *father, GBCONTAINER *gbd, long index_pos, GBQUARK keyq));
74GBCONTAINER *gb_make_container P_((GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq));
75void gb_pre_delete_entry P_((GBDATA *gbd));
76void gb_delete_entry P_((GBDATA **gbd_ptr));
77void gb_delete_main_entry P_((GBDATA **gbd_ptr));
78struct gb_transaction_save *gb_new_gb_transaction_save P_((GBDATA *gbd));
79void gb_add_ref_gb_transaction_save P_((struct gb_transaction_save *ts));
80void gb_del_ref_gb_transaction_save P_((struct gb_transaction_save *ts));
81void gb_del_ref_and_extern_gb_transaction_save P_((struct gb_transaction_save *ts));
82void gb_abortdata P_((GBDATA *gbd));
83void gb_save_extern_data_in_ts P_((GBDATA *gbd));
84void gb_write_index_key P_((GBCONTAINER *father, long index, GBQUARK new_index));
85void gb_write_key P_((GBDATA *gbd, const char *s));
86void gb_create_key_array P_((GB_MAIN_TYPE *Main, int index));
87long gb_create_key P_((GB_MAIN_TYPE *Main, const char *s, GB_BOOL create_gb_key));
88void gb_free_all_keys P_((GB_MAIN_TYPE *Main));
89char *gb_abort_entry P_((GBDATA *gbd));
90int gb_abort_transaction_local_rek P_((GBDATA *gbd, long mode));
91GB_ERROR gb_commit_transaction_local_rek P_((GBDATA *gbd, long mode, int *pson_created));
92
93/* adoptimize.c */
94GB_ERROR gb_convert_V2_to_V3 P_((GBDATA *gb_main));
95char *gb_uncompress_by_dictionary P_((GBDATA *gbd, GB_CSTR s_source, long size, long *new_size));
96char *gb_compress_by_dictionary P_((GB_DICTIONARY *dict, GB_CSTR s_source, long size, long *msize, int last_flag, int search_backward, int search_forward));
97GB_ERROR gb_create_dictionaries P_((GB_MAIN_TYPE *Main, long maxmem));
98
99/* adsystem.c */
100GB_ERROR gb_load_dictionary_data P_((GBDATA *gb_main, const char *key, char **dict_data, long *size));
101GB_DICTIONARY *gb_create_dict P_((GBDATA *gb_dict));
102void delete_gb_dictionary P_((GB_DICTIONARY *dict));
103void gb_system_key_changed_cb P_((GBDATA *gbd, int *cl, GB_CB_TYPE type));
104void gb_system_master_changed_cb P_((GBDATA *gbd, int *cl, GB_CB_TYPE type));
105void gb_load_single_key_data P_((GBDATA *gb_main, GBQUARK q));
106GB_ERROR gb_save_dictionary_data P_((GBDATA *gb_main, const char *key, const char *dict, int size));
107GB_ERROR gb_load_key_data_and_dictionaries P_((GBDATA *gb_main));
108
109/* adindex.c */
110char *gb_index_check_in P_((GBDATA *gbd));
111void gb_index_check_out P_((GBDATA *gbd));
112GBDATA *gb_index_find P_((GBCONTAINER *gbf, struct gb_index_files_struct *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index));
113char *gb_set_undo_type P_((GBDATA *gb_main, GB_UNDO_TYPE type));
114void gb_init_undo_stack P_((struct gb_main_type *Main));
115void gb_free_undo_stack P_((struct gb_main_type *Main));
116char *gb_set_undo_sync P_((GBDATA *gb_main));
117char *gb_free_all_undos P_((GBDATA *gb_main));
118char *gb_disable_undo P_((GBDATA *gb_main));
119void gb_check_in_undo_create P_((GB_MAIN_TYPE *Main, GBDATA *gbd));
120void gb_check_in_undo_modify P_((GB_MAIN_TYPE *Main, GBDATA *gbd));
121void gb_check_in_undo_delete P_((GB_MAIN_TYPE *Main, GBDATA *gbd, int deep));
122
123/* adperl.c */
124GB_TYPES GBP_gb_types P_((char *type_name));
125
126/* adsocket.c */
127GB_ERROR gbcm_test_address P_((long *address, long key));
128long gbcm_test_address_end P_((void));
129void *gbcms_sigpipe P_((void));
130void gbcm_read_flush P_((int socket));
131long gbcm_read_buffered P_((int socket, char *ptr, long size));
132long gbcm_read P_((int socket, char *ptr, long size));
133int gbcm_write_flush P_((int socket));
134int gbcm_write P_((int socket, const char *ptr, long size));
135void *gbcm_sigio P_((void));
136GB_ERROR gbcm_get_m_id P_((const char *path, char **m_name, long *id));
137GB_ERROR gbcm_open_socket P_((const char *path, long delay2, long do_connect, int *psocket, char **unix_name));
138long gbcms_close P_((struct gbcmc_comm *link));
139struct gbcmc_comm *gbcmc_open P_((const char *path));
140long gbcm_write_two P_((int socket, long a, long c));
141long gbcm_read_two P_((int socket, long a, long *b, long *c));
142long gbcm_write_string P_((int socket, const char *key));
143char *gbcm_read_string P_((int socket));
144long gbcm_write_long P_((int socket, long data));
145long gbcm_read_long P_((int socket));
146
147/* adcomm.c */
148void *gbcms_sighup P_((void));
149void gbcms_shift_delete_list P_((void *hsi, void *soi));
150int gbcms_write_deleted P_((int socket, GBDATA *gbd, long hsin, long client_clock, long *buffer));
151int gbcms_write_updated P_((int socket, GBDATA *gbd, long hsin, long client_clock, long *buffer));
152int gbcms_write_keys P_((int socket, GBDATA *gbd));
153int gbcms_talking_unfold P_((int socket, long *hsin, void *sin, GBDATA *gb_in));
154int gbcms_talking_get_update P_((int socket, long *hsin, void *sin, GBDATA *gbd));
155int gbcms_talking_put_update P_((int socket, long *hsin, void *sin, GBDATA *gbd_dummy));
156int gbcms_talking_updated P_((int socket, long *hsin, void *sin, GBDATA *gbd));
157int gbcms_talking_init_transaction P_((int socket, long *hsin, void *sin, GBDATA *gb_dummy));
158int gbcms_talking_begin_transaction P_((int socket, long *hsin, void *sin, long client_clock));
159int gbcms_talking_commit_transaction P_((int socket, long *hsin, void *sin, GBDATA *gbd));
160int gbcms_talking_abort_transaction P_((int socket, long *hsin, void *sin, GBDATA *gbd));
161int gbcms_talking_close P_((int socket, long *hsin, void *sin, GBDATA *gbd));
162int gbcms_talking_system P_((int socket, long *hsin, void *sin, GBDATA *gbd));
163int gbcms_talking_undo P_((int socket, long *hsin, void *sin, GBDATA *gbd));
164int gbcms_talking_find P_((int socket, long *hsin, void *sin, GBDATA *gbd));
165int gbcms_talking_key_alloc P_((int socket, long *hsin, void *sin, GBDATA *gbd));
166int gbcms_talking_disable_wait_for_new_request P_((int socket, long *hsin, void *sin, GBDATA *gbd));
167int gbcms_talking P_((int con, long *hs, void *sin));
168GB_ERROR gbcm_write_bin P_((int socket, GBDATA *gbd, long *buffer, long mode, long deep, int send_headera));
169long gbcm_read_bin P_((int socket, GBCONTAINER *gbd, long *buffer, long mode, GBDATA *gb_source, void *cs_main));
170GB_ERROR gbcm_unfold_client P_((GBCONTAINER *gbd, long deep, long index_pos));
171GB_ERROR gbcmc_begin_sendupdate P_((GBDATA *gbd));
172GB_ERROR gbcmc_end_sendupdate P_((GBDATA *gbd));
173GB_ERROR gbcmc_sendupdate_create P_((GBDATA *gbd));
174GB_ERROR gbcmc_sendupdate_delete P_((GBDATA *gbd));
175GB_ERROR gbcmc_sendupdate_update P_((GBDATA *gbd, int send_headera));
176GB_ERROR gbcmc_read_keys P_((int socket, GBDATA *gbd));
177GB_ERROR gbcmc_begin_transaction P_((GBDATA *gbd));
178GB_ERROR gbcmc_init_transaction P_((GBCONTAINER *gbd));
179GB_ERROR gbcmc_commit_transaction P_((GBDATA *gbd));
180GB_ERROR gbcmc_abort_transaction P_((GBDATA *gbd));
181GB_ERROR gbcms_add_to_delete_list P_((GBDATA *gbd));
182GB_ERROR gbcmc_unfold_list P_((int socket, GBDATA *gbd));
183long gbcmc_key_alloc P_((GBDATA *gbd, const char *key));
184GB_ERROR gbcmc_send_undo_commands P_((GBDATA *gbd, enum gb_undo_commands command));
185char *gbcmc_send_undo_info_commands P_((GBDATA *gbd, enum gb_undo_commands command));
186GB_ERROR gbcm_login P_((GBCONTAINER *gb_main, const char *user));
187long gbcmc_close P_((struct gbcmc_comm *link));
188GB_ERROR gbcm_logout P_((GBCONTAINER *gb_main, char *user));
189
190/* adhash.c */
191long gbs_hashi_index P_((long key, long size));
192void gb_init_cache P_((GB_MAIN_TYPE *Main));
193char *gb_read_cache P_((GBDATA *gbd));
194void *gb_free_cache P_((GB_MAIN_TYPE *Main, GBDATA *gbd));
195char *gb_flush_cache P_((GBDATA *gbd));
196char *gb_alloc_cache_index P_((GBDATA *gbd, long size));
197
198/* adquery.c */
199GBDATA *gb_find_by_nr P_((GBDATA *father, int index));
200void gb_init_ctype_table P_((void));
201GBDATA *gb_search P_((GBDATA *gbd, const char *str, GB_TYPES create, int internflag));
202GBDATA *gb_search_marked P_((GBCONTAINER *gbc, GBQUARK key_quark, int firstindex));
203void gb_install_command_table P_((GBDATA *gb_main, struct GBL_command_table *table));
204char *gbs_search_second_x P_((const char *str));
205char *gbs_search_second_bracket P_((const char *source));
206char *gbs_search_next_seperator P_((const char *source, const char *seps));
207
208/* ad_save_load.c */
209char *gb_findExtension P_((char *path));
210GB_CSTR gb_oldQuicksaveName P_((GB_CSTR path, int nr));
211GB_CSTR gb_quicksaveName P_((GB_CSTR path, int nr));
212GB_CSTR gb_mapfile_name P_((GB_CSTR path));
213GB_CSTR gb_overwriteName P_((GB_CSTR path));
214GB_CSTR gb_reffile_name P_((GB_CSTR path));
215GB_ERROR gb_delete_reference P_((const char *master));
216GB_ERROR gb_create_reference P_((const char *master));
217GB_ERROR gb_add_reference P_((char *master, char *changes));
218GB_ERROR gb_remove_all_but_main P_((GB_MAIN_TYPE *Main, const char *path));
219long gb_ascii_2_bin P_((const char *source, GBDATA *gbd));
220GB_BUFFER gb_bin_2_ascii P_((GBDATA *gbd));
221long gb_test_sub P_((GBDATA *gbd));
222long gb_read_in_long P_((FILE *in, long reversed));
223long gb_read_number P_((FILE *in));
224void gb_put_number P_((long i, FILE *out));
225long gb_read_bin_error P_((FILE *in, GBDATA *gbd, const char *text));
226long gb_write_out_long P_((long data, FILE *out));
227int gb_is_writeable P_((struct gb_header_list_struct *header, GBDATA *gbd, long version, long diff_save));
228int gb_write_bin_sub_containers P_((FILE *out, GBCONTAINER *gbc, long version, long diff_save, int is_root));
229long gb_write_bin_rek P_((FILE *out, GBDATA *gbd, long version, long diff_save, long index_of_master_file));
230int gb_write_bin P_((FILE *out, GBDATA *gbd, long version));
231char *gb_full_path P_((const char *path));
232GB_ERROR gb_check_saveable P_((GBDATA *gbd, const char *path, const char *flags));
233
234/* adcompr.c */
235struct gb_compress_tree *gb_build_uncompress_tree P_((const unsigned char *data, long short_flag, char **end));
236void gb_free_compress_tree P_((struct gb_compress_tree *tree));
237struct gb_compress_list *gb_build_compress_list P_((const unsigned char *data, long short_flag, long *size));
238char *gb_compress_bits P_((const char *source, long size, const unsigned char *c_0, long *msize));
239GB_BUFFER gb_uncompress_bits P_((const char *source, long size, char c_0, char c_1));
240void gb_compress_equal_bytes_2 P_((const char *source, long size, long *msize, char *dest));
241GB_BUFFER gb_compress_equal_bytes P_((const char *source, long size, long *msize, int last_flag));
242void gb_compress_huffmann_add_to_list P_((long val, struct gb_compress_list *element));
243long gb_compress_huffmann_pop P_((long *val, struct gb_compress_list **element));
244char *gb_compress_huffmann_rek P_((struct gb_compress_list *bc, int bits, int bitcnt, char *dest));
245GB_BUFFER gb_compress_huffmann P_((GB_CBUFFER source, long size, long *msize, int last_flag));
246GB_BUFFER gb_uncompress_bytes P_((GB_CBUFFER source, long size, long *new_size));
247GB_BUFFER gb_uncompress_longs_old P_((GB_CBUFFER source, long size, long *new_size));
248GB_BUFFER gb_compress_longs P_((GB_CBUFFER source, long size, int last_flag));
249GB_DICTIONARY *gb_get_dictionary P_((GB_MAIN_TYPE *Main, GBQUARK key));
250GB_BUFFER gb_compress_data P_((GBDATA *gbd, int key, GB_CBUFFER source, long size, long *msize, GB_COMPRESSION_MASK max_compr, GB_BOOL pre_compressed));
251GB_CBUFFER gb_uncompress_data P_((GBDATA *gbd, GB_CBUFFER source, long size));
252
253/* admalloc.c */
254void gbm_init_mem P_((void));
255void gbm_put_memblk P_((char *memblk, size_t size));
256char *gbm_get_mem P_((size_t size, long index));
257void gbm_free_mem P_((char *data, size_t size, long index));
258void gbm_debug_mem P_((GB_MAIN_TYPE *Main));
259
260/* ad_load.c */
261GB_ERROR gb_read_ascii P_((const char *path, GBCONTAINER *gbd));
262long gb_read_bin_rek P_((FILE *in, GBCONTAINER *gbd, long nitems, long version, long reversed));
263long gb_recover_corrupt_file P_((GBCONTAINER *gbd, FILE *in, GB_ERROR recovery_reason));
264long gb_read_bin_rek_V2 P_((FILE *in, GBCONTAINER *gbd, long nitems, long version, long reversed, long deep));
265GBDATA *gb_search_system_folder_rek P_((GBDATA *gbd));
266void gb_search_system_folder P_((GBDATA *gb_main));
267long gb_read_bin P_((FILE *in, GBCONTAINER *gbd, int diff_file_allowed));
268GB_MAIN_IDX gb_make_main_idx P_((GB_MAIN_TYPE *Main));
269GB_ERROR gb_login_remote P_((struct gb_main_type *gb_main, const char *path, const char *opent));
270
271/* admap.c */
272int gb_save_mapfile P_((GB_MAIN_TYPE *Main, GB_CSTR path));
273int gb_is_valid_mapfile P_((const char *path, struct gb_map_header *mheader, int verbose));
274GBDATA *gb_map_mapfile P_((const char *path));
275int gb_isMappedMemory P_((char *mem));
276
277/* adTest.c */
278void gb_testDB P_((GBDATA *gbd));
279
280#ifdef __cplusplus
281}
282#endif
283
284#else
285#error ad_lpro.h included twice
286#endif /* AD_LPRO_H */
Note: See TracBrowser for help on using the repository browser.