version 0.0.1
[fms.git] / include / freenet / ifcpconnected.h
1 #ifndef _ifcpconnected_\r
2 #define _ifcpconnected_\r
3 \r
4 #include "fcpv2.h"\r
5 \r
6 /**\r
7         \brief Defines interface for classes that use an existing FCP Connection\r
8 */\r
9 class IFCPConnected\r
10 {\r
11 public:\r
12         IFCPConnected():m_fcp(NULL) {}\r
13         IFCPConnected(FCPv2 *fcp):m_fcp(fcp)    {}\r
14         \r
15         virtual void SetFCPConnection(FCPv2 *fcp)       { m_fcp=fcp; }\r
16         virtual FCPv2 *GetFCPConnection()                       { return m_fcp; }\r
17         \r
18         /**\r
19                 \brief called when the FCP connection becomes disconnected\r
20                 \r
21                 Parent object is responsible for calling this whenever the FCP connection becomes disconnected\r
22         */\r
23         virtual void FCPDisconnected()=0;\r
24         /**\r
25                 \brief called when the FCP connection becomes connected\r
26                 \r
27                 Parent object is responsible for calling this whenever the FCP connection is established\r
28         */\r
29         virtual void FCPConnected()=0;\r
30         \r
31 protected:\r
32         FCPv2 *m_fcp;\r
33 };\r
34 \r
35 #endif  // _ifcpconnected_\r