/* Defines for the high level API multiuser client/server version of
   Bbuuzzb. Rick Smereka, Copyright (C) 1997-2004.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, get a copy via the Internet at
   http://gnu.org/copyleft/gpl.html or write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston,
   MA 02111-1307 USA

   You can contact the author via email at rsmereka@future-lab.com

   Original QNX version Feb/97, Rick Smereka

   Complete re-write for new API. Dec/97, Rick Smereka

   Added detection of C++ compiler with instructions not to
   mangle the function names. Added prototype for function
   'db_set_pos'. Nov/98, Rick Smereka

   Ported to Windows 32bit under Code Warrior V4. Dec/98, Rick Smereka

   Ported to HP-UX under GNU C 2.8.1.
   Jan/99, Rick Smereka

   Added prototypes 'db_get_tmp_path' and 'db_get_error_log',
   moved these functions to 'dbcscfg.c' and renamed them.
   Feb/99, Rick Smereka

   Ported to Red Hat Linux 5.2, Jul/99, Rick Smereka
   
   Added prototype 'db_version' and 'db_get_active'. Apr/2000,
   Rick Smereka

   Added prototype 'db_get_open_table_list'. Jun/2001,
   Rick Smereka

   Modified for use with both sockets and QNX message passing.
   Oct/2001, Rick Smereka

   Added prototypes 'db_get_nsubfields', 'db_get_subfield_size',
   'db_get_subfield', 'db_put_subfield', 'db_get_nsubsubfields',
   'db_get_subsubfield_size', 'db_get_subsubfield' and
   'db_put_subsubfield'. Jan/2002, Rick Smereka

   Added prototype 'db_replicate_update'. Mar/2002,
   Rick Smereka

   Added prototype 'db_delete_table'. May/2002, Rick Smereka

   Added prototypes 'db_clear_table' and 'db_copy_table. 
   Jun/2002, Rick Smereka

   Added prototype 'db_get_catalog_list'. Added parameter
   to the function 'db_get_open_table_list'. Aug/2002, 
   Rick Smereka

   Added prototypes 'db_get_sort_max_mem', 'db_set_sort_max_mem',
   'db_get_sort_max_open_bin' and 'db_set_sort_max_open_bin'.
   Ported to Debian Linux. Nov/2002, Rick Smereka

   Added prototypes 'db_delete_field', 'db_delete_subfield' and
   'db_delete_subsubfield'. Mar/2003, Rick Smereka

   Added prototpes 'db_trans_num' and 'db_connect_num'.
   Jun/2003, Rick Smereka

   Added parameter to the prototypes 'db_count' and
   'db_get_rec_count'. Feb/2004, Rick Smereka

   Added prototypes 'db_get_autopack' and 'db_set_autopack'.
   Mar/2004, Rick Smereka */

#ifdef __cplusplus
extern "C"
{
#endif

int db_initialize(void);
int db_open(char *, int *);
int db_close(int);
int db_next(int);
int db_top(int);
int db_get_rec(int, char *);
int db_get_rec_size(int, int *);
int db_get_field_size(int, int, int *);
int db_get_subfield_size(int, int, int, int *);
int db_get_subsubfield_size(int, int, int, int, int *);
int db_get_field(int, int, char *);
int db_get_subfield(int, int, int, char *);
int db_get_subsubfield(int, int, int, int, char *);
int db_goto(int, long);
int db_count(int, long *, long *);
int db_put_field(int, int, char *);
int db_put_subfield(int, int, int, char *);
int db_put_subsubfield(int, int, int, int, char *);
int db_write(int);
int db_delete(int);
int db_get_delete_flag(int, int *);
int db_set_delete_flag(int, int);
int db_pack(int);
int db_find(int, int, char *, int *);
int db_find_field(int, int, char *, int);
int db_find_part(int, int, char *, int *);
int db_find_field_part(int, int, char *, int);
int db_get_nfields(int, int *);
int db_get_nsubfields(int, int, int *);
int db_get_nsubsubfields(int, int, int, int *);
int db_get_rec_num(int, long *);
int db_get_pos(int, long *);
int db_set_pos(int, long);
int db_sort(int, char *);
int db_get_sort_max_mem(int, long *);
int db_set_sort_max_mem(int, long);
int db_get_sort_max_open_bin(int, int *);
int db_set_sort_max_open_bin(int, int);
int db_get_change_rec_flag(int, int *);
int db_set_change_rec_flag(int, int);
int db_get_enf_change_rec_flag(int, int *);
int db_set_enf_change_rec_flag(int, int);
int db_get_autopack(int, int *);
int db_set_autopack(int, int);
int db_get_rec_count(int, long *, long *);
int db_new(int);
int db_get_is_table_locked(int, int *);
int db_set_is_table_locked(int, int);
int db_new_table(char *, int *);
int db_version(char *);
int db_get_open_table_list(char *, char *);
int db_delete_table(char *);
int db_exist(char *, int *);
int db_clear_table(char *);
int db_copy_table(int, int);
int db_get_catalog_list(char *, char *);
int db_delete_field(int, int);
int db_delete_subfield(int, int, int);
int db_delete_subsubfield(int, int, int, int);
int db_trans_num(long *);
int db_connect_num(int *);
int db_cs_int(struct dbeng_send_message *, int *);
int db_cs_long(struct dbeng_send_message *, long *);
int db_cs_code(struct dbeng_send_message *);
int db_cs_char(struct dbeng_send_message *, char *);

#ifdef IPC_TCP
void db_get_active(char *, int *);
int db_replicate_update(void);
#endif

#ifdef __cplusplus
}
#endif
