From 483f47b95650cf92da0c9cc08363c2d761e78cdc Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 29 May 2013 12:34:19 +0200 Subject: [PATCH] router_chain part of public API --- include/metaproxy/Makefile.am | 2 +- include/metaproxy/router_chain.hpp | 58 ++++++++++++++++++++++++++++++++++ src/Makefile.am | 2 +- src/router_chain.cpp | 2 +- src/router_chain.hpp | 58 ---------------------------------- src/test_filter2.cpp | 2 +- src/test_filter_auth_simple.cpp | 2 +- src/test_filter_backend_test.cpp | 2 +- src/test_filter_bounce.cpp | 2 +- src/test_filter_frontend_net.cpp | 2 +- src/test_filter_log.cpp | 2 +- src/test_filter_multi.cpp | 2 +- src/test_filter_query_rewrite.cpp | 2 +- src/test_filter_record_transform.cpp | 2 +- src/test_filter_sru_to_z3950.cpp | 2 +- src/test_filter_virt_db.cpp | 2 +- src/test_filter_z3950_client.cpp | 2 +- 17 files changed, 73 insertions(+), 73 deletions(-) create mode 100644 include/metaproxy/router_chain.hpp delete mode 100644 src/router_chain.hpp diff --git a/include/metaproxy/Makefile.am b/include/metaproxy/Makefile.am index d5ecded..0f38914 100644 --- a/include/metaproxy/Makefile.am +++ b/include/metaproxy/Makefile.am @@ -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 index 0000000..2d83729 --- /dev/null +++ b/include/metaproxy/router_chain.hpp @@ -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 + +#include +#include + +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 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 + */ + diff --git a/src/Makefile.am b/src/Makefile.am index 2e43a48..f3b0500 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) \ diff --git a/src/router_chain.cpp b/src/router_chain.cpp index 9a3da41..dd80405 100644 --- a/src/router_chain.cpp +++ b/src/router_chain.cpp @@ -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 #include #include diff --git a/src/router_chain.hpp b/src/router_chain.hpp deleted file mode 100644 index 2d83729..0000000 --- a/src/router_chain.hpp +++ /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 - -#include -#include - -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 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 - */ - diff --git a/src/test_filter2.cpp b/src/test_filter2.cpp index b6f8e21..3f93001 100644 --- a/src/test_filter2.cpp +++ b/src/test_filter2.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include "router_chain.hpp" +#include #include #include diff --git a/src/test_filter_auth_simple.cpp b/src/test_filter_auth_simple.cpp index 938ad58..f66445e 100644 --- a/src/test_filter_auth_simple.cpp +++ b/src/test_filter_auth_simple.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_auth_simple.hpp" #include -#include "router_chain.hpp" +#include #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_backend_test.cpp b/src/test_filter_backend_test.cpp index 24ab0be..76e4730 100644 --- a/src/test_filter_backend_test.cpp +++ b/src/test_filter_backend_test.cpp @@ -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 #include #include diff --git a/src/test_filter_bounce.cpp b/src/test_filter_bounce.cpp index 3b95cea..0748a55 100644 --- a/src/test_filter_bounce.cpp +++ b/src/test_filter_bounce.cpp @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_bounce.hpp" #include #include "gduutil.hpp" -#include "router_chain.hpp" +#include #include #include diff --git a/src/test_filter_frontend_net.cpp b/src/test_filter_frontend_net.cpp index 50b6f37..49001d7 100644 --- a/src/test_filter_frontend_net.cpp +++ b/src/test_filter_frontend_net.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "filter_frontend_net.hpp" -#include "router_chain.hpp" +#include #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_log.cpp b/src/test_filter_log.cpp index 0defe85..73f637a 100644 --- a/src/test_filter_log.cpp +++ b/src/test_filter_log.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_log.hpp" #include -#include "router_chain.hpp" +#include #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_multi.cpp b/src/test_filter_multi.cpp index dc9cb39..a9eefbd 100644 --- a/src/test_filter_multi.cpp +++ b/src/test_filter_multi.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_multi.hpp" #include -#include "router_chain.hpp" +#include #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_query_rewrite.cpp b/src/test_filter_query_rewrite.cpp index cbe3441..f9234a7 100644 --- a/src/test_filter_query_rewrite.cpp +++ b/src/test_filter_query_rewrite.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_query_rewrite.hpp" #include -#include "router_chain.hpp" +#include #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_record_transform.cpp b/src/test_filter_record_transform.cpp index f12be7f..8f2ffa9 100644 --- a/src/test_filter_record_transform.cpp +++ b/src/test_filter_record_transform.cpp @@ -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 #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_sru_to_z3950.cpp b/src/test_filter_sru_to_z3950.cpp index 56216bb..7ea132b 100644 --- a/src/test_filter_sru_to_z3950.cpp +++ b/src/test_filter_sru_to_z3950.cpp @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_sru_to_z3950.hpp" #include #include "sru_util.hpp" -#include "router_chain.hpp" +#include #include #include diff --git a/src/test_filter_virt_db.cpp b/src/test_filter_virt_db.cpp index f8e4a78..f8f66cc 100644 --- a/src/test_filter_virt_db.cpp +++ b/src/test_filter_virt_db.cpp @@ -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 #include #define BOOST_AUTO_TEST_MAIN diff --git a/src/test_filter_z3950_client.cpp b/src/test_filter_z3950_client.cpp index 03c29c7..4f001ad 100644 --- a/src/test_filter_z3950_client.cpp +++ b/src/test_filter_z3950_client.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "filter_z3950_client.hpp" #include -#include "router_chain.hpp" +#include #include #define BOOST_AUTO_TEST_MAIN -- 1.7.10.4