51
|
1 |
/*
|
|
2 |
* Copyright (c) 2006, 2007 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: Interface for managing cached presence authorization information.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MXIMPFWPROTOCOLPRESENCEAUTHORIZATIONDATAHOST_H
|
|
19 |
#define MXIMPFWPROTOCOLPRESENCEAUTHORIZATIONDATAHOST_H
|
|
20 |
|
|
21 |
#include <e32std.h>
|
|
22 |
#include <presenceprotocolpluginhostifids.hrh>
|
|
23 |
#include <ximpbase.h>
|
|
24 |
|
|
25 |
|
|
26 |
class MXIMPIdentity;
|
|
27 |
class MXIMPObjectCollection;
|
|
28 |
class MPresenceBlockInfo;
|
|
29 |
class MPresenceGrantRequestInfo;
|
|
30 |
class MXIMPDataSubscriptionState;
|
|
31 |
class MXIMPStatus;
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
/**
|
|
36 |
* Interface for managing cached presence authorization information.
|
|
37 |
*
|
|
38 |
* Interface is used by protocol adaptations to manage
|
|
39 |
* presence authorization related information in
|
|
40 |
* XIMP Framework internal data cache.
|
|
41 |
*
|
|
42 |
* This interface is implemented by XIMP Framework.
|
|
43 |
* Protocol adaptation can obtain reference to this
|
|
44 |
* interface from MXIMPProtocolConnectionHost interface.
|
|
45 |
*
|
|
46 |
* For each separated protocol connection, protocol
|
|
47 |
* adaptation must use the specific
|
|
48 |
* MProtocolPresentityGroupsDataHost instance,
|
|
49 |
* what is received from the connection specific
|
|
50 |
* MXIMPProtocolConnectionHost instance.
|
|
51 |
*
|
|
52 |
* @ingroup ximppresprotocolpluginhostapi
|
|
53 |
* @since S60 v3.2
|
|
54 |
*/
|
|
55 |
class MProtocolPresenceAuthorizationDataHost : public MXIMPBase
|
|
56 |
{
|
|
57 |
public:
|
|
58 |
|
|
59 |
/** Interface ID for the MProtocolPresenceAuthorizationDataHost. */
|
|
60 |
enum { KInterfaceId = PRES_IF_ID_PROTOCOL_PRESENCE_AUTHORIZATION_DATAHOST };
|
|
61 |
|
|
62 |
|
|
63 |
protected:
|
|
64 |
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Protected destructor. Object instancies
|
|
68 |
* can't be deleted via this interface.
|
|
69 |
*/
|
|
70 |
virtual ~MProtocolPresenceAuthorizationDataHost() {}
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
public: // Handling presence grant requests
|
|
75 |
|
|
76 |
|
|
77 |
/**
|
|
78 |
* Notifies XIMP Framework from
|
|
79 |
* presence grant request list contents.
|
|
80 |
*
|
|
81 |
* Protocol adaptation implementation can call this
|
|
82 |
* method to notify XIMP Framework from
|
|
83 |
* complete presence grant request list content.
|
|
84 |
* XIMP Framework calculates the changes
|
|
85 |
* (new and obsoleted requests) from previous
|
|
86 |
* presence grant request list content, and notifies
|
|
87 |
* the subscribing clients from data changes.
|
|
88 |
*
|
|
89 |
* XIMP Framework takes ownership of the object
|
|
90 |
* collection and all objects contained within, if
|
|
91 |
* the method succeeds without a leave.
|
|
92 |
*
|
|
93 |
* @param [in] aGrantRequestList
|
|
94 |
* MXIMPObjectCollection object containing zero or
|
|
95 |
* more MPresenceGrantRequestInfo objects. Each
|
|
96 |
* contained MPresenceGrantRequestInfo shall present
|
|
97 |
* single presence grant request entry in the list of
|
|
98 |
* presence grant requests.
|
|
99 |
*
|
|
100 |
* @return The request ID identifying the issued request.
|
|
101 |
* Data cache update request is processed
|
|
102 |
* asynchronously and operation completion result is
|
|
103 |
* signalled to adaptation direction through
|
|
104 |
* MXIMPProtocolConnectionHostObserver interface.
|
|
105 |
*
|
|
106 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
107 |
* @leave KErrArgument if NULL argument(s) were provided.
|
|
108 |
*/
|
|
109 |
virtual TXIMPRequestId HandlePresenceGrantRequestListL(
|
|
110 |
MXIMPObjectCollection* aGrantRequestList ) = 0;
|
|
111 |
|
|
112 |
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Notifies XIMP Framework from new presence grant request.
|
|
116 |
*
|
|
117 |
* Protocol adaptation implementation can call this
|
|
118 |
* method to notify XIMP Framework from
|
|
119 |
* new presence grant request. XIMP Framework calculates
|
|
120 |
* the change, from previous presence grant request list content,
|
|
121 |
* and notifies the subscribing clients from data changes.
|
|
122 |
*
|
|
123 |
* XIMP Framework takes ownership of the argument(s),
|
|
124 |
* if method succeeds without a leave.
|
|
125 |
*
|
|
126 |
* @param [in] aGrantRequest
|
|
127 |
* MPresenceGrantRequestInfo object holding
|
|
128 |
* information about new presence grant request
|
|
129 |
* entry.
|
|
130 |
*
|
|
131 |
* @return The request ID identifying the issued request.
|
|
132 |
* Data cache update request is processed
|
|
133 |
* asynchronously and operation completion result is
|
|
134 |
* signalled to adaptation direction through
|
|
135 |
* MXIMPProtocolConnectionHostObserver interface.
|
|
136 |
*
|
|
137 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
138 |
* @leave KErrArgument if NULL argument(s) were provided.
|
|
139 |
*/
|
|
140 |
virtual TXIMPRequestId HandlePresenceGrantRequestReceivedL(
|
|
141 |
MPresenceGrantRequestInfo* aGrantRequest ) = 0;
|
|
142 |
|
|
143 |
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Notifies XIMP Framework that existing presence
|
|
147 |
* grant request is obsoleted.
|
|
148 |
*
|
|
149 |
* Notifies XIMP Framework that existing presence
|
|
150 |
* grant request is obsoleted and thus it needs be removed
|
|
151 |
* from presence grant request list. XIMP Framework
|
|
152 |
* calculates the change, from previous presence grant request
|
|
153 |
* list content, and notifies the subscribing clients from
|
|
154 |
* data changes.
|
|
155 |
*
|
|
156 |
* XIMP Framework takes ownership of the argument(s),
|
|
157 |
* if method succeeds without a leave.
|
|
158 |
*
|
|
159 |
* @param [in] aGrantRequestor
|
|
160 |
* Identity of the presence grant requestor, which
|
|
161 |
* presence grant request needs to be removed
|
|
162 |
* from presence grant request list.
|
|
163 |
*
|
|
164 |
* @return The request ID identifying the issued request.
|
|
165 |
* Data cache update request is processed
|
|
166 |
* asynchronously and operation completion result is
|
|
167 |
* signalled to adaptation direction through
|
|
168 |
* MXIMPProtocolConnectionHostObserver interface.
|
|
169 |
*
|
|
170 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
171 |
* @leave KErrArgument if NULL argument(s) were provided.
|
|
172 |
*/
|
|
173 |
virtual TXIMPRequestId HandlePresenceGrantRequestObsoletedL(
|
|
174 |
MXIMPIdentity* aGrantRequestor ) = 0;
|
|
175 |
|
|
176 |
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Gets data subscription state for presence grant request list.
|
|
180 |
*
|
|
181 |
* Protocol adaptation can call this method to retrieve
|
|
182 |
* presence grant request list current data subscription state.
|
|
183 |
* Protocol adaptation can use data subscription state
|
|
184 |
* information, to optimize its own processing and
|
|
185 |
* network trafic amount.
|
|
186 |
*
|
|
187 |
* @return Presence grant request list data subscription state.
|
|
188 |
* Interface ownership is not returned to caller.
|
|
189 |
* Caller shouldn't cache the returned reference
|
|
190 |
* for later use.
|
|
191 |
*/
|
|
192 |
virtual const MXIMPDataSubscriptionState&
|
|
193 |
PresenceGrantRequestDataSubscriptionState() const = 0;
|
|
194 |
|
|
195 |
|
|
196 |
|
|
197 |
/**
|
|
198 |
* Updates data subscription state for presence grant
|
|
199 |
* request list.
|
|
200 |
*
|
|
201 |
* Updates data subscription state for presence grant
|
|
202 |
* request list. XIMP Framework calculates the
|
|
203 |
* subscription state change, from previous
|
|
204 |
* presence grant request list content, and notifies the
|
|
205 |
* subscribing clients from data changes.
|
|
206 |
*
|
|
207 |
* XIMP Framework takes ownership of the argument(s),
|
|
208 |
* if method succeeds without a leave.
|
|
209 |
*
|
|
210 |
* @param [in] aSubscriptionState
|
|
211 |
* New data subscription state for presence grant
|
|
212 |
* request list.
|
|
213 |
*
|
|
214 |
* @param [in] aStatus
|
|
215 |
* Optional status object describing the
|
|
216 |
* the reason, why protocol adaptation updated
|
|
217 |
* data item subscription state. Given status object
|
|
218 |
* is passed to clients through data item specific
|
|
219 |
* data change event. NULL value is accepted.
|
|
220 |
*
|
|
221 |
* @return The request ID identifying the issued request.
|
|
222 |
* Data cache update request is processed
|
|
223 |
* asynchronously and operation completion result is
|
|
224 |
* signalled to adaptation direction through
|
|
225 |
* MXIMPProtocolConnectionHostObserver interface.
|
|
226 |
*
|
|
227 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
228 |
* @leave KErrArgument if NULL subscription state argument was provided.
|
|
229 |
*/
|
|
230 |
virtual TXIMPRequestId SetPresenceGrantRequestDataSubscriptionStateL(
|
|
231 |
MXIMPDataSubscriptionState* aSubscriptionState,
|
|
232 |
MXIMPStatus* aStatus ) = 0;
|
|
233 |
|
|
234 |
|
|
235 |
|
|
236 |
public: // Handling presence blocking
|
|
237 |
|
|
238 |
|
|
239 |
|
|
240 |
/**
|
|
241 |
* Notifies XIMP Framework from presence block list
|
|
242 |
* contents.
|
|
243 |
*
|
|
244 |
* Protocol adaptation implementation can call this
|
|
245 |
* method to notify XIMP Framework from complete
|
|
246 |
* presence block list content. XIMP Framework
|
|
247 |
* calculates the changes (new and removed block entries)
|
|
248 |
* from previous presence block list content, and notifies
|
|
249 |
* the subscribing clients from data changes.
|
|
250 |
*
|
|
251 |
* XIMP Framework takes ownership of the object
|
|
252 |
* collection and all objects contained within, if
|
|
253 |
* the method succeeds without a leave.
|
|
254 |
*
|
|
255 |
* @param [in] aBlockList
|
|
256 |
* MXIMPObjectCollection object containing zero or
|
|
257 |
* more MPresenceBlockInfo objects. Each
|
|
258 |
* contained MPresenceBlockInfo shall present
|
|
259 |
* single presence block entry in the presence block list.
|
|
260 |
*
|
|
261 |
* @return The request ID identifying the issued request.
|
|
262 |
* Data cache request is processed asynchronously and
|
|
263 |
* its completion is signalled to adaptation direction
|
|
264 |
* through MXIMPProtocolConnectionHostObserver interface,
|
|
265 |
* with MXIMPProtocolRequestCompleteEvent event.
|
|
266 |
*
|
|
267 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
268 |
* @leave KErrArgument if NULL argument(s) were provided.
|
|
269 |
*/
|
|
270 |
virtual TXIMPRequestId HandlePresenceBlockListL(
|
|
271 |
MXIMPObjectCollection* aBlockList ) = 0;
|
|
272 |
|
|
273 |
|
|
274 |
|
|
275 |
/**
|
|
276 |
* Notifies XIMP Framework from new
|
|
277 |
* presence block entry.
|
|
278 |
*
|
|
279 |
* Protocol adaptation implementation can call this
|
|
280 |
* method to notify XIMP Framework from
|
|
281 |
* new presence block entry. XIMP Framework
|
|
282 |
* calculates the change, from previous presence block
|
|
283 |
* list content, and notifies the subscribing clients
|
|
284 |
* from data changes.
|
|
285 |
*
|
|
286 |
* XIMP Framework takes ownership of the argument(s),
|
|
287 |
* if method succeeds without a leave.
|
|
288 |
*
|
|
289 |
* @param [in] aBlockInfo
|
|
290 |
* MPresenceBlockInfo object containing
|
|
291 |
* presence block entrys information.
|
|
292 |
*
|
|
293 |
* @return The request ID identifying the issued request.
|
|
294 |
* Data cache request is processed asynchronously and
|
|
295 |
* its completion is signalled to adaptation direction
|
|
296 |
* through MXIMPProtocolConnectionHostObserver interface,
|
|
297 |
* with MXIMPProtocolRequestCompleteEvent event.
|
|
298 |
*
|
|
299 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
300 |
* @leave KErrArgument if NULL argument(s) were provided.
|
|
301 |
*/
|
|
302 |
virtual TXIMPRequestId HandlePresenceBlockedL(
|
|
303 |
MPresenceBlockInfo* aBlockInfo ) = 0;
|
|
304 |
|
|
305 |
|
|
306 |
|
|
307 |
/**
|
|
308 |
* Notifies XIMP Framework from cancellation of
|
|
309 |
* existing presence block entry.
|
|
310 |
*
|
|
311 |
* Protocol adaptation can call this method to notify
|
|
312 |
* XIMP Framework from cancellation of existing
|
|
313 |
* presence block entry. XIMP Framework calculates
|
|
314 |
* the change, from previous presence block list content,
|
|
315 |
* and notifies the subscribing clients from data changes.
|
|
316 |
*
|
|
317 |
* XIMP Framework takes ownership of the argument(s),
|
|
318 |
* if method succeeds without a leave.
|
|
319 |
*
|
|
320 |
* @param [in] aBlockedEntityId
|
|
321 |
* Identity of the presence block entry which to
|
|
322 |
* remove from presence block list.
|
|
323 |
*
|
|
324 |
* @return The request ID identifying the issued request.
|
|
325 |
* Data cache request is processed asynchronously and
|
|
326 |
* its completion is signalled to adaptation direction
|
|
327 |
* through MXIMPProtocolConnectionHostObserver interface,
|
|
328 |
* with MXIMPProtocolRequestCompleteEvent event.
|
|
329 |
*
|
|
330 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
331 |
* @leave KErrArgument if NULL argument(s) were provided.
|
|
332 |
*/
|
|
333 |
virtual TXIMPRequestId HandlePresenceBlockCanceledL(
|
|
334 |
MXIMPIdentity* aBlockedEntityId ) = 0;
|
|
335 |
|
|
336 |
|
|
337 |
|
|
338 |
/**
|
|
339 |
* Gets data subscription state for presence block list.
|
|
340 |
*
|
|
341 |
* Protocol adaptation can call this method to retrieve
|
|
342 |
* presence block list current data subscription state.
|
|
343 |
* Protocol adaptation can use data subscription state
|
|
344 |
* information, to optimize its own processing and
|
|
345 |
* network trafic amount.
|
|
346 |
*
|
|
347 |
* @return Presence block list data subscription state.
|
|
348 |
* Interface ownership is not returned to caller.
|
|
349 |
* Caller shouldn't cache the returned reference
|
|
350 |
* for later use.
|
|
351 |
*/
|
|
352 |
virtual const MXIMPDataSubscriptionState&
|
|
353 |
PresenceBlockDataSubscriptionState() const = 0;
|
|
354 |
|
|
355 |
|
|
356 |
|
|
357 |
/**
|
|
358 |
* Updates data subscription state for presence block list.
|
|
359 |
*
|
|
360 |
* Updates data subscription state for presence block list.
|
|
361 |
* XIMP Framework calculates the subscription state change,
|
|
362 |
* from previous presence block list content, and notifies the
|
|
363 |
* subscribing clients from data changes.
|
|
364 |
*
|
|
365 |
* XIMP Framework takes ownership of the argument(s),
|
|
366 |
* if method succeeds without a leave.
|
|
367 |
*
|
|
368 |
* @param [in] aSubscriptionState
|
|
369 |
* New data subscription state for presence block list.
|
|
370 |
*
|
|
371 |
* @param [in] aStatus
|
|
372 |
* Optional status object describing the
|
|
373 |
* the reason, why protocol adaptation updated
|
|
374 |
* data item subscription state. Given status object
|
|
375 |
* is passed to clients through data item specific
|
|
376 |
* data change event. NULL value is accepted.
|
|
377 |
*
|
|
378 |
* @return The request ID identifying the issued request.
|
|
379 |
* Data cache request is processed asynchronously and
|
|
380 |
* its completion is signalled to adaptation direction
|
|
381 |
* through MXIMPProtocolConnectionHostObserver interface,
|
|
382 |
* with MXIMPProtocolRequestCompleteEvent event.
|
|
383 |
*
|
|
384 |
* @leave KErrNoMemory if failed to allocate memory.
|
|
385 |
* @leave KErrArgument if NULL subscription state argument was provided.
|
|
386 |
*/
|
|
387 |
virtual TXIMPRequestId SetPresenceBlockDataSubscriptionStateL(
|
|
388 |
MXIMPDataSubscriptionState* aSubscriptionState,
|
|
389 |
MXIMPStatus* aStatus ) = 0;
|
|
390 |
|
|
391 |
|
|
392 |
};
|
|
393 |
|
|
394 |
|
|
395 |
#endif // MXIMPFWPROTOCOLPRESENCEAUTHORIZATIONDATAHOST_H
|