-/* $Id: proxy.h,v 1.19 2005-06-08 13:29:03 adam Exp $
- Copyright (c) 1998-2005, Index Data.
+/* $Id: proxy.h,v 1.29 2006-03-30 10:35:15 adam Exp $
+ Copyright (c) 1998-2006, Index Data.
YAZ proxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
YAZ proxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
-#include <yaz++/socket-observer.h>
-#include <yaz++/z-assoc.h>
-#include <yaz++/z-query.h>
-#include <yaz++/z-databases.h>
-#include <yaz++/cql2rpn.h>
+#include <yazpp/socket-observer.h>
+#include <yazpp/z-assoc.h>
+#include <yazpp/z-query.h>
+#include <yazpp/z-databases.h>
+#include <yazpp/cql2rpn.h>
char *get_cookie(Z_OtherInformation **otherInfo);
char *get_proxy(Z_OtherInformation **otherInfo);
void get_charset_and_lang_negotiation(Z_OtherInformation **otherInfo,
char *get_cookie(Z_OtherInformation **otherInfo);
char *get_proxy(Z_OtherInformation **otherInfo);
void get_charset_and_lang_negotiation(Z_OtherInformation **otherInfo,
void srw_get_client(const char *db, const char **backend_db);
Z_APDU *result_set_optimize(Z_APDU *apdu);
void srw_get_client(const char *db, const char **backend_db);
Z_APDU *result_set_optimize(Z_APDU *apdu);
Yaz_ProxyClient *m_client;
yazpp_1::IPDU_Observable *m_PDU_Observable;
yazpp_1::ISocketObservable *m_socket_observable;
Yaz_ProxyClient *m_client;
yazpp_1::IPDU_Observable *m_PDU_Observable;
yazpp_1::ISocketObservable *m_socket_observable;
int m_max_record_retrieve;
void handle_max_record_retrieve(Z_APDU *apdu);
void display_diagrecs(Z_DiagRec **pp, int num);
Z_Records *create_nonSurrogateDiagnostics(ODR o, int error,
int m_max_record_retrieve;
void handle_max_record_retrieve(Z_APDU *apdu);
void display_diagrecs(Z_DiagRec **pp, int num);
Z_Records *create_nonSurrogateDiagnostics(ODR o, 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_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);
Z_ElementSetNames *mk_esn_from_schema(ODR o, const char *schema);
Z_ReferenceId *m_referenceId;
NMEM m_referenceId_mem;
Z_ElementSetNames *mk_esn_from_schema(ODR o, const char *schema);
Z_ReferenceId *m_referenceId;
NMEM m_referenceId_mem;
char *m_usemarcon_ini_stage2;
Yaz_usemarcon *m_usemarcon;
Yaz_CharsetConverter *m_charset_converter;
char *m_usemarcon_ini_stage2;
Yaz_usemarcon *m_usemarcon;
Yaz_CharsetConverter *m_charset_converter;
- yazpp_1::ISocketObservable *the_socket_observable,
- Yaz_Proxy *parent = 0);
+ yazpp_1::ISocketObservable *the_socket_observable,
+ Yaz_Proxy *parent = 0);
int handle_authentication(Z_APDU *apdu);
void result_authentication(Z_APDU *apdu, int ret);
void handle_init(Z_APDU *apdu);
void inc_request_no();
void recv_GDU(Z_GDU *apdu, int len);
int handle_authentication(Z_APDU *apdu);
void result_authentication(Z_APDU *apdu, int ret);
void handle_init(Z_APDU *apdu);
void inc_request_no();
void recv_GDU(Z_GDU *apdu, int len);
void handle_incoming_HTTP(Z_HTTP_Request *req);
void handle_incoming_Z_PDU(Z_APDU *apdu);
void handle_incoming_Z_PDU_2(Z_APDU *apdu);
IPDU_Observer *sessionNotify(yazpp_1::IPDU_Observable *the_PDU_Observable,
void handle_incoming_HTTP(Z_HTTP_Request *req);
void handle_incoming_Z_PDU(Z_APDU *apdu);
void handle_incoming_Z_PDU_2(Z_APDU *apdu);
IPDU_Observer *sessionNotify(yazpp_1::IPDU_Observable *the_PDU_Observable,
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 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_negotiation (const char *charset, const char *lang);
+ void set_proxy_negotiation(const char *charset, const char *lang,
+ const char *default_charset);
void set_target_charset(const char *charset);
char *get_proxy_target() { return m_proxyTarget; };
char *get_session_str() { return m_session_str; };
void set_target_charset(const char *charset);
char *get_proxy_target() { return m_proxyTarget; };
char *get_session_str() { return m_session_str; };
int get_log_mask() { return m_log_mask; };
int handle_init_response_for_invalid_session(Z_APDU *apdu);
void set_debug_mode(int mode);
int get_log_mask() { return m_log_mask; };
int handle_init_response_for_invalid_session(Z_APDU *apdu);
void set_debug_mode(int mode);