Filter virt_db allows multiple databases.. Each of these is
[metaproxy-moved-to-github.git] / src / filter_virt_db.hpp
1 /* $Id: filter_virt_db.hpp,v 1.13 2006-01-16 15:51:56 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_db2targets(std::string db,
33                                     std::list<std::string> targets,
34                                     std::string route);
35             void add_map_db2target(std::string db,
36                                    std::string target,
37                                    std::string route);
38         private:
39             boost::scoped_ptr<Rep> m_p;
40         };
41     }
42 }
43
44 extern "C" {
45     extern struct yp2_filter_struct yp2_filter_virt_db;
46 }
47
48 #endif
49 /*
50  * Local variables:
51  * c-basic-offset: 4
52  * indent-tabs-mode: nil
53  * c-file-style: "stroustrup"
54  * End:
55  * vim: shiftwidth=4 tabstop=8 expandtab
56  */