From: Adam Dickmeiss Date: Thu, 31 May 2007 09:45:14 +0000 (+0000) Subject: Fixed bug #1151: Doc's don't reflect new oid layout. Current backend.h X-Git-Tag: YAZ.3.0.10~69 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=eede2a3b7257fc9a510471c2e9c52176c1444362;p=yaz-moved-to-github.git Fixed bug #1151: Doc's don't reflect new oid layout. Current backend.h structs copied into synopsys sections and minor wording changes about OIDs were changed. --- diff --git a/doc/frontend.xml b/doc/frontend.xml index 14a564b..3ba20b2 100644 --- a/doc/frontend.xml +++ b/doc/frontend.xml @@ -1,4 +1,4 @@ - + Generic server Introduction @@ -348,37 +348,75 @@ bend_initresult (*bend_init)(bend_initrequest *r); typedef struct bend_initrequest { - Z_IdAuthentication *auth; - ODR stream; /* encoding stream */ - ODR print; /* printing stream */ - Z_ReferenceId *referenceId;/* reference ID */ - char *peer_name; /* dns host of peer (client) */ + /** \brief user/name/password to be read */ + Z_IdAuthentication *auth; + /** \brief encoding stream (for results) */ + ODR stream; + /** \brief printing stream */ + ODR print; + /** \brief decoding stream (use stream for results) */ + ODR decode; + /** \brief reference ID */ + Z_ReferenceId *referenceId; + /** \brief peer address of client */ + char *peer_name; + + /** \brief character set and language negotiation + + 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 + + This is NULL by default. It should be set to the native character + set that the backend assumes for query terms */ + char *query_charset; + + /** \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). + */ + int records_in_same_charset; char *implementation_id; char *implementation_name; char *implementation_version; - int (*bend_sort) (void *handle, bend_sort_rr *rr); - int (*bend_search) (void *handle, bend_search_rr *rr); - int (*bend_fetch) (void *handle, bend_fetch_rr *rr); - int (*bend_present) (void *handle, bend_present_rr *rr); + + /** \brief Z39.50 sort handler */ + int (*bend_sort)(void *handle, bend_sort_rr *rr); + /** \brief SRU/Z39.50 search handler */ + int (*bend_search)(void *handle, bend_search_rr *rr); + /** \brief SRU/Z39.50 fetch handler */ + int (*bend_fetch)(void *handle, bend_fetch_rr *rr); + /** \brief SRU/Z39.50 present handler */ + int (*bend_present)(void *handle, bend_present_rr *rr); + /** \brief Z39.50 extended services handler */ int (*bend_esrequest) (void *handle, bend_esrequest_rr *rr); + /** \brief Z39.50 delete result set handler */ int (*bend_delete)(void *handle, bend_delete_rr *rr); + /** \brief Z39.50 scan handler */ int (*bend_scan)(void *handle, bend_scan_rr *rr); + /** \brief Z39.50 segment facility handler */ int (*bend_segment)(void *handle, bend_segment_rr *rr); - - ODR decode; /* decoding stream */ - /* character set and language negotiation - see include/yaz/z-charneg.h */ - Z_CharSetandLanguageNegotiation *charneg_request; - Z_External *charneg_response; - int (*bend_srw_explain)(void *handle, bend_explain_rr *rr); + /** \brief SRU explain handler */ + int (*bend_explain)(void *handle, bend_explain_rr *rr); + /** \brief SRU scan handler */ int (*bend_srw_scan)(void *handle, bend_scan_rr *rr); + /** \brief SRU record update handler */ + int (*bend_srw_update)(void *handle, bend_update_rr *rr); + } bend_initrequest; typedef struct bend_initresult { - int errcode; /* 0==OK */ - char *errstring; /* system error string or NULL */ - void *handle; /* private handle to the backend module */ + int errcode; /* 0==OK */ + char *errstring; /* system error string or NULL */ + void *handle; /* private handle to the backend module */ } bend_initresult; @@ -458,7 +496,12 @@ typedef struct { int hits; /* number of hits */ int errcode; /* 0==OK */ char *errstring; /* system error string or NULL */ - Z_OtherInformation *search_info; + Z_OtherInformation *search_info; /* additional search info */ + char *srw_sortKeys; /* holds SRU/SRW sortKeys info */ + char *srw_setname; /* holds SRU/SRW generated resultsetID */ + 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 */ } bend_search_rr; @@ -520,8 +563,7 @@ typedef struct bend_fetch_rr { char *setname; /* set name */ int number; /* record number */ Z_ReferenceId *referenceId;/* reference ID */ - oid_value request_format; /* One of the CLASS_RECSYN members */ - int *request_format_raw; /* same as above (raw 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 */ @@ -530,8 +572,7 @@ typedef struct bend_fetch_rr { int len; /* length of record or -1 if structured */ char *record; /* record */ int last_in_set; /* is it? */ - oid_value output_format; /* format */ - int *output_format_raw; /* used instead of above if not-null */ + Odr_oid *output_format; /* response format/syntax (OID) */ int errcode; /* 0==success */ char *errstring; /* system error string or NULL */ int surrogate_flag; /* surrogate diagnostic */ @@ -549,10 +590,10 @@ typedef struct bend_fetch_rr { being the first record in the set). The format field is the record format requested by the client (See ). - The value VAL_NONE indicates that the client did - not request a specific format. The stream argument - is an &odr; stream which should be used for - allocating space for structured data records. + A value of NULL for format indicates that the + client did not request a specific format. + The stream argument is an &odr; stream which + should be used for allocating space for structured data records. The stream will be reset when all records have been assembled, and the response package has been transmitted. For unstructured data, the backend is responsible for maintaining a @@ -562,8 +603,7 @@ typedef struct bend_fetch_rr { If a SRU SearchRetrieveRequest is received by the frontend server, the referenceId is NULL and the - request_format (transfer syntax) is XML (OID name - VAL_TEXT_XML). + format (transfer syntax) is the OID for XML. The schema for SRU is stored in both the Z_RecordComposition structure and schema (simple string). @@ -618,10 +658,10 @@ typedef struct { char *setname; /* set name */ int start; int number; /* record number */ - oid_value format; /* One of the CLASS_RECSYN members */ + Odr_oid *format; /* format, transfer syntax (OID) */ Z_ReferenceId *referenceId;/* reference ID */ Z_RecordComposition *comp; /* Formatting instructions */ - ODR stream; /* encoding stream */ + ODR stream; /* encoding stream - memory source if required */ ODR print; /* printing stream */ bend_request request; bend_association association; @@ -692,7 +732,7 @@ typedef struct bend_delete_rr { -int (*bend_delete)(void *handle, bend_delete_rr *rr); +int (*bend_scan)(void *handle, bend_scan_rr *rr); typedef enum { BEND_SCAN_SUCCESS, /* ok */ @@ -700,9 +740,9 @@ typedef enum { } bend_scan_status; typedef struct bend_scan_rr { - int num_bases; /* number of elements in database list */ + int num_bases; /* number of elements in databaselist */ char **basenames; /* databases to search */ - oid_value attributeset; + Odr_oid *attributeset; Z_ReferenceId *referenceId; /* reference ID */ Z_AttributesPlusTerm *term; ODR stream; /* encoding stream - memory source if required */ @@ -712,11 +752,14 @@ typedef struct bend_scan_rr { 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 + to allocate this. Size of entries is num_entries (see above) */ struct scan_entry *entries; bend_scan_status status; int errcode; char *errstring; char *scanClause; /* CQL scan clause */ + char *setname; /* Scan in result set (NULL if omitted) */ } bend_scan_rr;