/* ARB database interface.
 *
 * This file is generated by aisc_mkpt.
 * Any changes you make here will be overwritten later!
 */

#ifndef AD_PROT_H
#define AD_PROT_H

/* define ARB attributes: */
#ifndef ATTRIBUTES_H
# include <attributes.h>
#endif


/* adExperiment.cxx */
GBDATA *EXP_get_experiment_data(GBDATA *gb_species);
GBDATA *EXP_find_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name);

/* adGene.cxx */
bool GEN_is_genome_db(GBDATA *gb_main, int default_value);
GEN_position *GEN_new_position(int parts, bool joinable);
const char *GEN_origin_organism(GBDATA *gb_pseudo);
long GEN_get_organism_count(GBDATA *gb_main);
char *GEN_global_gene_identifier(GBDATA *gb_gene, GBDATA *gb_organism);

/* adTest.cxx */
const char *GB_get_type_name(GBDATA *gbd);
void GB_dump_db_path(GBDATA *gbd);
NOT4PERL void GB_dump(GBDATA *gbd);
GB_ERROR GB_fix_database(GBDATA *gb_main);

/* ad_load.cxx */
void GB_set_verbose(void);
void GB_set_next_main_idx(long idx);
GBDATA *GB_open(const char *path, const char *opent);
GB_ERROR GBT_check_arb_file(const char *name) __ATTR__USERESULT;

/* ad_save_load.cxx */
GB_ERROR GB_delete_database(GB_CSTR filename);

/* adcache.cxx */
char *GB_set_cache_size(GBDATA *gbd, size_t size);

class forwardDeclared;
struct declForward;

/* adcomm.cxx */
GB_ERROR GBCMS_open(const char *path, long timeout, GBDATA *gb_main);
void GBCMS_shutdown(GBDATA *gbd);

struct realDecl {
    long member; // comment

    int GB_member_function(GBDATA *gbd); // no xsub for member funs
    bool GB_inline_member_function(GBDATA *gbd) {
        return gbd!=0;
    }
};

/* adindex.cxx */
GB_ERROR GB_create_index(GBDATA *gbd, const char *key, GB_CASE case_sens, long estimated_size) __ATTR__USERESULT;
NOT4PERL void GB_dump_indices(GBDATA *gbd);
GB_ERROR GB_request_undo_type(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT_TODO;
GB_UNDO_TYPE GB_get_requested_undo_type(GBDATA *gb_main);
GB_ERROR GB_undo(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT;

inline bool inlined_function(char *bla) {
    return bla;
}

/* adquery.cxx */
GBDATA *GB_find_sub_by_quark(GBDATA *father, GBQUARK key_quark, GBDATA *after, size_t skip_over);
GBDATA *GB_find(GBDATA *gbd, const char *key, GB_SEARCH_TYPE gbs);
GBDATA *GB_find_string(GBDATA *gbd, const char *key, const char *str, GB_CASE case_sens, GB_SEARCH_TYPE gbs);
char *GB_command_interpreter(GBDATA *gb_main, const char *str, const char *commands, GBDATA *gbd, const char *default_tree_name);

// comment with { (comments are ignored)

/* adsocket.cxx */
char *GB_read_fp(FILE *in);
GB_ULONG GB_time_of_day(void);
void GB_split_full_path(const char *fullpath, char **res_dir, char **res_fullname, char **res_name_only, char **res_suffix);

// comment with }

#ifdef UNIT_TESTS
#define TEST_SERVER_ID (-666)
#define TEST_GENESERVER_ID (-667)
#endif

typedef int something;

/* arbdb.cxx */
double GB_atof(const char *str);
GB_BUFFER GB_give_buffer(size_t size);
void GB_atexit(void (*exitfun)());
GB_TYPES GB_read_type(GBDATA *gbd);
GBQUARK GB_find_existing_quark(GBDATA *gbd, const char *key);
GBDATA *GB_create(GBDATA *father, const char *key, GB_TYPES type);

#else
#error ad_prot.h included twice
#endif /* AD_PROT_H */
/* ARB toolkit.
 *
 * This file is generated by aisc_mkpt.
 * Any changes you make here will be overwritten later!
 */

#ifndef AD_T_PROT_H
#define AD_T_PROT_H

/* define ARB attributes: */
#ifndef ATTRIBUTES_H
# include <attributes.h>
#endif

GB_TYPES GBT_get_type_of_changekey(GBDATA *gb_main, const char *field_name, const char *change_key_path);
GB_ERROR GBT_write_sequence(GBDATA *gb_data, const char *ali_name, long ali_len, const char *sequence);

#else
#error ad_t_prot.h included twice
#endif /* AD_T_PROT_H */
