Added filter multi. init+search operational
[metaproxy-moved-to-github.git] / src / filter_virt_db.hpp
1 /* $Id: filter_virt_db.hpp,v 1.12 2006-01-15 20:03:14 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #ifndef FILTER_VIRT_DB_HPP
8 #define FILTER_VIRT_DB_HPP
9
10 #include <stdexcept>
11 #include <list>
12 #include <boost/scoped_ptr.hpp>
13 #include <boost/shared_ptr.hpp>
14
15 #include "filter.hpp"
16
17 namespace yp2 {
18     namespace filter {
19         class Virt_db : public Base {
20             class Rep;
21             class Frontend;
22             class Map;
23             class Set;
24             class Backend;
25             typedef boost::shared_ptr<Backend> BackendPtr;
26             typedef boost::shared_ptr<Frontend> FrontendPtr;
27         public:
28             ~Virt_db();
29             Virt_db();
30             void process(yp2::Package & package) const;
31             void configure(const xmlNode * ptr);
32             void add_map_db2vhost(std::string db, std::string vhost,
33                                   std::string route);
34         private:
35             boost::scoped_ptr<Rep> m_p;
36         };
37     }
38 }
39
40 extern "C" {
41     extern struct yp2_filter_struct yp2_filter_virt_db;
42 }
43
44 #endif
45 /*
46  * Local variables:
47  * c-basic-offset: 4
48  * indent-tabs-mode: nil
49  * c-file-style: "stroustrup"
50  * End:
51  * vim: shiftwidth=4 tabstop=8 expandtab
52  */