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 a settings dialog for a packet data connection |
|
15 * method plugin |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CMPLUGINPACKETDATA_SETTINGS_DLG_H |
|
20 #define CMPLUGINPACKETDATA_SETTINGS_DLG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <cmpluginbaseeng.h> |
|
24 #include <mcmdexec.h> |
|
25 #include <cmpbasesettingsdlg.h> |
|
26 #include "cmcommsdatnotifier.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * CmPluginPacketDataSettingsDlg dialog class |
|
32 * |
|
33 * Displays the Packet data settings |
|
34 * |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 NONSHARABLE_CLASS( CmPluginPacketDataSettingsDlg ) : |
|
38 public CmPluginBaseSettingsDlg |
|
39 , public MCmCommsDatWatcher |
|
40 , public CCmParentViewNotifier |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phase constructor |
|
46 * |
|
47 * @since S60 3.2 |
|
48 * @param aCmPluginBaseEng The connection method to use |
|
49 * @return instance of the class |
|
50 */ |
|
51 static CmPluginPacketDataSettingsDlg* NewL( CCmPluginBaseEng& |
|
52 aCmPluginBaseEng ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CmPluginPacketDataSettingsDlg(); |
|
58 |
|
59 public: // From CmPluginBaseSettingsDlg |
|
60 |
|
61 /** |
|
62 * From CmPluginBaseSettingsDlg |
|
63 * constructor for the dialog |
|
64 * |
|
65 * @since S60 3.2 |
|
66 */ |
|
67 virtual TInt ConstructAndRunLD( ); |
|
68 |
|
69 /** |
|
70 * From CmPluginBaseSettingsDlg |
|
71 * Collects the packet data specific setting information for |
|
72 * displaying |
|
73 * |
|
74 * @since S60 3.2 |
|
75 * @param aItemArray an array of setting information |
|
76 */ |
|
77 virtual void UpdateListBoxContentBearerSpecificL( |
|
78 CDesCArray& aItemArray ); |
|
79 |
|
80 /** |
|
81 * From CmPluginBaseSettingsDlg |
|
82 * displays the advanced settings dialog |
|
83 * |
|
84 * @since S60 3.2 |
|
85 */ |
|
86 virtual void RunAdvancedSettingsL(); |
|
87 |
|
88 public: // from class MCmCommsDatWatcher |
|
89 |
|
90 /** |
|
91 * Watch changes in CommsDat |
|
92 */ |
|
93 void CommsDatChangesL(); |
|
94 |
|
95 public: // from class CCmParentViewNotifier |
|
96 |
|
97 void NotifyParentView( TInt aValue ); |
|
98 |
|
99 protected: |
|
100 /** From CAknDialog */ |
|
101 TBool OkToExitL( TInt aButtonId ); |
|
102 |
|
103 private: // Constructors |
|
104 |
|
105 CmPluginPacketDataSettingsDlg( CCmPluginBaseEng& aCmPluginBaseEng ); |
|
106 |
|
107 private: // From CmPluginBaseSettingsDlg |
|
108 |
|
109 /** |
|
110 * From CmPluginBaseSettingsDlg |
|
111 * Redraws the list box |
|
112 * |
|
113 * @since S60 3.2 |
|
114 */ |
|
115 virtual void UpdateListBoxContentL(); |
|
116 |
|
117 /** |
|
118 * From CmPluginBaseSettingsDlg |
|
119 * according to the setting type the correct edit dialog is displayed |
|
120 * |
|
121 * @since S60 3.2 |
|
122 * @param aAttribute |
|
123 * @param aCommandId |
|
124 */ |
|
125 virtual TBool ShowPopupSettingPageL( TUint32 aAttribute, |
|
126 TInt aCommandId ); |
|
127 |
|
128 /** |
|
129 * From CmPluginBaseSettingsDlg |
|
130 * Get help contest of the plugin |
|
131 * |
|
132 * @since S60 5.0 |
|
133 */ |
|
134 virtual void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
135 |
|
136 private: // From MEikCommandObserver |
|
137 |
|
138 /** |
|
139 * From MEikCommandObserver |
|
140 * see base class for description |
|
141 * |
|
142 * @since S60 3.2 |
|
143 * @param aCommandId |
|
144 */ |
|
145 virtual void ProcessCommandL( TInt aCommandId ); |
|
146 |
|
147 private: // New functions |
|
148 |
|
149 /** |
|
150 * Shows the bool setting page for a certain setting or |
|
151 * simply changes the setting if ok key was pressed |
|
152 * @since S60 3.2 |
|
153 * @param aAttribute The setting to be changed by the setting page |
|
154 * @param aCommandId Command id, to make difference between ok and change commands |
|
155 * @return the new setting value |
|
156 */ |
|
157 TBool ChangeBoolSettingL( TUint32 aAttribute, TInt aCommandId ); |
|
158 |
|
159 void HandleCommsDatChangeL(); |
|
160 |
|
161 private: |
|
162 |
|
163 TInt iNotifyFromSon; |
|
164 }; |
|
165 |
|
166 #endif // CMPLUGINPACKETDATA_SETTINGS_DLG_H |
|