The configure method takes test_only flag so we can avoid
[metaproxy-moved-to-github.git] / src / filter_auth_simple.hpp
1 /* $Id: filter_auth_simple.hpp,v 1.10 2008-02-20 15:07:51 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_AUTH_SIMPLE_HPP
23 #define FILTER_AUTH_SIMPLE_HPP
24
25 #include <boost/scoped_ptr.hpp>
26
27 #include "filter.hpp"
28
29 namespace metaproxy_1 {
30     namespace filter {
31         class AuthSimple : public Base {
32             class Rep;
33             boost::scoped_ptr<Rep> m_p;
34         public:
35             AuthSimple();
36             ~AuthSimple();
37             void configure(const xmlNode * ptr, bool test_only);
38             void process(metaproxy_1::Package & package) const;
39         private:
40             void config_userRegister(std::string filename);
41             void config_targetRegister(std::string filename);
42             void process_init(metaproxy_1::Package & package) const;
43             void process_search(metaproxy_1::Package & package) const;
44             void process_scan(metaproxy_1::Package & package) const;
45             void check_targets(metaproxy_1::Package & package) const;
46         };
47     }
48 }
49
50 extern "C" {
51     extern struct metaproxy_1_filter_struct metaproxy_1_filter_auth_simple;
52 }
53
54 #endif
55 /*
56  * Local variables:
57  * c-basic-offset: 4
58  * indent-tabs-mode: nil
59  * c-file-style: "stroustrup"
60  * End:
61  * vim: shiftwidth=4 tabstop=8 expandtab
62  */