X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fbackend.h;h=5eac060495181fe3c62f4487e893bb18ebc413cb;hp=d2847f068d625a6c2a4795a08e67b3755a350ba3;hb=4adcf3fecf9b8d2880ee0b671c9f9d20da18ca49;hpb=e46a29eb6ea3375d808cdb249bbcd4a2bc2bb427 diff --git a/include/yaz/backend.h b/include/yaz/backend.h index d2847f0..5eac060 100644 --- a/include/yaz/backend.h +++ b/include/yaz/backend.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1995-2007, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 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: @@ -24,7 +24,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: backend.h,v 1.46 2007-05-02 12:37:15 adam Exp $ */ /** * \file backend.h @@ -62,7 +61,7 @@ typedef struct { bend_request request; bend_association association; int *fd; - int hits; /* number of hits */ + Odr_int hits; /* number of hits */ int errcode; /* 0==OK */ char *errstring; /* system error string or NULL */ Z_OtherInformation *search_info; /* additional search info */ @@ -71,6 +70,8 @@ typedef struct { int *srw_setnameIdleTime; /* holds SRU/SRW life-time */ int estimated_hit_count; /* if hit count is estimated */ int partial_resultset; /* if result set is partial */ + Z_SRW_extra_arg *extra_args; /* extra URL arguments */ + char *extra_response_data; /* extra XML response. */ } bend_search_rr; /** \brief Information for present handler. Does not replace bend_fetch. */ @@ -78,7 +79,7 @@ typedef struct { char *setname; /* set name */ int start; int number; /* record number */ - int *format; /* format, transfer syntax (OID) */ + Odr_oid *format; /* format, transfer syntax (OID) */ Z_ReferenceId *referenceId;/* reference ID */ Z_RecordComposition *comp; /* Formatting instructions */ ODR stream; /* encoding stream - memory source if required */ @@ -86,7 +87,6 @@ typedef struct { bend_request request; bend_association association; - int hits; /* number of hits */ int errcode; /* 0==OK */ char *errstring; /* system error string or NULL */ } bend_present_rr; @@ -96,7 +96,7 @@ typedef struct bend_fetch_rr { char *setname; /* set name */ int number; /* record number */ Z_ReferenceId *referenceId;/* reference ID */ - int *request_format; /* format, transfer syntax (OID) */ + Odr_oid *request_format; /* format, transfer syntax (OID) */ Z_RecordComposition *comp; /* Formatting instructions */ ODR stream; /* encoding stream - memory source if req */ ODR print; /* printing stream */ @@ -105,7 +105,7 @@ typedef struct bend_fetch_rr { int len; /* length of record or -1 if structured */ char *record; /* record */ int last_in_set; /* is it? */ - int *output_format; /* response format/syntax (OID) */ + Odr_oid *output_format; /* response format/syntax (OID) */ int errcode; /* 0==success */ char *errstring; /* system error string or NULL */ int surrogate_flag; /* surrogate diagnostic */ @@ -115,7 +115,7 @@ typedef struct bend_fetch_rr { /** \brief Information for scan entry */ struct scan_entry { char *term; /* the returned scan term */ - int occurrences; /* no of occurrences or -1 if error (see below) */ + Odr_int occurrences;/* no of occurrences or -1 if error (see below) */ int errcode; /* Bib-1 diagnostic code; only used when occur.= -1 */ char *errstring; /* Additional string */ char *display_term; @@ -130,14 +130,14 @@ typedef enum { typedef struct bend_scan_rr { int num_bases; /* number of elements in databaselist */ char **basenames; /* databases to search */ - int *attributeset; + Odr_oid *attributeset; Z_ReferenceId *referenceId; /* reference ID */ Z_AttributesPlusTerm *term; ODR stream; /* encoding stream - memory source if required */ ODR print; /* printing stream */ - int *step_size; /* step size */ - int term_position; /* desired index of term in result list/returned */ + Odr_int *step_size; /* step size */ + Odr_int term_position; /* desired index of term in result list/returned */ int num_entries; /* number of entries requested/returned */ /* scan term entries. The called handler does not have @@ -147,6 +147,7 @@ typedef struct bend_scan_rr { int errcode; char *errstring; char *scanClause; /* CQL scan clause */ + char *setname; /* Scan in result set (NULL if omitted) */ } bend_scan_rr; /** \brief Information for SRU record update handler */ @@ -178,8 +179,8 @@ typedef struct bend_delete_rr { int num_setnames; char **setnames; Z_ReferenceId *referenceId; - int delete_status; /* status for the whole operation */ - int *statuses; /* status each set - indexed as setnames */ + int delete_status; /* status for the whole operation */ + Odr_int *statuses; /* status each set - indexed as setnames */ ODR stream; ODR print; } bend_delete_rr; @@ -308,6 +309,8 @@ typedef struct bend_initrequest /** \brief SRU record update handler */ int (*bend_srw_update)(void *handle, bend_update_rr *rr); + /** \brief whether named result sets are supported (0=disable, 1=enable) */ + int named_result_sets; } bend_initrequest; /** \brief result for init handler (must be filled by handler) */ @@ -373,8 +376,6 @@ YAZ_EXPORT int statserv_main( int argc, char **argv, bend_initresult *(*bend_init)(bend_initrequest *r), void (*bend_close)(void *handle)); -YAZ_EXPORT int statserv_start(int argc, char **argv); -YAZ_EXPORT void statserv_closedown(void); YAZ_EXPORT statserv_options_block *statserv_getcontrol(void); YAZ_EXPORT void statserv_setcontrol(statserv_options_block *block); YAZ_EXPORT int check_ip_tcpd(void *cd, const char *addr, int len, int type); @@ -387,6 +388,7 @@ YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab