|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Fetch items from Contact |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPHONESINGLEITEMFETCH_H |
|
20 #define C_CPHONESINGLEITEMFETCH_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "mphoneviewobserver.h" |
|
24 |
|
25 class CPhoneViewController; |
|
26 class CPhoneContactController; |
|
27 class CPhCntSingleItemFetch; |
|
28 class CPhoneStatusPane; |
|
29 |
|
30 /** |
|
31 * Items Fetch from Contact |
|
32 * |
|
33 * |
|
34 * @lib PhoneUIView |
|
35 * @since S60 5.0 |
|
36 */ |
|
37 class CPhoneSingleItemFetch : public CActive, public MPhoneViewObserver |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 IMPORT_C static CPhoneSingleItemFetch* NewL( |
|
46 CEikonEnv& aEikEnv, |
|
47 CPhoneViewController& aViewController, |
|
48 CPhoneContactController& aContactController, |
|
49 CPhoneStatusPane& aStatusPane ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CPhoneSingleItemFetch(); |
|
55 |
|
56 /** |
|
57 * Open single item fetch dialog |
|
58 * @param aCommandParam command parameter holding data for |
|
59 * populating the needed query dialog. |
|
60 */ |
|
61 void OpenSingleItemFetchDialogL( TPhoneCommandParam* aCommandParam ); |
|
62 |
|
63 /** |
|
64 * Delete SingleItemFetch |
|
65 */ |
|
66 void Delete(); |
|
67 |
|
68 /** |
|
69 * See MPhoneViewObserver.h |
|
70 */ |
|
71 void PhoneViewActivatedL(); |
|
72 |
|
73 |
|
74 protected: // from CActive |
|
75 |
|
76 /** |
|
77 * See CActive documentation. |
|
78 */ |
|
79 void RunL(); |
|
80 |
|
81 /** |
|
82 * See CActive documentation. |
|
83 * @param aError symbian error code |
|
84 */ |
|
85 TInt RunError( TInt aError ); |
|
86 |
|
87 /** |
|
88 * See CActive documentation. |
|
89 */ |
|
90 void DoCancel(); |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * C++ default constructor. |
|
96 */ |
|
97 CPhoneSingleItemFetch( |
|
98 CEikonEnv& aEikEnv, |
|
99 CPhoneViewController& aViewController, |
|
100 CPhoneContactController& aContactController, |
|
101 CPhoneStatusPane& aStatusPane ); |
|
102 |
|
103 private: // data |
|
104 |
|
105 |
|
106 /** |
|
107 * Eikon environment delivered from CPhoneViewController |
|
108 */ |
|
109 CEikonEnv& iEikEnv; |
|
110 |
|
111 /** |
|
112 * Reference to owner |
|
113 */ |
|
114 CPhoneViewController& iViewController; |
|
115 |
|
116 /** |
|
117 * Pointer to CPhoneContactController |
|
118 */ |
|
119 CPhoneContactController& iContactController; |
|
120 |
|
121 /** |
|
122 * Pointer to CPhoneStatusPane |
|
123 */ |
|
124 CPhoneStatusPane& iStatusPane; |
|
125 |
|
126 /** |
|
127 * Single Item Fetch |
|
128 */ |
|
129 CPhCntSingleItemFetch* iSingleItemFetch; |
|
130 |
|
131 /** |
|
132 * ResourceId |
|
133 */ |
|
134 TInt iResourceId; |
|
135 |
|
136 /** |
|
137 * ButtonId |
|
138 */ |
|
139 TInt iButtonId; |
|
140 |
|
141 /** |
|
142 * True when singleitem fetch have been completed. |
|
143 */ |
|
144 TBool iFetchPerformed; |
|
145 }; |
|
146 |
|
147 #endif // C_CPHONESINGLEITEMFETCH_H |