|
1 /* |
|
2 * Copyright (c) 2002 - 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 "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: |
|
15 * Message centre's general settings dialog. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MCESETTINGSGENERALSETTINGSDIALOG_H |
|
22 #define MCESETTINGSGENERALSETTINGSDIALOG_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <ConeResLoader.h> |
|
26 #include <StringLoader.h> // StringLoader |
|
27 #include "MceSettingsTitlePaneHandlerDialog.h" |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CMuiuSettingsArray; |
|
32 class MMceSettingsAccountManager; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Message centre's general settings dialog. |
|
39 */ |
|
40 class CMceGeneralSettingsDialog : |
|
41 public CMceSettingsTitlePaneHandlerDialog |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Constructor. |
|
47 */ |
|
48 CMceGeneralSettingsDialog( |
|
49 CMsvSession* aSession, |
|
50 MMsvSessionObserver& aObserver, |
|
51 MMceSettingsAccountManager* aManager |
|
52 ); |
|
53 |
|
54 /** |
|
55 * Constructor. |
|
56 */ |
|
57 void ConstructL(TInt aResource ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CMceGeneralSettingsDialog(); |
|
63 |
|
64 /** |
|
65 * |
|
66 */ |
|
67 IMPORT_C static TInt CreateAndExecuteL( |
|
68 CMsvSession* aSession, MMsvSessionObserver& aObserver ); |
|
69 |
|
70 /** |
|
71 * From CAknDialog |
|
72 */ |
|
73 void ProcessCommandL( TInt aCommandId ); |
|
74 |
|
75 /** |
|
76 * From CoeControl |
|
77 */ |
|
78 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
79 |
|
80 /** |
|
81 * From MEikMenuObserver |
|
82 */ |
|
83 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
84 |
|
85 /** |
|
86 * Starts copying/moving message store functionality |
|
87 */ |
|
88 void MoveMessageStoreL( TInt currentDrive, TInt driveNumber, TBool aDeleteCopiedStore ); |
|
89 |
|
90 /** |
|
91 * Set error when error happens during msg store copying/moving process |
|
92 */ |
|
93 void SetTransferError( TInt aError ); |
|
94 |
|
95 /** |
|
96 * Checks, if there is connection |
|
97 */ |
|
98 TBool CheckIsServerBusyL(); |
|
99 |
|
100 /** |
|
101 * Gives message store path in aPath, when drive number is got |
|
102 * @param aDrive drive number |
|
103 * @param aPath message store path in source |
|
104 */ |
|
105 void FindSourcePathL( TInt aDrive, TFileName& aPath ) const; |
|
106 |
|
107 /** |
|
108 * Gives drive letter and drive delimiter in aPath, when drive number is got |
|
109 * @param aDrive drive number |
|
110 * @param aPath message store path in target |
|
111 */ |
|
112 void GetMessageDriveL( TInt aDrive, TDes& aPath ) const; |
|
113 |
|
114 /** |
|
115 * Sets correct string in General settings memory in use -option |
|
116 */ |
|
117 void UpdateMemorySelectionL(); |
|
118 |
|
119 /** |
|
120 * Closes sms, mms and mail applications before changing message store |
|
121 */ |
|
122 TBool ShutdownAppsL() const; |
|
123 |
|
124 /** |
|
125 * Handles Memory in Use option |
|
126 */ |
|
127 void HandleMemoryInUseDialogL(); |
|
128 |
|
129 /** |
|
130 * Changes the drive of the message store |
|
131 */ |
|
132 #ifdef RD_MULTIPLE_DRIVE |
|
133 void ChangeMessageStoreL(TInt aTargetDrive ); |
|
134 #else |
|
135 void ChangeMessageStoreL(); |
|
136 #endif //RD_MULTIPLE_DRIVE |
|
137 |
|
138 protected: // Functions from base classes |
|
139 |
|
140 /** |
|
141 * From CEikDialog |
|
142 */ |
|
143 virtual void PreLayoutDynInitL(); |
|
144 |
|
145 /** |
|
146 * From CEikDialog |
|
147 */ |
|
148 virtual TBool OkToExitL( TInt aButtonId ); |
|
149 |
|
150 /** |
|
151 * From MEikListBoxObserver |
|
152 */ |
|
153 void HandleListBoxEventL( |
|
154 CEikListBox* aListBox, |
|
155 TListBoxEvent aEventType ); |
|
156 |
|
157 private: |
|
158 |
|
159 /** |
|
160 * Launches help application |
|
161 */ |
|
162 void LaunchHelpL() const; |
|
163 |
|
164 /** |
|
165 * Sets the label for the middle soft key |
|
166 */ |
|
167 void SetMSKButtonL(); |
|
168 |
|
169 #ifdef RD_MULTIPLE_DRIVE |
|
170 /* |
|
171 * Sets the string for result of drive selection |
|
172 */ |
|
173 HBufC* MakeDriveNameStringLC( TInt aDriveNumber ); |
|
174 #endif // RD_MULTIPLE_DRIVE |
|
175 |
|
176 private: // Data |
|
177 CMuiuSettingsArray* iMceSettingsArray; |
|
178 CMsvSession* iSession; |
|
179 MMsvSessionObserver& iObserver; |
|
180 |
|
181 TFileName iSourcePath; |
|
182 TFileName iTargetPath; |
|
183 TBool iMemoryInUse; |
|
184 TBool iNewMailIndicator; |
|
185 friend class CMceMoveProgress; |
|
186 #ifdef RD_MESSAGING_GENERAL_SETTINGS_RENOVATION |
|
187 RConeResourceLoader iResources; |
|
188 #endif // RD_MESSAGING_GENERAL_SETTINGS_RENOVATION |
|
189 MMceSettingsAccountManager* iAccountManager; |
|
190 TInt iTransferError; |
|
191 }; |
|
192 |
|
193 #endif // MCESETTINGSGENERALSETTINGSDIALOG_H |
|
194 |
|
195 // End of File |