First kick.
[egate.git] / include / zaccess.h
1 #ifndef ZACCESS_H
2 #define ZACCESS_H
3
4 #define ZASS_DEBUG GW_LOG_DEBUGN(9)
5 #define ZASS_TYPE "zass"
6
7 #define ZASS_ID "EUROPAGATE/DTB/ID"
8 #define ZASS_NAME "EUROPAGATE E-mail/Z39.50 gateway"
9 #define ZASS_VERSION "development 0.1"
10
11 #define ZASS_MAXRECORDSIZE  10000
12 #define ZASS_PREFERREDMESSAGESIZE 10000
13
14 typedef struct zass *ZASS;
15
16 typedef struct zass_searchent
17 {
18     int num;      /* # hits */
19     int status;   /* status - boolean */
20     int setstatus; /* consult if !status. Value according to Z proto */
21
22     /* These two field provide info from a diagnostic rec returned with 
23        response */
24     int errcode;           /* bib 1 assumed here. -1 if none provided */
25     char errstring[512];   /* Additional info from diagnostic rec, or "" */
26 } zass_searchent;
27
28 typedef struct zass_records
29 {
30     int which;      /* 0 = diagnostic, others according to z3950v3 */
31     char *record;   /* marc or other */
32
33     int errcode;    /* Only valid if which == 0 */
34     char addinfo[200];
35 } zass_records;
36
37 typedef struct zass_presentent
38 {
39     int num;             /* # of recs returned */
40     int nextpos;         /* next resultset position. 1==first record */
41     int presentstatus;   /* status of set */
42     int num_records;
43     zass_records *records;
44 } zass_presentent;
45
46 #endif