1 /* |
|
2 * Copyright (c) 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: GSPDataConnectionPlugin implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef GSPDATACONNECTIONPLUGIN_H |
|
19 #define GSPDATACONNECTIONPLUGIN_H |
|
20 |
|
21 // User includes |
|
22 |
|
23 // System includes |
|
24 #include <gsplugininterface.h> |
|
25 #include <aknview.h> |
|
26 #include <ConeResLoader.h> |
|
27 #include <eikclb.h> |
|
28 |
|
29 // Classes referenced |
|
30 class CAknViewAppUi; |
|
31 class CGSPDataConnectionModel; |
|
32 |
|
33 |
|
34 // Constants |
|
35 const TUid KGSPDataConnectionPluginUID = { 0x10282DC4}; |
|
36 _LIT( KPDataConnectionResourceFileName, "z:GSPDataConnectionPluginRsc.rsc" ); |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * CGSPDataConnectionPlugin view class. |
|
42 * |
|
43 * This class handles state and application logic of PDataConnection settings. |
|
44 * The plugin is a type of EGSItemTypeSettingDialog and therefore the GS FW will |
|
45 * call HandleSelection() instead of DoActivate(). |
|
46 * |
|
47 */ |
|
48 class CGSPDataConnectionPlugin : public CGSPluginInterface |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Symbian OS two-phased constructor |
|
54 * @return |
|
55 */ |
|
56 static CGSPDataConnectionPlugin* NewL( TAny* aInitParams ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CGSPDataConnectionPlugin(); |
|
62 |
|
63 public: // From CAknView |
|
64 |
|
65 /** |
|
66 * See base class. |
|
67 */ |
|
68 TUid Id() const; |
|
69 |
|
70 public: // From CGSPluginInterface |
|
71 |
|
72 /** |
|
73 * See base class. |
|
74 */ |
|
75 void GetCaptionL( TDes& aCaption ) const; |
|
76 |
|
77 /** |
|
78 * See base class. |
|
79 */ |
|
80 TInt PluginProviderCategory() const; |
|
81 |
|
82 /** |
|
83 * See base class. |
|
84 */ |
|
85 TGSListboxItemTypes ItemType(); |
|
86 |
|
87 /** |
|
88 * See base class. |
|
89 */ |
|
90 void GetValue( const TGSPluginValueKeys aKey, |
|
91 TDes& aValue ); |
|
92 |
|
93 /** |
|
94 * See base class. |
|
95 */ |
|
96 void HandleSelection( const TGSSelectionTypes aSelectionType ); |
|
97 |
|
98 /** |
|
99 * See base class. |
|
100 */ |
|
101 TGSMenuActivationItems MenuActivationItem(); |
|
102 |
|
103 /** |
|
104 * @see CGSPluginInterface header file. |
|
105 */ |
|
106 TBool Visible() const; |
|
107 |
|
108 protected: // New |
|
109 |
|
110 /** |
|
111 * C++ default constructor. |
|
112 */ |
|
113 CGSPDataConnectionPlugin(); |
|
114 |
|
115 /** |
|
116 * Symbian OS default constructor. |
|
117 */ |
|
118 void ConstructL(); |
|
119 |
|
120 protected: // From CAknView |
|
121 |
|
122 /** |
|
123 * See base class. |
|
124 */ |
|
125 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
126 TUid aCustomMessageId, |
|
127 const TDesC8& aCustomMessage ); |
|
128 |
|
129 /** |
|
130 * See base class. |
|
131 */ |
|
132 void DoDeactivate(); |
|
133 |
|
134 private: // New |
|
135 |
|
136 /** |
|
137 * Sets Attach state. |
|
138 * Launches Setting Page for setting the item |
|
139 */ |
|
140 void SetAttachStateL(); |
|
141 |
|
142 /** |
|
143 * Launches Attach on/off dialog. |
|
144 * @param aPDataConnectionState Current value of Attach state. This WILL BE |
|
145 * UPDATED to contain new user selected value. |
|
146 * @return ETrue if value updated. |
|
147 * EFalse if value not updated. |
|
148 */ |
|
149 TBool ShowAttachSettingPageL( TInt& aPDataConnectionState ); |
|
150 |
|
151 /** |
|
152 * Opens localized resource file. |
|
153 */ |
|
154 void OpenLocalizedResourceFileL( |
|
155 const TDesC& aResourceFileName, |
|
156 RConeResourceLoader& aResourceLoader ); |
|
157 |
|
158 /** |
|
159 * Leaving version of GetValue() |
|
160 */ |
|
161 void GetValueL( TDes& aValue ); |
|
162 |
|
163 protected: // Data |
|
164 |
|
165 // PDataConnection model. |
|
166 CGSPDataConnectionModel* iModel; |
|
167 |
|
168 // Resource loader. |
|
169 RConeResourceLoader iResources; |
|
170 }; |
|
171 |
|
172 #endif // GSPDATACONNECTIONPLUGIN_H |
|
173 // End of File |
|