author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 10 Sep 2009 12:58:20 +0300 | |
changeset 11 | 5c0037c72160 |
parent 10 | fc9cf246af83 |
permissions | -rw-r--r-- |
5 | 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 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: Implements the contact callback interface. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef C_CCONTACTINTERFACECALLBACK_H |
|
19 |
#define C_CCOTNACTINTERFACECALLBACK_H |
|
20 |
||
21 |
// System includes |
|
22 |
#include <e32base.h> |
|
23 |
||
24 |
// User Includes |
|
25 |
#include "contactcallback.h" |
|
26 |
#include "contactinterface.hrh" |
|
27 |
#include "contactiterator.h" |
|
28 |
||
29 |
// Forward declarations |
|
30 |
class MLiwNotifyCallback; |
|
31 |
class CLiwGenericParamList; |
|
32 |
||
33 |
/** |
|
34 |
* CContactInterfaceCallback - Implements the contact callback interface. |
|
35 |
* Passes the frames and notifies the the events |
|
36 |
* through callback. |
|
37 |
*/ |
|
38 |
class CContactInterfaceCallback : public CBase, public MContactCallback |
|
39 |
{ |
|
40 |
public: |
|
41 |
/** |
|
42 |
* Two-phased constructor. |
|
43 |
* @return CContactInterfaceCallback* |
|
44 |
*/ |
|
45 |
static CContactInterfaceCallback* NewL(); |
|
46 |
||
47 |
/** |
|
48 |
* Two-phased constructor. |
|
49 |
* @return CContactInterfaceCallback* |
|
50 |
*/ |
|
51 |
static CContactInterfaceCallback* NewL(CSingleContact* aContact); |
|
52 |
||
10
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
53 |
static void ContactIDToUTF(HBufC* aContactID); |
5 | 54 |
/** |
55 |
* Destructor |
|
56 |
*/ |
|
57 |
virtual ~CContactInterfaceCallback(); |
|
58 |
||
59 |
private: |
|
60 |
/** |
|
61 |
* Default constructor. |
|
62 |
*/ |
|
63 |
CContactInterfaceCallback(); |
|
64 |
||
65 |
public: |
|
66 |
/** |
|
67 |
* Method to set the parameters for the callback. |
|
68 |
* @param aCallback the callback to be called |
|
69 |
* @param aTransId the transaction Id |
|
70 |
* @param aInParamList to send back to LIW. |
|
71 |
* @return void |
|
72 |
*/ |
|
73 |
void SetParams( MLiwNotifyCallback* aCallback, |
|
74 |
const TInt aTransId, |
|
75 |
const CLiwGenericParamList* aInParamList ); |
|
76 |
||
77 |
||
78 |
/** |
|
79 |
* Called when the any async operation returns with error or success |
|
80 |
* @return void |
|
81 |
*/ |
|
82 |
virtual void HandleReturnValue(TOperationEvent aEventId, const TInt& aError, TInt aTransId ); |
|
83 |
||
84 |
/** |
|
85 |
* Called when the GetList returns the an iterator (which iterates over the output) |
|
86 |
* @return void |
|
87 |
*/ |
|
88 |
virtual void HandleReturnIter(const TInt& aError,CContactIter* aIter, TInt aTransId ); |
|
89 |
||
10
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
90 |
virtual void HandleReturnId(const TInt& aError, HBufC8* acntId, TInt aTransId ); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
91 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
92 |
virtual void HandleReturnArray( const TInt& aError, RPointerArray<HBufC8>& idArray, TInt aTransId ); |
5 | 93 |
|
94 |
private: |
|
95 |
//Pointer to the MLiwNotifyCallback callback passed by consumer. |
|
96 |
MLiwNotifyCallback* iCallback; |
|
97 |
||
98 |
//Trasaction ID. |
|
99 |
TInt iTransactionId; |
|
100 |
||
101 |
//Referance to top the Input Parameter list passed by consumer. |
|
102 |
const CLiwGenericParamList* iInParamList; |
|
103 |
||
104 |
//Event Generic Parameter List |
|
105 |
CLiwGenericParamList* iEventParamList; |
|
106 |
||
107 |
//pointer to the single contact object needed for cleanup |
|
108 |
CSingleContact* iContact; |
|
109 |
}; |
|
110 |
||
111 |
#endif // C_CCOTNACTINTERFACECALLBACK_H |