author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 22 | fc9cf246af83 |
permissions | -rw-r--r-- |
19 | 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 the License "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: callback class implemented for synchronous api's. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef C_CONTACTSYNCCALLBACK_H |
|
20 |
#define C_CONTACTSYNCCALLBACK_H |
|
21 |
||
22 |
#include <e32std.h> |
|
23 |
#include "contactcallback.h" |
|
24 |
/** |
|
25 |
*class CContactSyncCallback |
|
26 |
*class to implement the callback class which is needed in cases of synchronous implementation of the api's. |
|
27 |
*/ |
|
28 |
||
29 |
class CContactSyncCallback: public CBase ,public MContactCallback |
|
30 |
{ |
|
31 |
public: |
|
32 |
/** |
|
33 |
*Default constructor. |
|
34 |
*/ |
|
35 |
CContactSyncCallback(); |
|
36 |
/** |
|
37 |
*Destructor. |
|
38 |
*/ |
|
39 |
~CContactSyncCallback(); |
|
40 |
/** |
|
41 |
*Getter method to get a pointer to the iterator does a shallow copy. |
|
42 |
*@return value CContactIter*, an iterator class pointer. |
|
43 |
*/ |
|
44 |
CContactIter* GetIter(); |
|
45 |
/** |
|
46 |
*Getter method to get error code. |
|
47 |
*@return value TInt, integer error code KErrNone if no error |
|
48 |
*occured else can be any system wide error code. |
|
49 |
*/ |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
50 |
void GetArray(RPointerArray<HBufC8>*); |
19 | 51 |
TInt GetErrorCode(); |
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
52 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
53 |
HBufC8* GetId(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
54 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
55 |
|
19 | 56 |
/** |
57 |
*setter method for the wait shceduler shallow copy owned by core class. |
|
58 |
*@return void. |
|
59 |
*/ |
|
60 |
void SetWaitScheduler(CActiveSchedulerWait *aWaitScheduler); |
|
61 |
||
62 |
/** |
|
63 |
*virtual method inherited from the MContactCallback interface class |
|
64 |
*called by the core class if any event occurs in the asynchronous call. |
|
65 |
*@param aError error code. |
|
66 |
*@param aTransId trasaction Id of the asychronous call. |
|
67 |
*@return void. |
|
68 |
*/ |
|
69 |
virtual void HandleReturnValue(TOperationEvent aEvent, const TInt& aError, TInt aTransId ); |
|
70 |
/** |
|
71 |
*virtual method inherited from the MContactCallback interface class |
|
72 |
*called by the core class if any asynchronous call completes successfully . |
|
73 |
*@param aError error code. |
|
74 |
*@param aIter pointer to the CContactIter class. |
|
75 |
*@param aTransId trasaction Id of the asychronous call. |
|
76 |
*@return void. |
|
77 |
*/ |
|
78 |
virtual void HandleReturnIter( const TInt& aError, CContactIter* aIter, TInt aTransId ); |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
79 |
virtual void HandleReturnArray( const TInt& aError, RPointerArray<HBufC8>& idArray, TInt aTransId ); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
80 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
81 |
virtual void HandleReturnId(const TInt& aError, HBufC8* acntId, TInt aTransId ); |
19 | 82 |
private: |
83 |
//Pointer to the CContactIter class. |
|
84 |
CContactIter* iIter; |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
85 |
RPointerArray<HBufC8> iIDArray; |
19 | 86 |
//Integer error code. |
87 |
TInt iError; |
|
88 |
//Scheduler pointer owned by core class used by this class |
|
89 |
CActiveSchedulerWait *iWaitScheduler; |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
90 |
HBufC8* icntId; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
91 |
|
19 | 92 |
public: |
93 |
TInt iErrKey; |
|
94 |
}; |
|
95 |
||
96 |
#endif //C_CONTACTSYNCCALLBACK_H |