|
1 /* |
|
2 * Copyright (c) 2010 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: Class for handling popup query. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef EDCONTACTORPOPUPHANDLER_H |
|
20 #define EDCONTACTORPOPUPHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 //FORWARD DECLERATIONS |
|
25 class CAiwServiceHandler; |
|
26 class CCoeEnv; |
|
27 |
|
28 /** |
|
29 * CEDContactorPopupHandler |
|
30 * Handling launch of popup query. |
|
31 * |
|
32 * @code |
|
33 * |
|
34 * @endcode |
|
35 * |
|
36 * @lib ccacontactorservice |
|
37 * @since S60 v5.0 |
|
38 */ |
|
39 NONSHARABLE_CLASS(CEDContactorPopupHandler) : |
|
40 public CBase, |
|
41 public MAiwNotifyCallback |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CEDContactorPopupHandler* NewL(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CEDContactorPopupHandler(); |
|
55 |
|
56 /** |
|
57 * Launch popup. |
|
58 * |
|
59 * Leaves KErrNotFound if field data not found, |
|
60 * KErrCancel if popup canceled |
|
61 * KErrAbort if red key pressed |
|
62 * KErrGeneral if error occurred |
|
63 * |
|
64 * @since S60 5.0 |
|
65 * @param aCommAddressSelectType: Select Type. |
|
66 * @param aUseDefaults: Is default functionality enabled. |
|
67 */ |
|
68 TDesC& LaunchPopupL( |
|
69 const TDesC8& aContactLinkArray, |
|
70 TAiwCommAddressSelectType aCommAddressSelectType, |
|
71 TBool aUseDefaults); |
|
72 |
|
73 void ClosePopupL(); |
|
74 |
|
75 private: |
|
76 |
|
77 // from base class MAiwNotifyCallback |
|
78 TInt HandleNotifyL(TInt aCmdId, TInt aEventId, |
|
79 CAiwGenericParamList& aEventParamList, |
|
80 const CAiwGenericParamList& aInParamList); |
|
81 |
|
82 private: |
|
83 /** |
|
84 * Constructor. |
|
85 */ |
|
86 CEDContactorPopupHandler(); |
|
87 void ConstructL(); |
|
88 |
|
89 private: //new methods |
|
90 void PrepareResourcesL(); |
|
91 void ReadFieldDataL(CAiwGenericParamList& aEventParamList); |
|
92 void AsyncStop(); |
|
93 |
|
94 private: |
|
95 // data |
|
96 |
|
97 /** |
|
98 * Pointer to AIW service handler |
|
99 * Own. |
|
100 */ |
|
101 CAiwServiceHandler* iServiceHandler; |
|
102 |
|
103 /** |
|
104 * Pointer to scheduler wait. |
|
105 * Own. |
|
106 */ |
|
107 CActiveSchedulerWait* iSchedulerWait; |
|
108 |
|
109 /** |
|
110 * Environment. |
|
111 * Not Own. |
|
112 */ |
|
113 CCoeEnv& iCoeEnv; |
|
114 |
|
115 /** |
|
116 * Offset of loaded resource file. |
|
117 * Own. |
|
118 */ |
|
119 TInt iResourceOffset; |
|
120 |
|
121 /** |
|
122 * Result string from the AIW service. |
|
123 * Own. |
|
124 */ |
|
125 HBufC* iQueryResults; |
|
126 |
|
127 /** |
|
128 * For error handling. |
|
129 * Own. |
|
130 */ |
|
131 TInt iError; |
|
132 |
|
133 }; |
|
134 |
|
135 #endif // EDCONTACTORPOPUPHANDLER_H |
|
136 |
|
137 // End of File |