zoom: warn if %query is not defined and Explain is used
[metaproxy-moved-to-github.git] / src / filter_zeerex_explain.cpp
index 8635ee2..e98d65a 100644 (file)
@@ -1,16 +1,27 @@
-/* $Id: filter_zeerex_explain.cpp,v 1.3 2007-01-07 00:41:18 marc Exp $
-   Copyright (c) 2005-2006, Index Data.
+/* This file is part of Metaproxy.
+   Copyright (C) 2005-2012 Index Data
 
-   See the LICENSE file for details
- */
+Metaproxy 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
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
 
 #include "config.hpp"
-#include "filter.hpp"
-#include "package.hpp"
-#include "util.hpp"
+#include "filter_zeerex_explain.hpp"
+#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
 #include "gduutil.hpp"
 #include "sru_util.hpp"
-#include "filter_zeerex_explain.hpp"
 
 #include <yaz/zgdu.h>
 #include <yaz/z-core.h>
@@ -50,7 +61,8 @@ yf::ZeeRexExplain::~ZeeRexExplain()
 {  // must have a destructor because of boost::scoped_ptr
 }
 
-void yf::ZeeRexExplain::configure(const xmlNode *xmlnode)
+void yf::ZeeRexExplain::configure(const xmlNode *xmlnode, bool test_only,
+                                  const char *path)
 {
     m_p->configure(xmlnode);
 }
@@ -140,7 +152,7 @@ void yf::ZeeRexExplain::Impl::process(mp::Package &package)
     char *charset = 0;
     char *stylesheet = 0;
     if (! (sru_pdu_req = mp_util::decode_sru_request(package, odr_de, odr_en, 
-                                            sru_pdu_res, soap,
+                                            sru_pdu_res, &soap,
                                             charset, stylesheet)))
     {
         mp_util::build_sru_explain(package, odr_en, sru_pdu_res, 
@@ -152,13 +164,15 @@ void yf::ZeeRexExplain::Impl::process(mp::Package &package)
     }
     
 
-    if (sru_pdu_req->which != Z_SRW_explain_request){
+    if (sru_pdu_req->which != Z_SRW_explain_request)
+    {
     // Let pass all other SRU actions
         package.move();
         return;
     }
     // except valid SRU explain request, construct ZeeRex Explain response
-    else {
+    else 
+    {
         Z_SRW_explainRequest *er_req = sru_pdu_req->u.explain_request;
         //mp_util::build_simple_explain(package, odr_en, sru_pdu_res, 
         //                           sruinfo, er_req);
@@ -193,8 +207,9 @@ extern "C" {
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
- * c-file-style: "stroustrup"
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab
  */
+