filter_query_rewrite.cpp filter_query_rewrite.hpp \
filter_record_transform.cpp filter_record_transform.hpp \
filter_session_shared.cpp filter_session_shared.hpp \
+ filter_sort.cpp filter_sort.hpp \
filter_sru_to_z3950.cpp filter_sru_to_z3950.hpp \
filter_template.cpp filter_template.hpp \
filter_virt_db.cpp filter_virt_db.hpp \
#include "filter_query_rewrite.hpp"
#include "filter_record_transform.hpp"
#include "filter_session_shared.hpp"
+#include "filter_sort.hpp"
#include "filter_sru_to_z3950.hpp"
#include "filter_template.hpp"
#include "filter_virt_db.hpp"
&metaproxy_1_filter_query_rewrite,
&metaproxy_1_filter_record_transform,
&metaproxy_1_filter_session_shared,
+ &metaproxy_1_filter_sort,
&metaproxy_1_filter_sru_to_z3950,
&metaproxy_1_filter_template,
&metaproxy_1_filter_virt_db,
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2012 Index Data
+
+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_sort.hpp"
+#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
+
+#include <boost/thread/mutex.hpp>
+
+#include <yaz/zgdu.h>
+
+namespace mp = metaproxy_1;
+namespace yf = mp::filter;
+
+namespace metaproxy_1 {
+ namespace filter {
+ class Sort::Impl {
+ public:
+ Impl();
+ ~Impl();
+ void process(metaproxy_1::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
+ private:
+ int m_prefetch;
+ };
+ }
+}
+
+// define Pimpl wrapper forwarding to Impl
+
+yf::Sort::Sort() : m_p(new Impl)
+{
+}
+
+yf::Sort::~Sort()
+{ // must have a destructor because of boost::scoped_ptr
+}
+
+void yf::Sort::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
+{
+ m_p->configure(xmlnode, test_only, path);
+}
+
+void yf::Sort::process(mp::Package &package) const
+{
+ m_p->process(package);
+}
+
+yf::Sort::Impl::Impl() : m_prefetch(20)
+{
+}
+
+yf::Sort::Impl::~Impl()
+{
+}
+
+void yf::Sort::Impl::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
+{
+}
+
+void yf::Sort::Impl::process(mp::Package &package) const
+{
+ // Z_GDU *gdu = package.request().get();
+ package.move();
+}
+
+
+static mp::filter::Base* filter_creator()
+{
+ return new mp::filter::Sort;
+}
+
+extern "C" {
+ struct metaproxy_1_filter_struct metaproxy_1_filter_sort = {
+ 0,
+ "sort",
+ filter_creator
+ };
+}
+
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
--- /dev/null
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2012 Index Data
+
+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
+*/
+
+#ifndef FILTER_SORT_HPP
+#define FILTER_SORT_HPP
+
+#include <boost/scoped_ptr.hpp>
+
+#include <metaproxy/filter.hpp>
+
+namespace metaproxy_1 {
+ namespace filter {
+ class Sort : public Base {
+ class Impl;
+ boost::scoped_ptr<Impl> m_p;
+ public:
+ Sort();
+ ~Sort();
+ void process(metaproxy_1::Package & package) const;
+ void configure(const xmlNode * ptr, bool test_only,
+ const char *path);
+ };
+ }
+}
+
+extern "C" {
+ extern struct metaproxy_1_filter_struct metaproxy_1_filter_sort;
+}
+
+#endif
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
$(OBJDIR)\filter_query_rewrite.obj \
$(OBJDIR)\filter_record_transform.obj \
$(OBJDIR)\filter_session_shared.obj \
+ $(OBJDIR)\filter_sort.obj \
$(OBJDIR)\filter_sru_to_z3950.obj \
$(OBJDIR)\filter_template.obj \
$(OBJDIR)\filter_virt_db.obj \