Filter destructors called upon daemon termination MP-505
[metaproxy-moved-to-github.git] / include / metaproxy / router_xml.hpp
1 /* This file is part of Metaproxy.
2    Copyright (C) 2005-2013 Index Data
3
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18
19 #ifndef ROUTER_XML_HPP
20 #define ROUTER_XML_HPP
21
22 #include <metaproxy/router.hpp>
23
24 #include <libxml/tree.h>
25 #include <boost/scoped_ptr.hpp>
26
27 namespace metaproxy_1
28 {
29     class RouterXML : public metaproxy_1::Router
30     {
31         class Rep;
32         class Route;
33         class Pos;
34     public:
35         RouterXML(xmlDocPtr doc,
36                   bool test_only, const char *file_include_path);
37         RouterXML(std::string xmlconf,
38                   bool test_only);
39
40         ~RouterXML();
41
42         virtual RoutePos *createpos() const;
43         void start();
44         void stop(int signo);
45     private:
46         boost::scoped_ptr<Rep> m_p;
47     };
48
49 };
50 #endif
51
52 /*
53  * Local variables:
54  * c-basic-offset: 4
55  * c-file-style: "Stroustrup"
56  * indent-tabs-mode: nil
57  * End:
58  * vim: shiftwidth=4 tabstop=8 expandtab
59  */
60