Remote Call Framework 3.0
Service.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2018, 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: 3.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
19 #ifndef INCLUDE_RCF_SERVICE_HPP
20 #define INCLUDE_RCF_SERVICE_HPP
21 
22 #include <memory>
23 
24 #include <RCF/Export.hpp>
25 #include <RCF/ServerTask.hpp>
26 
27 namespace RCF {
28 
29  class I_Service;
30  class RcfServer;
31  typedef std::shared_ptr<I_Service> ServicePtr;
32 
33  class ThreadPool;
34  typedef std::shared_ptr<ThreadPool> ThreadPoolPtr;
35 
36  class RCF_EXPORT I_Service
37  {
38  public:
39  I_Service();
40 
41  virtual ~I_Service()
42  {}
43 
44  virtual void onServiceAdded(RcfServer &server);
45  virtual void onServiceRemoved(RcfServer &server);
46  virtual void onServerStart(RcfServer &server);
47  virtual void onServerStop(RcfServer &server);
48 
49  void setThreadPool(ThreadPoolPtr threadPoolPtr);
50  void resetMuxers();
51 
52  virtual void onTimer()
53  {}
54 
55  protected:
56 
57  friend class RcfServer;
58 
59  TaskEntries mTaskEntries;
60 
61  ThreadPoolPtr mThreadPoolPtr;
62  };
63 
64 } // namespace RCF
65 
66 #endif // ! INCLUDE_RCF_SERVICE_HPP
Definition: AmiIoHandler.hpp:24