X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=include%2Fyazproxy%2Fproxy.h;h=264aac52b81d0be31c43ad72a0ffa1219a29e7c6;hb=99e989d9eb24d417dec0f62dc6cb897961c659b2;hp=9ddd94f6a291d24d46b260cd76e2392fa7c2f4b3;hpb=af0d95244ac549130bd45c54620df98f636984db;p=yazproxy-moved-to-github.git diff --git a/include/yazproxy/proxy.h b/include/yazproxy/proxy.h index 9ddd94f..264aac5 100644 --- a/include/yazproxy/proxy.h +++ b/include/yazproxy/proxy.h @@ -1,5 +1,5 @@ -/* $Id: proxy.h,v 1.9 2004-12-03 14:28:18 adam Exp $ - Copyright (c) 1998-2004, Index Data. +/* $Id: proxy.h,v 1.12 2005-02-11 15:19:08 adam Exp $ + Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -61,7 +61,9 @@ public: int *keepalive_limit_pdu, int *pre_init, const char **cql2rpn, - const char **authentication); + const char **authentication, + const char **negotiation_charset, + const char **negotiation_lang); void get_generic_info(int *log_mask, int *max_clients); @@ -72,15 +74,20 @@ public: int *keepalive_limit_bw, int *keepalive_limit_pdu, int *pre_init, const char **cql2rpn, - const char **authentication); + const char **authentication, + const char **negotiation_charset, + const char **negotiation_lang); + const char *check_mime_type(const char *path); 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 **schema, char **backend_type, char **backend_charset, - char **usemarcon_ini_stage1, char **usemarcon_ini_stage2 - ); + char **usemarcon_ini_stage1, char **usemarcon_ini_stage2); + + int check_authentication(const char *user, const char *group, + const char *password); char *get_explain_doc(ODR odr, const char *name, const char *db, int *len); const char *get_explain_name(const char *db, const char **backend_db); @@ -165,6 +172,8 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { private: char *get_cookie(Z_OtherInformation **otherInfo); char *get_proxy(Z_OtherInformation **otherInfo); + void get_charset_and_lang_negotiation(Z_OtherInformation **otherInfo, + char **charstes, char **langs, int *selected); Yaz_ProxyClient *get_client(Z_APDU *apdu, const char *cookie, const char *proxy_host); void srw_get_client(const char *db, const char **backend_db); @@ -185,6 +194,8 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { char *m_proxyTarget; char *m_default_target; char *m_proxy_authentication; + char *m_proxy_negotiation_charset; + char *m_proxy_negotiation_lang; long m_seed; char *m_optimize; int m_session_no; // sequence for each client session @@ -200,6 +211,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Z_GDU *m_bw_hold_PDU; int m_max_record_retrieve; void handle_max_record_retrieve(Z_APDU *apdu); + int handle_authentication(Z_APDU *apdu); void display_diagrecs(Z_DiagRec **pp, int num); Z_Records *create_nonSurrogateDiagnostics(ODR o, int error, const char *addinfo); @@ -208,6 +220,9 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Z_APDU *handle_query_transformation(Z_APDU *apdu); Z_APDU *handle_syntax_validation(Z_APDU *apdu); + + void handle_charset_lang_negotiation(Z_APDU *apdu); + const char *load_balance(const char **url); int m_reconfig_flag; Yaz_ProxyConfig *check_reconfigure(); @@ -231,6 +246,11 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { int m_initRequest_maximumRecordSize; Z_Options *m_initRequest_options; Z_ProtocolVersion *m_initRequest_version; + char **m_initRequest_oi_negotiation_charsets; + int m_initRequest_oi_negotiation_num_charsets; + char **m_initRequest_oi_negotiation_langs; + int m_initRequest_oi_negotiation_num_langs; + int m_initRequest_oi_negotiation_selected; NMEM m_initRequest_mem; Z_APDU *m_apdu_invalid_session; NMEM m_mem_invalid_session; @@ -245,6 +265,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Z_APDU *m_s2z_present_apdu; char *m_s2z_stylesheet; char *m_soap_ns; + int file_access(Z_HTTP_Request *hreq); 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); @@ -285,6 +306,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { const char *option(const char *name, const char *value); void set_default_target(const char *target); void set_proxy_authentication (const char *auth); + void set_proxy_negotiation (const char *charset, const char *lang); char *get_proxy_target() { return m_proxyTarget; }; char *get_session_str() { return m_session_str; }; void set_max_clients(int m) { m_max_clients = m; };