X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=include%2Fyazproxy%2Fproxy.h;h=9ddd94f6a291d24d46b260cd76e2392fa7c2f4b3;hp=2936c1a3cd99af9924436b6f842087a5b3f099f6;hb=af0d95244ac549130bd45c54620df98f636984db;hpb=e456a212f9d27db9cc005ffa7f9783ccca3232c2 diff --git a/include/yazproxy/proxy.h b/include/yazproxy/proxy.h index 2936c1a..9ddd94f 100644 --- a/include/yazproxy/proxy.h +++ b/include/yazproxy/proxy.h @@ -1,4 +1,4 @@ -/* $Id: proxy.h,v 1.4 2004-04-22 07:46:21 adam Exp $ +/* $Id: proxy.h,v 1.9 2004-12-03 14:28:18 adam Exp $ Copyright (c) 1998-2004, Index Data. This file is part of the yaz-proxy. @@ -19,6 +19,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef YAZ_PROXY_H_INCLUDED +#define YAZ_PROXY_H_INCLUDED + #include #include #include @@ -37,6 +40,7 @@ class Yaz_Proxy; struct Yaz_RecordCache_Entry; class Yaz_ProxyConfigP; +class Yaz_usemarcon; class YAZ_EXPORT Yaz_ProxyConfig { public: @@ -56,7 +60,8 @@ public: int *keepalive_limit_bw, int *keepalive_limit_pdu, int *pre_init, - const char **cql2rpn); + const char **cql2rpn, + const char **authentication); void get_generic_info(int *log_mask, int *max_clients); @@ -66,15 +71,20 @@ public: int *max_clients, int *keepalive_limit_bw, int *keepalive_limit_pdu, int *pre_init, - const char **cql2rpn); + const char **cql2rpn, + const char **authentication); 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 *get_explain(ODR odr, const char *name, const char *db, - int *len); -private: + char **addinfo, char **stylesheet, char **schema, + char **backend_type, char **backend_charset, + char **usemarcon_ini_stage1, char **usemarcon_ini_stage2 + ); + 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); + private: void operator=(const Yaz_ProxyConfig &conf); class Yaz_ProxyConfigP *m_cp; }; @@ -157,9 +167,10 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { char *get_proxy(Z_OtherInformation **otherInfo); 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); Z_APDU *result_set_optimize(Z_APDU *apdu); void shutdown(); - + void releaseClient(); Yaz_ProxyClient *m_client; IYaz_PDU_Observable *m_PDU_Observable; Yaz_ProxyClient *m_clientPool; @@ -208,7 +219,11 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { Z_APDU *m_stylesheet_apdu; Z_NamePlusRecordList *m_stylesheet_nprl; char *m_schema; - void convert_to_marcxml(Z_NamePlusRecordList *p); + char *m_backend_type; + char *m_backend_charset; + int m_frontend_type; + void convert_to_frontend_type(Z_NamePlusRecordList *p); + void convert_to_marcxml(Z_NamePlusRecordList *p, const char *charset); int convert_xsl(Z_NamePlusRecordList *p, Z_APDU *apdu); void convert_xsl_delay(); Z_APDU *m_initRequest_apdu; @@ -250,6 +265,9 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { int m_lo_fd[NO_SPARE_SOLARIS_FD]; void low_socket_open(); void low_socket_close(); + char *m_usemarcon_ini_stage1; + char *m_usemarcon_ini_stage2; + Yaz_usemarcon *m_usemarcon; public: Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable, Yaz_Proxy *parent = 0); @@ -282,3 +300,4 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { int handle_init_response_for_invalid_session(Z_APDU *apdu); }; +#endif