X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=include%2Fyazproxy%2Fproxy.h;h=854191c430e81ae611e70fa9c258a4778c1e5182;hp=95dc385ef903440da9993c8de74789c774a7db62;hb=2faeba3f61ac423a9c71222e9a15377724d8f0fa;hpb=e9a5a9feeb12335c668b73dbb6385908be6806f1 diff --git a/include/yazproxy/proxy.h b/include/yazproxy/proxy.h index 95dc385..854191c 100644 --- a/include/yazproxy/proxy.h +++ b/include/yazproxy/proxy.h @@ -1,4 +1,4 @@ -/* $Id: proxy.h,v 1.13 2005-02-21 14:27:32 adam Exp $ +/* $Id: proxy.h,v 1.16 2005-05-18 20:15:22 adam Exp $ Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -41,6 +41,12 @@ class Yaz_Proxy; class Yaz_usemarcon; class Yaz_ProxyConfig; class Yaz_ProxyClient; +class Yaz_CharsetConverter; + +enum YAZ_Proxy_MARCXML_mode { + none, + marcxml, +}; /// Information Retrieval Proxy Server. class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { @@ -93,6 +99,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Z_APDU *handle_query_validation(Z_APDU *apdu); Z_APDU *handle_query_transformation(Z_APDU *apdu); + Z_APDU *handle_target_charset_conversion(Z_APDU *apdu); Z_APDU *handle_syntax_validation(Z_APDU *apdu); @@ -103,7 +110,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Yaz_ProxyConfig *check_reconfigure(); int m_request_no; int m_invalid_session; - int m_marcxml_flag; + YAZ_Proxy_MARCXML_mode m_marcxml_mode; void *m_stylesheet_xsp; // Really libxslt's xsltStylesheetPtr int m_stylesheet_offset; Z_APDU *m_stylesheet_apdu; @@ -114,6 +121,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { int m_frontend_type; void convert_to_frontend_type(Z_NamePlusRecordList *p); void convert_to_marcxml(Z_NamePlusRecordList *p, const char *charset); + void convert_records_charset(Z_NamePlusRecordList *p, const char *charset); int convert_xsl(Z_NamePlusRecordList *p, Z_APDU *apdu); void convert_xsl_delay(); Z_APDU *m_initRequest_apdu; @@ -164,6 +172,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { char *m_usemarcon_ini_stage1; char *m_usemarcon_ini_stage2; Yaz_usemarcon *m_usemarcon; + Yaz_CharsetConverter *m_charset_converter; public: Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable, Yaz_Proxy *parent = 0); @@ -181,6 +190,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_negotiation (const char *charset, const char *lang); + void set_target_charset(const char *charset); 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; };