Add skeleton MP module
[mp-xquery-moved-to-github.git] / src / metaproxy_filter_xquery.cpp
1 /* This file is part of mp-xquery
2    Copyright (C) Index Data
3
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18
19 #include <metaproxy/package.hpp>
20 #include <metaproxy/util.hpp>
21
22 namespace mp = metaproxy_1;
23 namespace yf = mp::filter;
24 using namespace mp;
25
26 namespace metaproxy_1 {
27     namespace filter {
28         class XQuery : public Base {
29         public:
30             ~XQuery();
31             XQuery();
32             void process(metaproxy_1::Package & package) const;
33             void configure(const xmlNode * ptr, bool test_only,
34                            const char *path);
35             void start() const;
36             void stop(int signo) const;
37         private:
38         };
39     }
40 }
41
42 void yf::XQuery::start() const
43 {
44 }
45
46 void yf::XQuery::stop(int signo) const
47 {
48 }
49
50 void yf::XQuery::process(Package &package) const
51 {
52     package.move();
53 }
54
55 void yf::XQuery::configure(const xmlNode * ptr, bool test_only,
56                            const char *path)
57 {
58 }
59
60 static yf::Base* filter_creator()
61 {
62     return new mp::filter::XQuery;
63 }
64
65 extern "C" {
66     struct metaproxy_1_filter_struct metaproxy_1_filter_xquery = {
67         0,
68         "xquery",
69         filter_creator
70     };
71 }
72
73
74 /*
75  * Local variables:
76  * c-basic-offset: 4
77  * c-file-style: "Stroustrup"
78  * indent-tabs-mode: nil
79  * End:
80  * vim: shiftwidth=4 tabstop=8 expandtab
81  */
82