The configure method takes test_only flag so we can avoid
[metaproxy-moved-to-github.git] / src / filter_session_shared.hpp
1 /* $Id: filter_session_shared.hpp,v 1.11 2008-02-20 15:07:52 adam Exp $
2    Copyright (c) 2005-2007, Index Data.
3
4 This file is part of Metaproxy.
5
6 Metaproxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
10
11 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Metaproxy; see the file LICENSE.  If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA.
20  */
21
22 #ifndef FILTER_SESSION_SHARED_HPP
23 #define FILTER_SESSION_SHARED_HPP
24
25 #include <boost/scoped_ptr.hpp>
26 #include <list>
27 #include <map>
28
29 #include "filter.hpp"
30
31 namespace metaproxy_1 {
32     namespace filter {
33         class SessionShared : public Base {
34             class Rep;
35             class InitKey;
36             class BackendSet;
37             class FrontendSet;
38             class Worker;
39
40             struct Frontend;
41             class BackendClass;
42             class BackendInstance;
43             typedef boost::shared_ptr<Frontend> FrontendPtr;
44             typedef boost::shared_ptr<BackendClass> BackendClassPtr;
45             typedef boost::shared_ptr<BackendInstance> BackendInstancePtr;
46             typedef boost::shared_ptr<BackendSet> BackendSetPtr;
47             typedef boost::shared_ptr<FrontendSet> FrontendSetPtr;
48             typedef std::list<std::string> Databases;
49
50             typedef std::list<BackendInstancePtr> BackendInstanceList;
51             typedef std::map<InitKey, BackendClassPtr> BackendClassMap;
52             typedef std::list<BackendSetPtr> BackendSetList;
53             typedef std::map<std::string, FrontendSetPtr> FrontendSets;
54         public:
55             ~SessionShared();
56             SessionShared();
57             void process(metaproxy_1::Package & package) const;
58             void configure(const xmlNode * ptr, bool test_only);
59         private:
60             boost::scoped_ptr<Rep> m_p;
61         };
62     }
63 }
64
65 extern "C" {
66     extern struct metaproxy_1_filter_struct metaproxy_1_filter_session_shared;
67 }
68
69 #endif
70 /*
71  * Local variables:
72  * c-basic-offset: 4
73  * indent-tabs-mode: nil
74  * c-file-style: "stroustrup"
75  * End:
76  * vim: shiftwidth=4 tabstop=8 expandtab
77  */