X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fproxy.h;h=077a57dd6a9ceb3a47cd053a74706b800d2214d8;hb=1b73b30c27af204acc67f4d2deae1765fd3caf21;hp=8ed5473bee631b73c7591b423fb524903c6db015;hpb=265587c6b7c73ef7a502803b54395ef847eb03f2;p=yazpp-moved-to-github.git diff --git a/include/yaz++/proxy.h b/include/yaz++/proxy.h index 8ed5473..077a57d 100644 --- a/include/yaz++/proxy.h +++ b/include/yaz++/proxy.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 1998-2003, Index Data. + * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: proxy.h,v 1.25 2004-01-05 09:31:09 adam Exp $ + * $Id: proxy.h,v 1.34 2004-01-14 12:14:13 adam Exp $ */ #include @@ -59,14 +59,15 @@ public: int check_query(ODR odr, const char *name, Z_Query *query, char **addinfo); int check_syntax(ODR odr, const char *name, Odr_oid *syntax, Z_RecordComposition *comp, - char **addinfo, char **stylesheet); + char **addinfo, char **stylesheet, char **schema); char *get_explain(ODR odr, const char *name, const char *db, int *len); private: void operator=(const Yaz_ProxyConfig &conf); int mycmp(const char *hay, const char *item, size_t len); #if HAVE_XSLT - int check_esn(xmlNodePtr ptr, Z_RecordComposition *comp); + int check_schema(xmlNodePtr ptr, Z_RecordComposition *comp, + const char *schema_identifier); xmlDocPtr m_docPtr; xmlNodePtr m_proxyPtr; void return_target_info(xmlNodePtr ptr, const char **url, @@ -177,7 +178,8 @@ class YAZ_EXPORT Yaz_cql2rpn { Yaz_cql2rpn(); ~Yaz_cql2rpn(); void set_pqf_file(const char *fname); - int query_transform(const char *cql, Z_RPNQuery **rpnquery, ODR o); + int query_transform(const char *cql, Z_RPNQuery **rpnquery, ODR o, + char **addinfop); private: cql_transform_t m_transform; }; @@ -236,7 +238,8 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { int m_request_no; int m_invalid_session; int m_marcxml_flag; - char *m_stylesheet; + char *m_stylesheet_schema; + char *m_schema; void convert_to_marcxml(Z_NamePlusRecordList *p); void convert_xsl(Z_NamePlusRecordList *p); Z_APDU *m_initRequest_apdu; @@ -251,13 +254,14 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Z_APDU *m_s2z_init_apdu; Z_APDU *m_s2z_search_apdu; Z_APDU *m_s2z_present_apdu; + char *m_s2z_stylesheet; char *m_soap_ns; - int send_to_srw_client_error(int error); + int send_to_srw_client_error(int error, const char *add); int send_to_srw_client_ok(int hits, Z_Records *records, int start); int send_http_response(int code); int send_srw_response(Z_SRW_PDU *srw_pdu); - int send_srw_explain(); - + int send_srw_explain_response(Z_SRW_diagnostic *diagnostics, + int num_diagnostics); int z_to_srw_diag(ODR o, Z_SRW_searchRetrieveResponse *srw_res, Z_DefaultDiagFormat *ddf); int m_http_keepalive; @@ -279,6 +283,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { void failNotify(); void timeoutNotify(); void connectNotify(); + void markInvalid(); const char *option(const char *name, const char *value); void set_default_target(const char *target); void set_proxy_authentication (const char *auth);