|
1 /* |
|
2 * Copyright (c) 2004 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: Implements interface for CAttendeeDialogBase. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CATTENDEE_DIALOG_BASE_H__ |
|
21 #define __CATTENDEE_DIALOG_BASE_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <akndialog.h> |
|
25 #include <aknselectionlist.h> |
|
26 #include "mattendeeengobserver.h" |
|
27 #include "cattendeeview.h" |
|
28 |
|
29 |
|
30 // FORWARD DECLARATION |
|
31 class CEikonEnv; |
|
32 class CEikFormattedCellListBox; |
|
33 class CAknPopupList; |
|
34 class CEikListBox; |
|
35 class CAknMarkableListDialog; |
|
36 class CAttendeeLBModel; |
|
37 class CAttendeeUiUtils; |
|
38 class CAttendeeSender; |
|
39 class CAttendeeCaller; |
|
40 class MAttendeeEng; |
|
41 class TPbkContactItemField; |
|
42 class CPbkContactItem; |
|
43 class CPbkDataSaveAppUi; |
|
44 class CAknIconArray; |
|
45 class CMessageData; |
|
46 class MAgnEntryUiCallback; |
|
47 |
|
48 |
|
49 // CLASS DECLARATION |
|
50 /** |
|
51 * Implements CAttendeeDialogBase dialog |
|
52 */ |
|
53 class CAttendeeDialogBase : public CAknMarkableListDialog, |
|
54 public MAttendeeEngObserver |
|
55 { |
|
56 public: |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CAttendeeDialogBase(); |
|
61 |
|
62 protected: |
|
63 /** |
|
64 * C++ default constructor. |
|
65 * @param aArray, ownership is transfered end of this method. |
|
66 * So if this method leave, ownership is not yet transfered |
|
67 * @param aEngine |
|
68 * @param aMenuBarResourceId |
|
69 * @param aOkMenuBarResourceId |
|
70 * @return CAttendeeDialogBase object |
|
71 */ |
|
72 CAttendeeDialogBase( MDesCArray *aArray, |
|
73 MAttendeeEng& aEngine, |
|
74 TInt aMenuBarResourceId, |
|
75 TInt aOkMenuBarResourceId, |
|
76 MAgnEntryUiCallback& aEntryUiCallback); |
|
77 |
|
78 /** |
|
79 * By default Symbian 2nd phase constructor is protected. |
|
80 * @param aMenuBarResourceId |
|
81 */ |
|
82 void ConstructL( TInt aMenuBarResourceId ); |
|
83 |
|
84 public: //From CAknMarkableListDialog |
|
85 TKeyResponse OfferKeyEventL ( const TKeyEvent &aKeyEvent, |
|
86 TEventCode aType ); |
|
87 void DynInitMenuPaneL ( TInt aResourceId, CEikMenuPane *aMenuPane ); |
|
88 void SelectionListProcessCommandL( TInt aCommandId ); |
|
89 |
|
90 public: //From CAknDialog |
|
91 void PrepareLC( TInt aResourceId ); |
|
92 |
|
93 public: //From MAttendeeEngObserver |
|
94 virtual void NotifyL(); |
|
95 virtual void NotifyError( TInt aErrorCode ); |
|
96 |
|
97 protected: // new functions |
|
98 /** |
|
99 * Get Help context |
|
100 * @param aContext |
|
101 */ |
|
102 virtual void GetHelpContext( TCoeHelpContext& aContext ) const = 0; |
|
103 |
|
104 /** |
|
105 * Handle if help feature is enabled |
|
106 * @param aMenuPane |
|
107 */ |
|
108 void HandleHelpFeature( CEikMenuPane& aMenuPane ) const; |
|
109 |
|
110 /** |
|
111 * Handle call command |
|
112 * @param aCommandId |
|
113 */ |
|
114 void CallCmdL( TInt aCommandId ); |
|
115 |
|
116 /** |
|
117 * Handle send command |
|
118 * @param aUid |
|
119 */ |
|
120 void SendCmdL( TUid aUid ); |
|
121 |
|
122 /** |
|
123 * Select sms addresses |
|
124 * @param aContactItem |
|
125 */ |
|
126 const TPbkContactItemField* SelectSmsAddressL( |
|
127 CPbkContactItem& aContactItem ); |
|
128 |
|
129 /** |
|
130 * Select mms addresses |
|
131 * @param aContactItem |
|
132 */ |
|
133 const TPbkContactItemField* SelectMmsAddressL( |
|
134 CPbkContactItem& aContactItem ); |
|
135 |
|
136 /** |
|
137 * Select email addresses |
|
138 * @param aContactItem |
|
139 */ |
|
140 const TPbkContactItemField* SelectEmailAddressL( |
|
141 CPbkContactItem& aContactItem ); |
|
142 /** |
|
143 * Create addresss arrays which used to create message |
|
144 * @param aIndex |
|
145 * @param aUid |
|
146 * @param aMessageData |
|
147 */ |
|
148 void CreateAddressArraysL( const TInt aIndex, |
|
149 const TUid aUid, |
|
150 CMessageData& aMessageData ); |
|
151 |
|
152 /** |
|
153 * Handle "add to contacts"-options menu command |
|
154 * @param aCommandId |
|
155 */ |
|
156 void ContactsDataSaveCmdL( TInt aCommandId ); |
|
157 |
|
158 /** |
|
159 * Create new contact |
|
160 * @return created contact item |
|
161 */ |
|
162 CPbkContactItem* CreateContactL( TPtrC aEmailAddress ) const; |
|
163 |
|
164 /** |
|
165 * Load needed icons |
|
166 * Must call after PrepareLC method |
|
167 */ |
|
168 void LoadIconsL(); |
|
169 |
|
170 /** |
|
171 * Append icon to icon array. CAknIconArray owns icons so it is |
|
172 * easier to it leave safely. |
|
173 * |
|
174 * @param aIcons Icon array |
|
175 * @param aSkinID TAknsItemID |
|
176 * @param aIconFileWithPath Icon file name with path |
|
177 * @param aIconGraphicsIndex Picture index. |
|
178 * @param aIconGraphicsMaskIndex Mask index. |
|
179 */ |
|
180 void AddIconL( CAknIconArray* aIcons, |
|
181 const TAknsItemID aSkinID, |
|
182 const TDesC& aIconFileWithPath, |
|
183 TInt aIconGraphicsIndex, |
|
184 TInt aIconGraphicsMaskIndex ); |
|
185 |
|
186 /** |
|
187 * Make empty text to list box |
|
188 */ |
|
189 virtual void MakeEmptyTextListBoxL() = 0; |
|
190 |
|
191 /** |
|
192 * Display attendee's details |
|
193 */ |
|
194 virtual void DetailsCmdL() = 0; |
|
195 |
|
196 protected: // data |
|
197 /// TInt variable, used to just initialize markablelist |
|
198 TInt iIndex; |
|
199 |
|
200 ///Own: |
|
201 MDesCArray* iLBModel; |
|
202 |
|
203 ///Have dialog iLBModel's ownership |
|
204 TBool iOwnership; |
|
205 |
|
206 ///Own: |
|
207 CAttendeeUiUtils* iUiUtils; |
|
208 |
|
209 ///Own: |
|
210 CAttendeeSender* iSender; |
|
211 |
|
212 ///Own: |
|
213 CAttendeeCaller* iCaller; |
|
214 |
|
215 //Ref |
|
216 MAttendeeEng& iEngine; |
|
217 |
|
218 //Own: |
|
219 CPbkDataSaveAppUi* iPbkDataSaveAppUi; |
|
220 |
|
221 MAgnEntryUiCallback& iEntryUiCallback; |
|
222 |
|
223 //Pointer to "select address" methods |
|
224 typedef const TPbkContactItemField* |
|
225 ( CAttendeeDialogBase::*ContactField )( CPbkContactItem& ); |
|
226 |
|
227 }; |
|
228 |
|
229 #endif // __CATTENDEE_DIALOG_BASE_H__ |
|
230 |
|
231 // End of File |