RCFProto
 All Classes Functions Typedefs
CallbackConnectionService.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_CALLBACKCONNECTIONSERVICE_HPP
20 #define INCLUDE_RCF_CALLBACKCONNECTIONSERVICE_HPP
21 
22 #include <RCF/Service.hpp>
23 
24 namespace RCF {
25 
26  typedef boost::function2<void, RcfSessionPtr, ClientTransportAutoPtr> OnCallbackConnectionCreated;
27 
28  class I_CreateCallbackConnection;
29  template<typename T> class RcfClient;
30 
31  class RcfServer;
32 
33  class CallbackConnectionService : public I_Service, boost::noncopyable
34  {
35  public:
36 
37  CallbackConnectionService();
38 
39  private:
40 
41  void onServiceAdded(RcfServer & server);
42  void onServiceRemoved(RcfServer & server);
43  void onServerStart(RcfServer & server);
44 
45  friend class RcfClient<I_CreateCallbackConnection>;
46  void CreateCallbackConnection();
47 
48  RcfServer * mpServer;
49  OnCallbackConnectionCreated mOnCallbackConnectionCreated;
50  };
51 
52  typedef boost::shared_ptr<CallbackConnectionService> CallbackConnectionServicePtr;
53 
54 } // namespace RCF
55 
56 #endif // ! INCLUDE_RCF_CALLBACKCONNECTIONSERVICE_HPP