|
1 /* |
|
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: oss plugin implementation for XIMP Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __COSSPROTOCOLCONNECTION_H__ |
|
20 #define __COSSPROTOCOLCONNECTION_H__ |
|
21 |
|
22 //#include "OSSProtocloLiterals.h" |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <e32def.h> |
|
26 #include <e32std.h> |
|
27 #include <ximpprotocolconnectionhost.h> |
|
28 #include <ximpprotocolconnection.h> |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class MXIMPServiceInfo; |
|
34 |
|
35 class MXIMPContextClientInfo; |
|
36 |
|
37 class MXIMPProtocolConnection; |
|
38 |
|
39 class COSSProtocolConnectionManager; |
|
40 |
|
41 class COSSProtocolImFeatures; |
|
42 |
|
43 /** |
|
44 * COSSProtocolConnection |
|
45 * |
|
46 * OSS Protocol Connection Object. Protocol Connection Object has connection Manager. |
|
47 * |
|
48 * |
|
49 * |
|
50 */ |
|
51 |
|
52 class COSSProtocolConnection : |
|
53 public CBase, |
|
54 public MXIMPProtocolConnection |
|
55 { |
|
56 |
|
57 public: |
|
58 |
|
59 static COSSProtocolConnection* NewL ( const MXIMPServiceInfo& aServiceInfo, |
|
60 const MXIMPContextClientInfo& aClientCtxInfo ); |
|
61 |
|
62 |
|
63 ~COSSProtocolConnection(); |
|
64 |
|
65 |
|
66 |
|
67 void ReleaseConnectionL(); |
|
68 |
|
69 |
|
70 private: |
|
71 |
|
72 COSSProtocolConnection(); |
|
73 |
|
74 |
|
75 void ConstructL ( const MXIMPServiceInfo& aServiceInfo, |
|
76 const MXIMPContextClientInfo& aClientCtxInfo ); |
|
77 |
|
78 |
|
79 public: // from MXIMPBase |
|
80 |
|
81 TAny* GetInterface ( TInt32 aInterfaceId, |
|
82 TIfGetOps aOptions ); |
|
83 |
|
84 const TAny* GetInterface ( TInt32 aInterfaceId, |
|
85 TIfGetOps aOptions ) const; |
|
86 |
|
87 |
|
88 TInt32 GetInterfaceId() const; |
|
89 |
|
90 |
|
91 public: // from CPrFwProtocolConnection |
|
92 |
|
93 // Common |
|
94 void PrimeHost ( MXIMPProtocolConnectionHost& aHost ); |
|
95 |
|
96 |
|
97 // session management.for comments see MXIMPProtocolConnection |
|
98 void OpenSessionL ( const MXIMPContextClientInfo& aClientCtxInfo, |
|
99 TXIMPRequestId aOpId ); |
|
100 |
|
101 void OpenSessionL ( const TInt& aSettingsId, |
|
102 TXIMPRequestId aReqId ); |
|
103 void OpenSessionL ( |
|
104 const MXIMPContextClientInfo& aContextClient, |
|
105 const TInt& aSettingsId, |
|
106 TXIMPRequestId aReqId ); |
|
107 |
|
108 void CloseSession ( const MXIMPContextClientInfo& aClientCtxInfo, |
|
109 TXIMPRequestId aOpId ); |
|
110 void LogoutRequestL(TXIMPRequestId aOpId); |
|
111 |
|
112 void ReOpenSessionsL ( TXIMPRequestId aReqId ); |
|
113 |
|
114 void GetSupportedFeaturesL ( CDesC8Array& aFeatures ) const; |
|
115 |
|
116 MProtocolPresenceFeatures& ProtocolPresenceFeatures(); |
|
117 |
|
118 //MProtocolImFeatures* ProtocolImFeatures(); |
|
119 TAny* GetProtocolInterface(TInt aInterfaceId); |
|
120 |
|
121 |
|
122 private: // data members |
|
123 /** |
|
124 * OWN: |
|
125 */ |
|
126 COSSProtocolConnectionManager* iConnMan; |
|
127 |
|
128 /** |
|
129 * OWN: |
|
130 */ |
|
131 COSSProtocolImFeatures* iImFeatures; |
|
132 /** |
|
133 * OWN: |
|
134 */ |
|
135 TXIMPRequestId iRequestId; |
|
136 |
|
137 |
|
138 TInt iConntectionCreated; |
|
139 |
|
140 MProtocolPresenceFeatures* iPresenceFeature; |
|
141 |
|
142 |
|
143 }; |
|
144 |
|
145 |
|
146 #endif // __COSSPROTOCOLCONNECTION_H__ |