RCFProto

- Main Page
- Classes
- Files

- File List

All Classes Functions Typedefs
FilterService.hpp
1
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18
19 #ifndef INCLUDE_RCF_FILTERSERVICE_HPP
20 #define INCLUDE_RCF_FILTERSERVICE_HPP
21
22 #include <map>
23
24 #include <boost/noncopyable.hpp>
25 #include <boost/shared_ptr.hpp>
26
27 #include <RCF/Filter.hpp>
28 #include <RCF/Export.hpp>
29 #include <RCF/Service.hpp>
30
31 namespace RCF {
32
33 class Session;
34 class RcfSession;
35
36 class RCF_EXPORT FilterService :
37 public I_Service,
38 boost::noncopyable
39 {
40 public:
41 FilterService();
42
43 void addFilterFactory(FilterFactoryPtr filterFactoryPtr);
44
45 void addFilterFactory(
46 FilterFactoryPtr filterFactoryPtr,
47 const std::vector<int> &filterIds);
48
49 boost::int32_t RequestTransportFilters(const std::vector<boost::int32_t> &filterIds);
50
51 FilterFactoryPtr getFilterFactoryPtr(int filterId);
52
53 private:
54 void setTransportFilters(
55 RcfSession &session,
56 boost::shared_ptr<std::vector<FilterPtr> > filters);
57
58 void onServerStart(RcfServer &server);
59 void onServerStop(RcfServer &server);
60
61 typedef std::map<int, FilterFactoryPtr> FilterFactoryMap;
62 FilterFactoryMap mFilterFactoryMap;
63 ReadWriteMutex mFilterFactoryMapMutex;
64 };
65
66 typedef boost::shared_ptr<FilterService> FilterServicePtr;
67
68 } // namespace RCF
69
70 #endif // ! INCLUDE_RCF_FILTERSERVICE_HPP