Do not include router.hpp in filters
[metaproxy-moved-to-github.git] / src / filter_template.cpp
1 /* $Id: filter_template.cpp,v 1.6 2006-01-09 21:20:15 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #include "config.hpp"
8
9 #include "filter.hpp"
10 #include "package.hpp"
11
12 #include <boost/thread/mutex.hpp>
13
14 #include "util.hpp"
15 #include "filter_template.hpp"
16
17 #include <yaz/zgdu.h>
18
19 namespace yf = yp2::filter;
20
21 namespace yp2 {
22     namespace filter {
23         class Template::Rep {
24             friend class Template;
25             int dummy;
26         };
27     }
28 }
29
30 yf::Template::Template() : m_p(new Rep)
31 {
32     m_p->dummy = 1;
33 }
34
35 yf::Template::~Template()
36 {  // must have a destructor because of boost::scoped_ptr
37 }
38
39 void yf::Template::process(yp2::Package &package) const
40 {
41     // Z_GDU *gdu = package.request().get();
42     package.move();
43 }
44
45 static yp2::filter::Base* filter_creator()
46 {
47     return new yp2::filter::Template;
48 }
49
50 extern "C" {
51     struct yp2_filter_struct yp2_filter_template = {
52         0,
53         "template",
54         filter_creator
55     };
56 }
57
58
59 /*
60  * Local variables:
61  * c-basic-offset: 4
62  * indent-tabs-mode: nil
63  * c-file-style: "stroustrup"
64  * End:
65  * vim: shiftwidth=4 tabstop=8 expandtab
66  */