4 #define ZASS_DEBUG GW_LOG_DEBUGN(9)
5 #define ZASS_TYPE "zass"
7 #define ZASS_ID "EUROPAGATE/DTB/ID"
8 #define ZASS_NAME "EUROPAGATE E-mail/Z39.50 gateway"
9 #define ZASS_VERSION "development 0.1"
11 #define ZASS_MAXRECORDSIZE 10000
12 #define ZASS_PREFERREDMESSAGESIZE 10000
14 typedef struct zass *ZASS;
18 ZASS_PRES_SUCCESS, /* all records available */
19 ZASS_PRES_PARTIAL_1, /* subset only 'cause of access control */
20 ZASS_PRES_PARTIAL_2, /* subset 'cause of max msg size constraints*/
21 ZASS_PRES_PARTIAL_3, /* subset 'cause of resource control org */
22 ZASS_PRES_PARTIAL_4, /* subset 'cause of resource control trg */
23 ZASS_PRES_FAILURE /* check errcode */
26 typedef struct zass_searchent
29 int status; /* status - boolean - qualified by setstatus */
30 enum present_status setstatus; /* consult if status. Value according to Z proto */
32 /* These two fields provide info from a diagnostic rec returned with
34 int errcode; /* bib 1 assumed here. -1 if none provided */
35 char errstring[512]; /* Additional info from diagnostic rec, or "" */
38 typedef struct zass_record
44 } which; /* 0 = diagnostic, others according to z3950v3 */
45 char *record; /* marc or other */
47 int errcode; /* Only valid if which == 0 */
50 struct zass_record *next;
53 typedef struct zass_presentent
55 int num; /* # of recs returned */
56 int nextpos; /* next resultset position. 1==first record */
57 enum present_status presentstatus; /* status of set */
58 struct zass_records *records;
61 ZASS zass_open(char *host, int port);
62 const struct zass_searchent *zass_search(ZASS a, struct ccl_rpn_node *query,
63 char *resname, char *databases);
64 const struct zass_presentent *zass_present(ZASS a, char *resname, int start,