1 /* $Id: sru_util.hpp,v 1.4 2006-12-28 13:26:06 marc Exp $
2 - Copyright (c) 2005-2006, Index Data.
4 See the LICENSE file for details
7 #ifndef YP2_SDU_UTIL_HPP
8 #define YP2_SDU_UTIL_HPP
11 #include "package.hpp"
13 //#include <yaz/zgdu.h>
14 //#include <yaz/z-core.h>
22 std::ostream& operator<<(std::ostream& os, Z_SRW_PDU& srw_pdu);
27 namespace metaproxy_1 {
30 // std::string sru_protocol(const Z_HTTP_Request &http_req);
31 // std::string debug_http(const Z_HTTP_Request &http_req);
32 // void http_response(mp::Package &package,
33 // const std::string &content,
34 // int http_code = 200);
36 bool build_sru_debug_package(metaproxy_1::Package &package);
38 bool build_simple_explain(metaproxy_1::Package &package,
39 metaproxy_1::odr &odr_en,
40 Z_SRW_PDU *sru_pdu_res,
41 Z_SRW_explainRequest const *er_req);
43 bool build_sru_response(metaproxy_1::Package &package,
44 metaproxy_1::odr &odr_en,
46 const Z_SRW_PDU *sru_pdu_res,
48 const char *stylesheet);
50 Z_SRW_PDU * decode_sru_request(metaproxy_1::Package &package,
51 metaproxy_1::odr &odr_de,
52 metaproxy_1::odr &odr_en,
53 Z_SRW_PDU *sru_pdu_res,
58 bool check_sru_query_exists(metaproxy_1::Package &package,
59 metaproxy_1::odr &odr_en,
60 Z_SRW_PDU *sru_pdu_res,
61 Z_SRW_searchRetrieveRequest
64 Z_ElementSetNames * build_esn_from_schema(metaproxy_1::odr &odr_en,
71 // enum SRU_protocol_type { SRU_NONE, SRU_GET, SRU_POST, SRU_SOAP};
72 // typedef const int SRU_query_type;
73 // union SRW_query {char * cql; char * xcql; char * pqf;};
75 // //bool decode(const Z_HTTP_Request &http_req);
76 // SRU_protocol_type protocol(const Z_HTTP_Request &http_req) const;
78 // SRU_protocol_type m_protocol;
79 // std::string m_charset;
80 // std::string m_stylesheet;
89 * indent-tabs-mode: nil
90 * c-file-style: "stroustrup"
92 * vim: shiftwidth=4 tabstop=8 expandtab