From 5facb03a150bfa47ef284981c15d4a471cc3f510 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Fri, 17 Feb 1995 13:43:11 +0000 Subject: [PATCH] Work on present --- include/zaccess.h | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/include/zaccess.h b/include/zaccess.h index fbcb22f..4815669 100644 --- a/include/zaccess.h +++ b/include/zaccess.h @@ -13,34 +13,49 @@ typedef struct zass *ZASS; +enum present_status +{ + ZASS_PRES_SUCCESS, /* all records available */ + ZASS_PRES_PARTIAL_1, /* subset only 'cause of access control */ + ZASS_PRES_PARTIAL_2, /* subset 'cause of max msg size constraints*/ + ZASS_PRES_PARTIAL_3, /* subset 'cause of resource control org */ + ZASS_PRES_PARTIAL_4, /* subset 'cause of resource control trg */ + ZASS_PRES_FAILURE /* check errcode */ +}; + typedef struct zass_searchent { int num; /* # hits */ - int status; /* status - boolean */ - int setstatus; /* consult if !status. Value according to Z proto */ + int status; /* status - boolean - qualified by setstatus */ + enum present_status setstatus; /* consult if status. Value according to Z proto */ - /* These two field provide info from a diagnostic rec returned with + /* These two fields provide info from a diagnostic rec returned with response */ int errcode; /* bib 1 assumed here. -1 if none provided */ char errstring[512]; /* Additional info from diagnostic rec, or "" */ } zass_searchent; -typedef struct zass_records +typedef struct zass_record { - int which; /* 0 = diagnostic, others according to z3950v3 */ + enum + { + ZASS_REC_DIAG=0, + ZASS_REC_USMARC=10 + } which; /* 0 = diagnostic, others according to z3950v3 */ char *record; /* marc or other */ int errcode; /* Only valid if which == 0 */ - char addinfo[200]; -} zass_records; + char errstring[200]; + + struct zass_record *next; +} zass_record; typedef struct zass_presentent { int num; /* # of recs returned */ int nextpos; /* next resultset position. 1==first record */ - int presentstatus; /* status of set */ - int num_records; - zass_records *records; + enum present_status presentstatus; /* status of set */ + struct zass_records *records; } zass_presentent; ZASS zass_open(char *host, int port); -- 1.7.10.4