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