1 /* |
1 /* |
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
21 |
21 |
22 #include <e32base.h> |
22 #include <e32base.h> |
23 #include <ximpbase.h> |
23 #include <ximpbase.h> |
24 #include <protocolpresenceauthorization.h> |
24 #include <protocolpresenceauthorization.h> |
25 #include "mpresencepluginconnectionobs.h" |
25 #include "mpresencepluginconnectionobs.h" |
26 #include "presenceplugincontactsobs.h" |
|
27 #include "presencelogger.h" |
26 #include "presencelogger.h" |
28 |
27 |
29 class TXIMPRequestId; |
28 class TXIMPRequestId; |
30 class MXIMPIdentity; |
29 class MXIMPIdentity; |
31 class MPresenceInfoFilter; |
30 class MPresenceInfoFilter; |
32 class MProtocolPresenceAuthorizationDataHost; |
31 class MProtocolPresenceAuthorizationDataHost; |
33 class MSimpleWinfo; |
32 class MSimpleWinfo; |
34 class CPresencePluginData; |
33 class CPresencePluginData; |
35 class CPresencePluginContacts; |
|
36 |
34 |
37 /** |
35 /** |
38 * CPresencePluginAuthorization |
36 * CPresencePluginAuthorization |
39 * |
37 * |
40 * Simple Engine Connection |
38 * Simple Engine Connection |
41 * |
39 * |
42 * @lib presenceplugin.dll |
40 * @lib presenceplugin.dll |
43 * @since S60 v3.2 |
41 * @since S60 v3.2 |
44 */ |
42 */ |
45 NONSHARABLE_CLASS( CPresencePluginAuthorization ) : |
43 NONSHARABLE_CLASS( CPresencePluginAuthorization ) : public CActive, |
46 public CActive, |
44 public MProtocolPresenceAuthorization |
47 public MProtocolPresenceAuthorization, |
|
48 public MPresencePluginContactsObs |
|
49 { |
45 { |
50 public: // Constructor and destructor |
46 public: // Constructor and destructor |
51 |
47 |
52 /** |
48 /** |
53 * Current operation |
49 * Current operation |
182 * @return none |
177 * @return none |
183 */ |
178 */ |
184 void DoPerformCancelPresenceBlockFromPresentityL( |
179 void DoPerformCancelPresenceBlockFromPresentityL( |
185 const MXIMPIdentity& aPresentityId, |
180 const MXIMPIdentity& aPresentityId, |
186 TRequestStatus& aClientStatus ); |
181 TRequestStatus& aClientStatus ); |
187 |
182 |
188 /** |
|
189 * Resolve is blocked contact a blocked friend request |
|
190 * |
|
191 * @since S60 5.0 |
|
192 * @param aPresenceId, identity to be resolved |
|
193 * @param aObserver, Returns results |
|
194 * @param aStatus, client status |
|
195 */ |
|
196 void IsBlockedContactFriendRequestL( |
|
197 const TDesC& aPresenceId, |
|
198 MPresencePluginContactsObs& aObserver, |
|
199 TRequestStatus& aStatus ); |
|
200 |
|
201 private: |
183 private: |
202 |
184 |
203 /** |
185 /** |
204 * Standard C++ constructor |
186 * Standard C++ constructor |
205 * @param aObs callback for complete requests |
187 * @param aObs callback for complete requests |
206 */ |
188 */ |
207 CPresencePluginAuthorization( |
189 CPresencePluginAuthorization( |
208 MPresencePluginConnectionObs& aObs, |
190 MPresencePluginConnectionObs& aObs, |
209 CPresencePluginData* aPresenceData ); |
191 CPresencePluginData* aPresenceData ); |
210 |
|
211 void ConstructL(); |
|
212 |
192 |
213 public: // from base class MXIMPBase |
193 public: // from base class MXIMPBase |
214 |
194 |
215 /** |
195 /** |
216 * Defined in a base class |
196 * Defined in a base class |
346 */ |
326 */ |
347 void DoCancelPresenceBlockFromPresentityL( |
327 void DoCancelPresenceBlockFromPresentityL( |
348 const MXIMPIdentity& aPresentityId, |
328 const MXIMPIdentity& aPresentityId, |
349 TXIMPRequestId aReqId ); |
329 TXIMPRequestId aReqId ); |
350 |
330 |
351 public: // MPresencePluginContactsObs |
|
352 |
|
353 /** |
|
354 * Request Complete |
|
355 * |
|
356 * @param aResult Result data returned, ownership changed to client. |
|
357 * In operation EOperationIsPresenceStoredToContacts |
|
358 * return type is TBool*. |
|
359 * @param aOperation Operation type |
|
360 * @param aError Completion error code |
|
361 */ |
|
362 void RequestComplete( TAny* aResult, |
|
363 TPresenceContactsOperation aOperation, TInt aError ); |
|
364 |
|
365 protected: // from base class CActive |
331 protected: // from base class CActive |
366 |
332 |
367 /** |
333 /** |
368 * Defined in a base class |
334 * Defined in a base class |
369 */ |
335 */ |
637 /** |
603 /** |
638 * Block state. |
604 * Block state. |
639 * Own. |
605 * Own. |
640 */ |
606 */ |
641 TPluginAuthState iAuthState; |
607 TPluginAuthState iAuthState; |
642 |
|
643 /* |
|
644 * Virtual phone book contact database operations |
|
645 * Own. |
|
646 */ |
|
647 CPresencePluginContacts* iContacts; |
|
648 |
|
649 /* |
|
650 * Data Returned by CPresencePluginContacts |
|
651 */ |
|
652 TBool iContactIsStored; |
|
653 |
608 |
654 SIMPLE_UNIT_TEST( T_CPresencePluginAuthorization ) |
609 SIMPLE_UNIT_TEST( T_CPresencePluginAuthorization ) |
655 SIMPLE_UNIT_TEST( T_CPresencePluginXdmUtils ) |
610 SIMPLE_UNIT_TEST( T_CPresencePluginXdmUtils ) |
656 |
611 |
657 }; |
612 }; |