db5405504048c6342626e5f687bf1e523d37cd86
[metaproxy-moved-to-github.git] / src / filter_multi.hpp
1 /* $Id: filter_multi.hpp,v 1.4 2006-02-02 11:33:46 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #ifndef FILTER_MULTI_HPP
8 #define FILTER_MULTI_HPP
9
10 #include <stdexcept>
11 #include <list>
12 #include <map>
13 #include <boost/scoped_ptr.hpp>
14 #include <boost/shared_ptr.hpp>
15
16 #include "filter.hpp"
17
18 namespace yp2 {
19     namespace filter {
20         class Multi : public Base {
21             class Rep;
22             struct Frontend;
23             struct Map;
24             struct FrontendSet;
25             struct Backend;
26             struct BackendSet;
27             struct ScanTermInfo;
28             typedef std::list<ScanTermInfo> ScanTermInfoList;
29             typedef boost::shared_ptr<Backend> BackendPtr;
30             typedef boost::shared_ptr<Frontend> FrontendPtr;
31             typedef boost::shared_ptr<Package> PackagePtr;
32             typedef std::map<std::string,FrontendSet>::iterator Sets_it;
33         public:
34             ~Multi();
35             Multi();
36             void process(yp2::Package & package) const;
37             void configure(const xmlNode * ptr);
38             void add_map_host2hosts(std::string host,
39                                     std::list<std::string> hosts,
40                                     std::string route);
41         private:
42             boost::scoped_ptr<Rep> m_p;
43         };
44     }
45 }
46
47 extern "C" {
48     extern struct yp2_filter_struct yp2_filter_multi;
49 }
50
51 #endif
52 /*
53  * Local variables:
54  * c-basic-offset: 4
55  * indent-tabs-mode: nil
56  * c-file-style: "stroustrup"
57  * End:
58  * vim: shiftwidth=4 tabstop=8 expandtab
59  */