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  class RcfSession;
27  typedef boost::shared_ptr<RcfSession> RcfSessionPtr;
28 
29  class ClientTransport;
30  typedef std::auto_ptr<ClientTransport> ClientTransportAutoPtr;
31 
32  typedef boost::function2<void, RcfSessionPtr, ClientTransportAutoPtr> OnCallbackConnectionCreated;
33 
34  class I_CreateCallbackConnection;
35  template<typename T> class RcfClient;
36 
37  class RcfServer;
38 
39  class CallbackConnectionService : public I_Service, boost::noncopyable
40  {
41  public:
42 
43  CallbackConnectionService();
44 
45  private:
46 
47  void onServiceAdded(RcfServer & server);
48  void onServiceRemoved(RcfServer & server);
49  void onServerStart(RcfServer & server);
50 
51  public:
52  friend class RcfClient<I_CreateCallbackConnection>;
53  void CreateCallbackConnection();
54 
55  private:
56  RcfServer * mpServer;
57  OnCallbackConnectionCreated mOnCallbackConnectionCreated;
58  };
59 
60  typedef boost::shared_ptr<CallbackConnectionService> CallbackConnectionServicePtr;
61 
62 } // namespace RCF
63 
64 #endif // ! INCLUDE_RCF_CALLBACKCONNECTIONSERVICE_HPP