X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fbackend.h;h=84df83bbb2aed2a66dc323b7aae22b2dcd035f35;hp=c781fa3ea9307415e6ff26dca32a9e256fa9368c;hb=6ac71490dcd57707b2f5e77abfe3ca4e0944cc68;hpb=120720e0d9c4fb0bcb2dae04d925ce03c64ede68 diff --git a/include/yaz/backend.h b/include/yaz/backend.h index c781fa3..84df83b 100644 --- a/include/yaz/backend.h +++ b/include/yaz/backend.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data. + * Copyright (C) 1995-2013 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** +/** * \file backend.h * \brief Header for GFS * @@ -42,7 +42,7 @@ #include YAZ_BEGIN_CDECL - + typedef struct association *bend_association; /** \brief Information for Z39.50/SRU search handler @@ -62,7 +62,7 @@ typedef struct { ODR decode; /**< decode stream (input) */ ODR print; /**< print stream (input) */ - bend_association association; /**< GFS association / sesssion (input) */ + bend_association association; /**< GFS association / session (input) */ Odr_int hits; /**< hits (output) */ int errcode; /**< Diagnostic code / 0 for no error (output) */ char *errstring; /**< Additional info (output) */ @@ -75,6 +75,7 @@ typedef struct { Z_SRW_extra_arg *extra_args; /**< SRU extra request parameters (input) */ char *extra_response_data; /**< SRW extra XML response (output) */ Z_OtherInformation *search_input; /**< extra search info request (input) */ + Odr_int present_number; /**< piggyback present number (>0) (input) */ } bend_search_rr; /** \brief Information for present handler. Does not replace bend_fetch. */ @@ -87,7 +88,7 @@ typedef struct { Z_RecordComposition *comp; /**< Formatting instructions (input) */ ODR stream; /**< encoding stream (input) */ ODR print; /**< printing stream (input) */ - bend_association association; /**< GFS association / sesssion (input) */ + bend_association association; /**< GFS association / session (input) */ int errcode; /**< Diagnostic code / 0 for no error (output) */ char *errstring; /**< Additional info (output) */ @@ -150,6 +151,7 @@ typedef struct bend_scan_rr { char *errstring; char *scanClause; /**< CQL scan clause */ char *setname; /**< Scan in result set (NULL if omitted) */ + char *extra_response_data; /**< SRW extra XML response (output) */ } bend_scan_rr; /** \brief Information for SRU record update handler */ @@ -184,7 +186,7 @@ typedef struct bend_delete_rr { int delete_status; /**< status for the whole operation */ int *statuses; /**< status each set - indexed as setnames */ ODR stream; - ODR print; + ODR print; } bend_delete_rr; /** \brief Information for Z39.50 sort handler */ @@ -208,7 +210,7 @@ typedef struct bend_esrequest_rr { int ItemNo; Z_ExtendedServicesRequest *esr; - + ODR stream; /* encoding stream */ ODR decode; /* decoding stream */ ODR print; /* printing stream */ @@ -243,40 +245,40 @@ typedef struct { This includes both request information (to be read) and response information which should be -set by the bend_init handler +set by the bend_init handler */ typedef struct bend_initrequest { /** \brief user/name/password to be read */ - Z_IdAuthentication *auth; + Z_IdAuthentication *auth; /** \brief encoding stream (for results) */ ODR stream; /** \brief printing stream */ ODR print; /** \brief decoding stream (use stream for results) */ - ODR decode; + ODR decode; /** \brief reference ID */ Z_ReferenceId *referenceId; /** \brief peer address of client */ - char *peer_name; - - /** \brief character set and language negotiation + char *peer_name; + + /** \brief character set and language negotiation - see include/yaz/z-charneg.h + see include/yaz/z-charneg.h */ Z_CharSetandLanguageNegotiation *charneg_request; /** \brief character negotiation response */ Z_External *charneg_response; - /** \brief character set (encoding) for query terms - + /** \brief character set (encoding) for query terms + This is NULL by default. It should be set to the native character set that the backend assumes for query terms */ - char *query_charset; + char *query_charset; + + /** \brief whehter query_charset also applies to recors - /** \brief whehter query_charset also applies to recors - Is 0 (No) by default. Set to 1 (yes) if records is in the same character set as queries. If in doubt, use 0 (No). */ @@ -330,7 +332,7 @@ typedef struct statserv_options_block char apdufile[ODR_MAXNAME+1]; /**< file for pretty-printed PDUs */ char logfile[ODR_MAXNAME+1]; /**< file for diagnostic output */ char default_listen[1024]; /**< 0 == no default listen */ - enum oid_proto default_proto; /**< PROTO_SR or PROTO_Z3950 */ + enum oid_proto default_proto; /**< PROTO_SR or PROTO_Z3950 */ int idle_timeout; /**< how many minutes to wait before closing */ int maxrecordsize; /**< maximum value for negotiation */ char configname[ODR_MAXNAME+1]; /**< given to the backend in bend_init */ @@ -358,6 +360,7 @@ typedef struct statserv_options_block int background; /**< auto daemon */ char cert_fname[128]; /**< SSL certificate fname */ char xml_config[128]; /**< XML config filename */ + int keepalive; /**< keep alive if HTTP 1.1 (default: 1) */ } statserv_options_block; YAZ_EXPORT int statserv_main(