|
1 /* |
|
2 * Copyright (c) 2006 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: IETF SIMPLE Protocol implementation for XIMP Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPRESENCEPLUGINCONNECTIONOBS_H |
|
20 #define MPRESENCEPLUGINCONNECTIONOBS_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <ximpbase.h> |
|
24 #include <ximpprotocolpluginhostifids.hrh> |
|
25 |
|
26 class TXIMPRequestId; |
|
27 class MXIMPObjectFactory; |
|
28 class CPresencePluginWinfo; |
|
29 class MSimpleWinfo; |
|
30 class MXIMPProtocolConnectionHost; |
|
31 class CPresencePluginXdmUtils; |
|
32 class CPresencePluginWatcher; |
|
33 class MPresenceObjectFactory; |
|
34 class MProtocolPresenceDataHost; |
|
35 class MProtocolPresenceAuthorization; |
|
36 class CPresencePluginVirtualGroup; |
|
37 class CPresencePluginAuthorization; |
|
38 class CPresencePluginGroups; |
|
39 |
|
40 /** |
|
41 * MPresencePluginConnectionObs |
|
42 * |
|
43 * presence engine connection |
|
44 * |
|
45 * @lib presenceplugin.dll |
|
46 * @since S60 v3.2 |
|
47 */ |
|
48 NONSHARABLE_CLASS( MPresencePluginConnectionObs ) |
|
49 { |
|
50 |
|
51 public: |
|
52 |
|
53 enum TReqType |
|
54 { |
|
55 /** undefined */ |
|
56 ENoReq = 0, |
|
57 /** Connection initializing */ |
|
58 EOpenSess, |
|
59 /** Connection close */ |
|
60 ECloseSess, |
|
61 /** Publish own data */ |
|
62 EPublish, |
|
63 /** Subscribe Own data */ |
|
64 ESubscribeOwn, |
|
65 /** Subscribe other user */ |
|
66 ESubscribeOther |
|
67 }; |
|
68 |
|
69 /** |
|
70 * CPresencePluginWatcher accessor |
|
71 * @return CPresencePluginWatcher |
|
72 */ |
|
73 virtual CPresencePluginWatcher* WatcherHandlerL() = 0; |
|
74 |
|
75 /** |
|
76 * Complete the request |
|
77 * |
|
78 * @param aType request type |
|
79 * @param aStatus status |
|
80 */ |
|
81 virtual void CompleteReq(TReqType aType, TInt aStatus ) = 0; |
|
82 |
|
83 /** |
|
84 * Complete the request |
|
85 * |
|
86 * @param aReqId ximp request id |
|
87 * @param aStatus status |
|
88 */ |
|
89 virtual void CompleteReq(TXIMPRequestId aReqId, TInt aStatus ) = 0; |
|
90 |
|
91 /** |
|
92 * XIMP Object Factory accessor |
|
93 * @return ximp Object Factory |
|
94 */ |
|
95 virtual MXIMPObjectFactory& ObjectFactory()=0; |
|
96 |
|
97 /** |
|
98 * XIMP Object Factory accessor |
|
99 * @return PrFw Object Factory |
|
100 */ |
|
101 virtual MPresenceObjectFactory& PresenceObjectFactoryOwn()=0; |
|
102 |
|
103 /** |
|
104 * XIMP presence authorization accessor |
|
105 * @return PrFw Protocol Presence Authorization |
|
106 */ |
|
107 virtual MProtocolPresenceAuthorization& PresenceAuthorization() = 0; |
|
108 |
|
109 /** |
|
110 * XIMP presence authorization accessor as own internal type |
|
111 * @return Presence Authorization |
|
112 */ |
|
113 virtual CPresencePluginAuthorization& InternalPresenceAuthorization() = 0; |
|
114 |
|
115 /** |
|
116 * Gets reference to |
|
117 * MProtocolPresenceDataHost interface. |
|
118 * |
|
119 * Presence protocol connection implementation uses returned |
|
120 * data host interface to manage the Presence connection's |
|
121 * presence auhtorization data. |
|
122 * |
|
123 * @return MProtocolPresenceAuthorizationDataHost interface. |
|
124 * Interface ownership is not returned caller. |
|
125 * Returned interface is guaranteed to remain valid (usable) |
|
126 * as long as this source interface. |
|
127 */ |
|
128 virtual MProtocolPresenceDataHost& ProtocolPresenceHost() = 0; |
|
129 |
|
130 /** |
|
131 * CPresencePluginWinfo accessor |
|
132 * @return CPresencePluginWinfo, ownership is not transferred. |
|
133 */ |
|
134 virtual CPresencePluginWinfo* WinfoHandlerL()=0; |
|
135 |
|
136 /** |
|
137 * CPresencePluginWinfoObserver is terminated |
|
138 * @param aReason reason code |
|
139 */ |
|
140 virtual void WinfoTerminatedL( TInt aReason )=0; |
|
141 |
|
142 /** |
|
143 * Watcher info subscription notification is received |
|
144 * @aWinfo notification content |
|
145 */ |
|
146 virtual void WinfoNotification( MSimpleWinfo& aWinfo ) = 0; |
|
147 |
|
148 /** |
|
149 * Current registered SIP entity |
|
150 */ |
|
151 virtual TPtrC8 CurrentSipPresentity8() = 0; |
|
152 |
|
153 /** |
|
154 * Access connection host |
|
155 * @return MximpProtocolConnectionHost |
|
156 */ |
|
157 virtual MXIMPProtocolConnectionHost* Host() = 0; |
|
158 |
|
159 /** |
|
160 * Current domain syntax accessor |
|
161 */ |
|
162 virtual TPtrC16 CurrentDomain() = 0; |
|
163 |
|
164 /** |
|
165 * Access CPresencePluginXdmUtils |
|
166 * @return CPresencePluginXdmUtils entity |
|
167 */ |
|
168 virtual CPresencePluginXdmUtils* XdmUtilsL() = 0; |
|
169 |
|
170 /** |
|
171 * Get ETag |
|
172 * @return TDesC8, etag value |
|
173 */ |
|
174 virtual const TDesC8& GetETag() const = 0; |
|
175 |
|
176 /** |
|
177 * Set ETag |
|
178 * @return none |
|
179 */ |
|
180 virtual void SetETag( const TDesC8& aETag ) = 0; |
|
181 |
|
182 /** |
|
183 * Get client session time tupleId |
|
184 * @return TInt, tuple value |
|
185 */ |
|
186 virtual TInt GetTupleId() const = 0; |
|
187 |
|
188 /** |
|
189 * Set session time tupleId |
|
190 * @return none |
|
191 */ |
|
192 virtual void SetTupleId( const TInt aTupleId ) =0; |
|
193 |
|
194 /** |
|
195 * Get Stop publish state |
|
196 * @return TBool, stop publish state |
|
197 */ |
|
198 virtual TBool GetStopPublishState() = 0; |
|
199 |
|
200 /** |
|
201 * Is Stop publish called |
|
202 * @return TBool, stop publish called state |
|
203 */ |
|
204 virtual TBool IsStopPublishCalled() = 0; |
|
205 |
|
206 /** |
|
207 * Get Stop publish state |
|
208 * @return TBool, stop publish state |
|
209 */ |
|
210 virtual void SetStopPublishState( TBool aState ) = 0; |
|
211 |
|
212 /** |
|
213 * Get Stop publish state |
|
214 * @return TBool, session status |
|
215 */ |
|
216 virtual TBool GetSessionStatus( ) = 0; |
|
217 |
|
218 /** |
|
219 * Return instace of subcribed contact |
|
220 * @return TBool, session status |
|
221 */ |
|
222 virtual CPresencePluginVirtualGroup* SubscribedContacts( ) = 0; |
|
223 |
|
224 /** |
|
225 * Get grand request list subscribe state |
|
226 */ |
|
227 virtual TBool GrandListState() = 0; |
|
228 |
|
229 /** |
|
230 * Terminate connection |
|
231 */ |
|
232 virtual void TerminateConnectionL( ) = 0; |
|
233 |
|
234 /** |
|
235 * Return Groups API implemention |
|
236 */ |
|
237 virtual CPresencePluginGroups& GroupsL( ) = 0; |
|
238 |
|
239 /** |
|
240 * Return service id |
|
241 */ |
|
242 virtual TInt& ServiceId( ) = 0; |
|
243 }; |
|
244 |
|
245 #endif |
|
246 |
|
247 // End of File |