router_chain part of public API
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 29 May 2013 10:34:19 +0000 (12:34 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 29 May 2013 10:34:19 +0000 (12:34 +0200)
17 files changed:
include/metaproxy/Makefile.am
include/metaproxy/router_chain.hpp [new file with mode: 0644]
src/Makefile.am
src/router_chain.cpp
src/router_chain.hpp [deleted file]
src/test_filter2.cpp
src/test_filter_auth_simple.cpp
src/test_filter_backend_test.cpp
src/test_filter_bounce.cpp
src/test_filter_frontend_net.cpp
src/test_filter_log.cpp
src/test_filter_multi.cpp
src/test_filter_query_rewrite.cpp
src/test_filter_record_transform.cpp
src/test_filter_sru_to_z3950.cpp
src/test_filter_virt_db.cpp
src/test_filter_z3950_client.cpp

index d5ecded..0f38914 100644 (file)
@@ -2,5 +2,5 @@
 ## Copyright (C) 2005-2013 Index Data
 
 pkginclude_HEADERS= filter.hpp origin.hpp package.hpp \
-       router.hpp session.hpp util.hpp xmlutil.hpp
+       router.hpp session.hpp util.hpp xmlutil.hpp router_chain.hpp
 
diff --git a/include/metaproxy/router_chain.hpp b/include/metaproxy/router_chain.hpp
new file mode 100644 (file)
index 0000000..2d83729
--- /dev/null
@@ -0,0 +1,58 @@
+/* This file is part of Metaproxy.
+   Copyright (C) 2005-2013 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 ROUTER_CHAIN_HPP
+#define ROUTER_CHAIN_HPP
+
+
+#include <metaproxy/router.hpp>
+
+#include <boost/scoped_ptr.hpp>
+#include <stdexcept>
+
+namespace metaproxy_1 {
+    class RouterChain : public Router {
+        class Rep;
+        class Pos;
+    public:
+        RouterChain();
+        virtual ~RouterChain();
+        virtual RoutePos *createpos() const;
+        RouterChain & append(const filter::Base &filter);
+        void start();
+        void stop();
+    private:
+        boost::scoped_ptr<Rep> m_p;
+        /// disabled because class is singleton
+        RouterChain(const RouterChain &);
+
+        /// disabled because class is singleton
+        RouterChain& operator=(const RouterChain &);
+    };
+}
+
+#endif
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
index 2e43a48..f3b0500 100644 (file)
@@ -39,7 +39,6 @@ filter_src = \
        filter_z3950_client.cpp filter_z3950_client.hpp \
        filter_zeerex_explain.cpp  filter_zeerex_explain.hpp \
        filter_zoom.cpp filter_zoom.hpp \
-       router_chain.hpp router_chain.cpp \
         router_flexml.hpp router_flexml.cpp
 
 lib_LTLIBRARIES = libmetaproxy.la
@@ -58,6 +57,7 @@ libmetaproxy_la_SOURCES = \
        torus.cpp torus.hpp \
        url_recipe.cpp \
        util.cpp \
+       router_chain.cpp \
        xmlutil.cpp
 
 libmetaproxy_la_LIBADD = $(YAZPPLALIB) \
index 9a3da41..dd80405 100644 (file)
@@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/filter.hpp>
 
 #include <list>
diff --git a/src/router_chain.hpp b/src/router_chain.hpp
deleted file mode 100644 (file)
index 2d83729..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This file is part of Metaproxy.
-   Copyright (C) 2005-2013 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 ROUTER_CHAIN_HPP
-#define ROUTER_CHAIN_HPP
-
-
-#include <metaproxy/router.hpp>
-
-#include <boost/scoped_ptr.hpp>
-#include <stdexcept>
-
-namespace metaproxy_1 {
-    class RouterChain : public Router {
-        class Rep;
-        class Pos;
-    public:
-        RouterChain();
-        virtual ~RouterChain();
-        virtual RoutePos *createpos() const;
-        RouterChain & append(const filter::Base &filter);
-        void start();
-        void stop();
-    private:
-        boost::scoped_ptr<Rep> m_p;
-        /// disabled because class is singleton
-        RouterChain(const RouterChain &);
-
-        /// disabled because class is singleton
-        RouterChain& operator=(const RouterChain &);
-    };
-}
-
-#endif
-/*
- * Local variables:
- * c-basic-offset: 4
- * c-file-style: "Stroustrup"
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-
index b6f8e21..3f93001 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <libxml/tree.h>
 
 #include <metaproxy/filter.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #include <iostream>
index 938ad58..f66445e 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include "filter_auth_simple.hpp"
 #include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index 24ab0be..76e4730 100644 (file)
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "filter_backend_test.hpp"
 #include "filter_log.hpp"
 
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #include <yaz/zgdu.h>
index 3b95cea..0748a55 100644 (file)
@@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "filter_bounce.hpp"
 #include <metaproxy/util.hpp>
 #include "gduutil.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #include <iostream>
index 50b6f37..49001d7 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <metaproxy/util.hpp>
 #include "filter_frontend_net.hpp"
 
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index 0defe85..73f637a 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include "filter_log.hpp"
 #include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index dc9cb39..a9eefbd 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include "filter_multi.hpp"
 #include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index cbe3441..f9234a7 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include "filter_query_rewrite.hpp"
 #include <metaproxy/util.hpp>
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index f12be7f..8f2ffa9 100644 (file)
@@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "config.hpp"
 #include "filter_record_transform.hpp"
 
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index 56216bb..7ea132b 100644 (file)
@@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "filter_sru_to_z3950.hpp"
 #include <metaproxy/util.hpp>
 #include "sru_util.hpp"
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #include <iostream>
index f8e4a78..f8f66cc 100644 (file)
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "filter_backend_test.hpp"
 #include "filter_log.hpp"
 
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN
index 03c29c7..4f001ad 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "filter_z3950_client.hpp"
 #include <metaproxy/util.hpp>
 
-#include "router_chain.hpp"
+#include <metaproxy/router_chain.hpp>
 #include <metaproxy/package.hpp>
 
 #define BOOST_AUTO_TEST_MAIN