X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fzaccess.h;h=4815669951973a8f191f6d2e8d56034e063001ca;hb=5facb03a150bfa47ef284981c15d4a471cc3f510;hp=fbcb22fb30eeb95ba70397c58f6de208e4508308;hpb=0886ad03a73988611a1d7c8bb7b65cc00dae89cf;p=egate.git 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);