search+present functional for multi filter
[metaproxy-moved-to-github.git] / src / filter_multi.hpp
1 /* $Id: filter_multi.hpp,v 1.2 2006-01-16 01:10:19 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             class Frontend;
23             class Map;
24             class FrontendSet;
25             class Backend;
26             class BackendSet;
27             typedef boost::shared_ptr<Backend> BackendPtr;
28             typedef boost::shared_ptr<Frontend> FrontendPtr;
29             typedef boost::shared_ptr<Package> PackagePtr;
30             typedef std::map<std::string,FrontendSet>::iterator Sets_it;
31         public:
32             ~Multi();
33             Multi();
34             void process(yp2::Package & package) const;
35             void configure(const xmlNode * ptr);
36             void add_map_host2hosts(std::string host,
37                                     std::list<std::string> hosts,
38                                     std::string route);
39         private:
40             boost::scoped_ptr<Rep> m_p;
41         };
42     }
43 }
44
45 extern "C" {
46     extern struct yp2_filter_struct yp2_filter_multi;
47 }
48
49 #endif
50 /*
51  * Local variables:
52  * c-basic-offset: 4
53  * indent-tabs-mode: nil
54  * c-file-style: "stroustrup"
55  * End:
56  * vim: shiftwidth=4 tabstop=8 expandtab
57  */