source: tags/testbuild/ARBDB/gb_prot.h

Last change on this file was 12888, checked in by westram, 10 years ago
  • fix #603
    • abort all TAs and close all DBs
      • in arb-perl death-handler
      • on exit (i.e. perl scripts will now abort unclosed TAs - not sure whether they did commit b4)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.0 KB
Line 
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_core.cxx */
17void gb_touch_entry(GBDATA *gbd, GB_CHANGE val);
18void gb_touch_header(GBCONTAINER *gbc);
19void gb_untouch_children(GBCONTAINER *gbc);
20void gb_untouch_me(GBENTRY *gbe);
21void gb_untouch_children_and_me(GBCONTAINER *gbc);
22void gb_create_header_array(GBCONTAINER *gbc, int size);
23GBDATA *gb_make_pre_defined_entry(GBCONTAINER *father, GBDATA *gbd, long index_pos, GBQUARK keyq);
24GBENTRY *gb_make_entry(GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq, GB_TYPES type);
25GBCONTAINER *gb_make_pre_defined_container(GBCONTAINER *father, GBCONTAINER *gbc, long index_pos, GBQUARK keyq);
26GBCONTAINER *gb_make_container(GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq);
27void gb_pre_delete_entry(GBDATA *gbd);
28void gb_delete_entry(GBCONTAINER*& gbc);
29void gb_delete_entry(GBENTRY*& gbe);
30void gb_delete_entry(GBDATA*& gbd);
31void gb_delete_dummy_father(GBCONTAINER*& gbc);
32void gb_add_ref_gb_transaction_save(gb_transaction_save *ts);
33void gb_del_ref_gb_transaction_save(gb_transaction_save *ts);
34void gb_del_ref_and_extern_gb_transaction_save(gb_transaction_save *ts);
35void gb_save_extern_data_in_ts(GBENTRY *gbe);
36void gb_write_index_key(GBCONTAINER *father, long index, GBQUARK new_index);
37void gb_create_key_array(GB_MAIN_TYPE *Main, int index);
38long gb_create_key(GB_MAIN_TYPE *Main, const char *s, bool create_gb_key);
39char *gb_abort_entry(GBDATA *gbd);
40void gb_abort_transaction_local_rek(GBDATA*& gbd);
41GB_ERROR gb_commit_transaction_local_rek(GBDATA*& gbd, long mode, int *pson_created);
42
43/* ad_load.cxx */
44GB_MAIN_IDX gb_make_main_idx(GB_MAIN_TYPE *Main);
45
46/* ad_save_load.cxx */
47char *gb_findExtension(char *path);
48GB_CSTR gb_oldQuicksaveName(GB_CSTR path, int nr);
49GB_CSTR gb_quicksaveName(GB_CSTR path, int nr);
50GB_CSTR gb_mapfile_name(GB_CSTR path);
51long gb_ascii_2_bin(const char *source, GBENTRY *gbe);
52long gb_read_bin_error(FILE *in, GBDATA *gbd, const char *text);
53
54/* adcache.cxx */
55char *gb_read_cache(GBENTRY *gbe);
56void gb_free_cache(GB_MAIN_TYPE *Main, GBENTRY *gbe);
57void gb_uncache(GBENTRY *gbe);
58char *gb_alloc_cache_index(GBENTRY *gbe, size_t size);
59
60/* adcomm.cxx */
61GB_ERROR gbcm_unfold_client(GBCONTAINER *gbc, long deep, long index_pos) __ATTR__USERESULT;
62GB_ERROR gbcmc_begin_sendupdate(GBDATA *gbd);
63GB_ERROR gbcmc_end_sendupdate(GBDATA *gbd);
64GB_ERROR gbcmc_sendupdate_create(GBDATA *gbd);
65GB_ERROR gbcmc_sendupdate_delete(GBDATA *gbd);
66GB_ERROR gbcmc_sendupdate_update(GBDATA *gbd, int send_headera);
67GB_ERROR gbcmc_begin_transaction(GBDATA *gbd);
68GB_ERROR gbcmc_init_transaction(GBCONTAINER *gbc);
69GB_ERROR gbcmc_commit_transaction(GBDATA *gbd);
70GB_ERROR gbcmc_abort_transaction(GBDATA *gbd);
71GB_ERROR gbcms_add_to_delete_list(GBDATA *gbd);
72long gbcmc_key_alloc(GBDATA *gbd, const char *key);
73GB_ERROR gbcmc_send_undo_commands(GBDATA *gbd, enum gb_undo_commands command) __ATTR__USERESULT;
74char *gbcmc_send_undo_info_commands(GBDATA *gbd, enum gb_undo_commands command);
75GB_ERROR gbcm_login(GBCONTAINER *gb_main, const char *loginname);
76GBCM_ServerResult gbcmc_close(gbcmc_comm *link);
77GB_ERROR gbcm_logout(GB_MAIN_TYPE *Main, const char *loginname);
78
79/* adcompr.cxx */
80gb_compress_tree *gb_build_uncompress_tree(const unsigned char *data, long short_flag, char **end);
81void gb_free_compress_tree(gb_compress_tree *tree);
82gb_compress_list *gb_build_compress_list(const unsigned char *data, long short_flag, long *size);
83char *gb_compress_bits(const char *source, long size, const unsigned char *c_0, long *msize);
84GB_BUFFER gb_uncompress_bits(const char *source, long size, char c_0, char c_1);
85void gb_compress_equal_bytes_2(const char *source, size_t size, size_t *msize, char *dest);
86GB_BUFFER gb_uncompress_bytes(GB_CBUFFER source, size_t size, size_t *new_size);
87GB_BUFFER gb_uncompress_longs_old(GB_CBUFFER source, size_t size, size_t *new_size);
88GB_DICTIONARY *gb_get_dictionary(GB_MAIN_TYPE *Main, GBQUARK key);
89GB_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);
90GB_CBUFFER gb_uncompress_data(GBDATA *gbd, GB_CBUFFER source, size_t size);
91
92/* adfile.cxx */
93GB_ERROR gb_scan_directory(char *basename, gb_scandir *sd) __ATTR__USERESULT_TODO;
94
95/* adhash.cxx */
96size_t gbs_get_a_prime(size_t above_or_equal_this);
97
98/* adindex.cxx */
99void gb_destroy_indices(GBCONTAINER *gbc);
100GBDATA *gb_index_find(GBCONTAINER *gbf, gb_index_files *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index);
101void gb_init_undo_stack(GB_MAIN_TYPE *Main);
102void gb_free_undo_stack(GB_MAIN_TYPE *Main);
103char *gb_set_undo_sync(GBDATA *gb_main);
104char *gb_disable_undo(GBDATA *gb_main);
105void gb_check_in_undo_create(GB_MAIN_TYPE *Main, GBDATA *gbd);
106void gb_check_in_undo_modify(GB_MAIN_TYPE *Main, GBDATA *gbd);
107void gb_check_in_undo_delete(GB_MAIN_TYPE *Main, GBDATA*& gbd);
108
109/* adlang1.cxx */
110void gbl_install_standard_commands(GBDATA *gb_main);
111
112/* admalloc.cxx */
113void gbm_flush_mem(void);
114void gbm_init_mem(void);
115void gbm_debug_mem(void);
116
117/* admap.cxx */
118GB_ERROR gb_save_mapfile(GB_MAIN_TYPE *Main, GB_CSTR path);
119int gb_is_valid_mapfile(const char *path, gb_map_header *mheader, int verbose);
120GBDATA *gb_map_mapfile(const char *path);
121int gb_isMappedMemory(void *mem);
122
123/* adoptimize.cxx */
124GB_ERROR gb_convert_V2_to_V3(GBDATA *gb_main);
125char *gb_uncompress_by_dictionary(GBDATA *gbd, GB_CSTR s_source, size_t size, size_t *new_size);
126char *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);
127
128/* adquery.cxx */
129GBDATA *gb_find_by_nr(GBCONTAINER *father, int index);
130GBDATA *gb_search(GBCONTAINER *gbc, const char *key, GB_TYPES create, int internflag);
131void gb_install_command_table(GBDATA *gb_main, struct GBL_command_table *table, size_t table_size);
132char *gbs_search_second_bracket(const char *source);
133
134/* adsocket.cxx */
135void gbcm_read_flush(void);
136long gbcm_read(int socket, char *ptr, long size);
137GBCM_ServerResult gbcm_write_flush(int socket);
138GBCM_ServerResult gbcm_write(int socket, const char *ptr, long size);
139GB_ERROR gbcm_open_socket(const char *path, bool do_connect, int *psocket, char **unix_name);
140long gbcms_close(gbcmc_comm *link);
141gbcmc_comm *gbcmc_open(const char *path);
142long gbcm_write_two(int socket, long a, long c);
143GBCM_ServerResult gbcm_read_two(int socket, long a, long *b, long *c);
144GBCM_ServerResult gbcm_write_string(int socket, const char *key);
145char *gbcm_read_string(int socket);
146GBCM_ServerResult gbcm_write_long(int socket, long data);
147long gbcm_read_long(int socket);
148
149/* adsystem.cxx */
150GB_ERROR gb_load_dictionary_data(GBDATA *gb_main, const char *key, char **dict_data, long *size);
151void gb_load_single_key_data(GBDATA *gb_main, GBQUARK q);
152GB_ERROR gb_save_dictionary_data(GBDATA *gb_main, const char *key, const char *dict, int size);
153GB_ERROR gb_load_key_data_and_dictionaries(GB_MAIN_TYPE *Main) __ATTR__USERESULT;
154
155/* arbdb.cxx */
156GB_ERROR gb_unfold(GBCONTAINER *gbc, long deep, int index_pos);
157void gb_abort_and_close_all_DBs(void);
158int gb_read_nr(GBDATA *gbd);
159GB_ERROR gb_write_compressed_pntr(GBENTRY *gbe, const char *s, long memsize, long stored_size);
160int gb_get_compression_mask(GB_MAIN_TYPE *Main, GBQUARK key, int gb_type);
161GB_CSTR gb_read_key_pntr(GBDATA *gbd);
162GBQUARK gb_find_existing_quark(GB_MAIN_TYPE *Main, const char *key);
163GBQUARK gb_find_or_create_quark(GB_MAIN_TYPE *Main, const char *key);
164GBQUARK gb_find_or_create_NULL_quark(GB_MAIN_TYPE *Main, const char *key);
165GBCONTAINER *gb_get_root(GBENTRY *gbe);
166GBCONTAINER *gb_get_root(GBCONTAINER *gbc);
167GBENTRY *gb_create(GBCONTAINER *father, const char *key, GB_TYPES type);
168GBCONTAINER *gb_create_container(GBCONTAINER *father, const char *key);
169GB_ERROR gb_delete_force(GBDATA *source);
170GB_MAIN_TYPE *gb_get_main_during_cb(void);
171GB_ERROR gb_resort_system_folder_to_top(GBCONTAINER *gb_main);
172
173#else
174#error gb_prot.h included twice
175#endif /* GB_PROT_H */
Note: See TracBrowser for help on using the repository browser.