|
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 "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: Declares accesslist dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCAACCESSLISTDIALOG_H |
|
20 #define CCAACCESSLISTDIALOG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknform.h> |
|
24 #include <eiklbo.h> |
|
25 #include <bldvariant.hrh> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCAStatusPaneHandler; |
|
29 class CCAAccessArray; |
|
30 class CCAAppUi; |
|
31 class MCAGroupPropertiesPC; |
|
32 |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * This class declares dialog for accesslist |
|
37 * @lib chatng.app |
|
38 */ |
|
39 class CCAAccessListDialog : public CAknDialog, |
|
40 public MEikListBoxObserver |
|
41 { |
|
42 public: // Definitions |
|
43 |
|
44 /// Enumeration for list types |
|
45 enum TListType |
|
46 { |
|
47 EAdminList = 0, |
|
48 EAccessList, |
|
49 EBannedList |
|
50 }; |
|
51 |
|
52 public: // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * C++ default constructor. |
|
56 * @param aTitlePane Handle to title pane |
|
57 * @param aUserList List of users |
|
58 * @param aIsMemberAccessModified Will be set to ETrue when member's |
|
59 * access is modified |
|
60 * @param aFirstItemCanBeEdited The first item can be edited or not |
|
61 * @param aRemoveAllShouldExitDialog Removing all members should exit |
|
62 * the dialog after removal |
|
63 * @param aTitleResource The title resource of the dialog |
|
64 * @param aFilterList users that should not be put on the aUserList |
|
65 * @param aFilterList2 users that should not be put on the aUserList |
|
66 */ |
|
67 CCAAccessListDialog( CCAStatusPaneHandler& aTitlePane, |
|
68 CDesCArray& aUserList, |
|
69 TBool& aIsMemberAccessModified, |
|
70 TBool aFirstItemCanBeEdited, |
|
71 TBool aRemoveAllShouldExitDialog, |
|
72 TInt aTitleResource, |
|
73 TListType aListType, |
|
74 CDesCArray* aFilterList = NULL, |
|
75 CDesCArray* aFilterList2 = NULL |
|
76 ); |
|
77 |
|
78 /** |
|
79 * Destructor |
|
80 */ |
|
81 virtual ~CCAAccessListDialog(); |
|
82 /** |
|
83 * Symbian OS Second Phased constructor |
|
84 * @param aMenuBarResourceId Menu items to be shown in options menu |
|
85 */ |
|
86 void ConstructL( TInt aMenuBarResourceId ); |
|
87 |
|
88 |
|
89 /** |
|
90 * Help Key Support |
|
91 * This function is called by the Framework to get the context to launch |
|
92 * Help |
|
93 * |
|
94 * @param aContext The context that contains the appid and the help id. |
|
95 */ |
|
96 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
97 |
|
98 private: //new functions |
|
99 |
|
100 /** |
|
101 * This method displays data query for WVID |
|
102 */ |
|
103 void DisplayManualDataQueryL(); |
|
104 |
|
105 /** |
|
106 * This method launches popup list that contains items from friends list |
|
107 */ |
|
108 void DisplayPopupFriendsListL(); |
|
109 |
|
110 /** |
|
111 * This method shows confirmation dialog when item is removed from list |
|
112 */ |
|
113 void DisplayRmvConfirmationL(); |
|
114 |
|
115 /** |
|
116 * Displays confirmation if all items are deleted from list |
|
117 */ |
|
118 void DisplayRmvAllConfirmationL(); |
|
119 |
|
120 /** |
|
121 * This method displays pop up menu |
|
122 */ |
|
123 void DisplayPopupMenuL(); |
|
124 |
|
125 /** |
|
126 * Checks if given user id is in given list |
|
127 * and checks if it should be removed from other. |
|
128 * @param aUserList List of users |
|
129 * @param aUserId User id |
|
130 * @return ETrue if on list EFalse if not |
|
131 */ |
|
132 TBool CanUserBeAddedToListL( const CDesCArray& aUserList, const TDesC& aUserId ); |
|
133 |
|
134 private: //From MEikCommandObserver |
|
135 |
|
136 /** |
|
137 * Processes user commands. |
|
138 * @see MEikCommandObserver |
|
139 */ |
|
140 void ProcessCommandL( TInt aCommand ); |
|
141 |
|
142 private: //from MEikMenuObserver |
|
143 |
|
144 /** |
|
145 * Dynamically initialises menu pane |
|
146 * @see MEikMenuObserver |
|
147 */ |
|
148 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
149 |
|
150 protected: // MEikListBoxObserver |
|
151 |
|
152 /** |
|
153 * @see MEikListBoxObserver |
|
154 */ |
|
155 void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); |
|
156 |
|
157 protected: // Functions from CEikDialog |
|
158 |
|
159 /** |
|
160 * From CEikDialog Sets the layout for dialog |
|
161 */ |
|
162 void PreLayoutDynInitL(); |
|
163 |
|
164 /** |
|
165 * From CEikDialog. This method is called when buttons are pressed |
|
166 * @param aButtonId Button id, if OK-button then dialog is dismissed |
|
167 * @return EFalse if cancel is pressed |
|
168 */ |
|
169 TBool OkToExitL( TInt aButtonId ); |
|
170 |
|
171 /** |
|
172 * From CCoeControl. Handles the keyevents |
|
173 * @param aKeyEvent The key event. |
|
174 * @param aType The type of key event: EEventKey, |
|
175 * EEventKeyUp or EEventKeyDown. |
|
176 * @return Indicates whether or not the key event |
|
177 * was used by this control |
|
178 */ |
|
179 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
180 TEventCode aType ); |
|
181 |
|
182 /** |
|
183 * From CEikDialog. @see CEikDialog for more details. |
|
184 */ |
|
185 TInt MappedCommandId( TInt aButtonId ); |
|
186 |
|
187 private: // Data |
|
188 |
|
189 //Handle to titlepane. doesn't own |
|
190 CCAStatusPaneHandler* iTitlePane; |
|
191 |
|
192 //Access array. owns |
|
193 CCAAccessArray* iItemArray; |
|
194 |
|
195 //UserId. owns |
|
196 HBufC* iWVUserId; |
|
197 |
|
198 //UserList. doesn't own |
|
199 CDesCArray& iUserList; |
|
200 |
|
201 //Pop-up menu. Owns |
|
202 CEikMenuBar* iPopupMenu; |
|
203 |
|
204 //Indicates if member access is modified |
|
205 TBool& iIsMemberAccessModified; |
|
206 |
|
207 // whether the first item can be edited or not |
|
208 TBool iFirstItemCanBeEdited; |
|
209 |
|
210 // Indicates whether selecting the "remove all"-option |
|
211 // should exit the dialog or not |
|
212 TBool iRemoveAllShouldExitDialog; |
|
213 |
|
214 //Title of the dialog |
|
215 TInt iTitleResource; |
|
216 |
|
217 // These variables are used for menubar and prompts |
|
218 TInt iMenuBarResourceId; |
|
219 TInt iDeletePromptResourceId; |
|
220 TInt iDeleteAllPromptResourceId; |
|
221 |
|
222 // Owns the resource |
|
223 HBufC* iEmptyText; |
|
224 |
|
225 // Topic for help launcher, not owned, just points to constant help topic |
|
226 const TDesC* iHelpTopic; |
|
227 |
|
228 /** |
|
229 * Not owned just referenced. The Filters are used to identify whether a |
|
230 * contact has to be removed from say the |
|
231 * banned list when added to access list |
|
232 * access list when added to banned list |
|
233 * banned list when added to admin privileges list |
|
234 * admin privileges list when added to banned list |
|
235 * The contact will be searched in these filters passed on from the goup |
|
236 * properties dialog. |
|
237 */ |
|
238 CDesCArray* iFilterList; |
|
239 |
|
240 /** |
|
241 * Not owned just referenced. The Filters are used to identify whether a |
|
242 * contact has to be removed from say the |
|
243 * banned list when added to access list |
|
244 * access list when added to banned list |
|
245 * banned list when added to admin privileges list |
|
246 * admin privileges list when added to banned list |
|
247 * The contact will be searched in these filters passed on from the goup |
|
248 * properties dialog. |
|
249 */ |
|
250 CDesCArray* iFilterList2; |
|
251 |
|
252 /// List type. |
|
253 TListType iListType; |
|
254 |
|
255 // EFalse, if numeric input for WVID fields is wanted |
|
256 TBool iTextualInputMode; |
|
257 |
|
258 //Reference to the app ui instance |
|
259 CCAAppUi* iAppUi; |
|
260 |
|
261 //Pointer to group properties dialog pc |
|
262 MCAGroupPropertiesPC* iGroupPropertiesPC; |
|
263 }; |
|
264 |
|
265 #endif // CCAACCESSLISTDIALOG_H |
|
266 |
|
267 // End of File |