68
|
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: GSPDataHSDPAPlugin implementation.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef GSPDATAHSDPAPLUGIN_H
|
|
19 |
#define GSPDATAHSDPAPLUGIN_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 |
#include <gspubsubslistener.h>
|
|
29 |
#include <mgssettingpsobserver.h>
|
|
30 |
#include <MProfileEngine.h>
|
|
31 |
#include <MProEngProfileActivationObserver.h>
|
|
32 |
#include <MProEngNotifyHandler.h>
|
|
33 |
|
|
34 |
// Classes referenced
|
|
35 |
class CAknNavigationDecorator;
|
|
36 |
class CAknViewAppUi;
|
|
37 |
class CAknWaitDialog;
|
|
38 |
class CGSPDataHSDPAModel;
|
|
39 |
|
|
40 |
// Constants
|
|
41 |
const TUid KGSPDataHSDPAPluginUID = { 0x10282DC8 };
|
|
42 |
_LIT( KPDataHSDPAResourceFileName, "z:gspdatahsdpapluginrsc.rsc" );
|
|
43 |
|
|
44 |
// CLASS DECLARATION
|
|
45 |
|
|
46 |
/**
|
|
47 |
* CGSPDataHSDPAPlugin view class.
|
|
48 |
*
|
|
49 |
* This class handles state and application logic of PDataHSDPA settings.
|
|
50 |
* The plugin is a type of EGSItemTypeSettingDialog and therefore the GS FW will
|
|
51 |
* call HandleSelection() instead of DoActivate().
|
|
52 |
*
|
|
53 |
*/
|
|
54 |
class CGSPDataHSDPAPlugin : public CGSPluginInterface,
|
|
55 |
public MGSSettingPSObserver,
|
|
56 |
public MProEngProfileActivationObserver
|
|
57 |
{
|
|
58 |
public: // Constructors and destructor
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Symbian OS two-phased constructor
|
|
62 |
* @return
|
|
63 |
*/
|
|
64 |
static CGSPDataHSDPAPlugin* NewL( TAny* aInitParams );
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Destructor.
|
|
68 |
*/
|
|
69 |
~CGSPDataHSDPAPlugin();
|
|
70 |
|
|
71 |
public: // From CAknView
|
|
72 |
|
|
73 |
/**
|
|
74 |
* See base class.
|
|
75 |
*/
|
|
76 |
TUid Id() const;
|
|
77 |
|
|
78 |
public: // From CGSPluginInterface
|
|
79 |
|
|
80 |
/**
|
|
81 |
* See base class.
|
|
82 |
*/
|
|
83 |
void GetCaptionL( TDes& aCaption ) const;
|
|
84 |
|
|
85 |
/**
|
|
86 |
* See base class.
|
|
87 |
*/
|
|
88 |
TInt PluginProviderCategory() const;
|
|
89 |
|
|
90 |
/**
|
|
91 |
* See base class.
|
|
92 |
*/
|
|
93 |
TGSListboxItemTypes ItemType();
|
|
94 |
|
|
95 |
/**
|
|
96 |
* See base class.
|
|
97 |
*/
|
|
98 |
void GetValue( const TGSPluginValueKeys aKey,
|
|
99 |
TDes& aValue );
|
|
100 |
|
|
101 |
/**
|
|
102 |
* See base class.
|
|
103 |
*/
|
|
104 |
void HandleSelection( const TGSSelectionTypes aSelectionType );
|
|
105 |
|
|
106 |
/**
|
|
107 |
* See base class.
|
|
108 |
*/
|
|
109 |
TGSMenuActivationItems MenuActivationItem();
|
|
110 |
|
|
111 |
/**
|
|
112 |
* @see CGSPluginInterface header file.
|
|
113 |
*/
|
|
114 |
TBool Visible() const;
|
|
115 |
|
|
116 |
public: //From MProEngProfileActivationObserver
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Callback for device profile change
|
|
120 |
* Used for observing offline mode activation
|
|
121 |
*/
|
|
122 |
void HandleProfileActivatedL( TInt aProfileId );
|
|
123 |
|
|
124 |
protected: // New
|
|
125 |
|
|
126 |
/**
|
|
127 |
* C++ default constructor.
|
|
128 |
*/
|
|
129 |
CGSPDataHSDPAPlugin();
|
|
130 |
|
|
131 |
/**
|
|
132 |
* Symbian OS default constructor.
|
|
133 |
*/
|
|
134 |
void ConstructL();
|
|
135 |
|
|
136 |
protected: // From CAknView
|
|
137 |
|
|
138 |
/**
|
|
139 |
* See base class.
|
|
140 |
*/
|
|
141 |
void DoActivateL( const TVwsViewId& aPrevViewId,
|
|
142 |
TUid aCustomMessageId,
|
|
143 |
const TDesC8& aCustomMessage );
|
|
144 |
|
|
145 |
/**
|
|
146 |
* See base class.
|
|
147 |
*/
|
|
148 |
void DoDeactivate();
|
|
149 |
|
|
150 |
private: // New
|
|
151 |
|
|
152 |
/**
|
|
153 |
* Sets HSDPA state.
|
|
154 |
* Launches a setting page with a confirmation dialog
|
|
155 |
*/
|
|
156 |
void SetHSDPAStateL();
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Opens localized resource file.
|
|
160 |
*/
|
|
161 |
void OpenLocalizedResourceFileL(
|
|
162 |
const TDesC& aResourceFileName,
|
|
163 |
RConeResourceLoader& aResourceLoader );
|
|
164 |
|
|
165 |
/**
|
|
166 |
* Resets all Active Connections, If Any.
|
|
167 |
*/
|
|
168 |
void ResetActiveConnectionsL();
|
|
169 |
|
|
170 |
/*
|
|
171 |
*
|
|
172 |
* Indexes of HSDPA on/off items in a listbox are not the same as
|
|
173 |
* aPDataHSDPState value. Therefore matching between these two is
|
|
174 |
* required.
|
|
175 |
*/
|
|
176 |
TBool ShowHSDPASettingPageL( TInt& aHsdpaState );
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Leaving version of GetValue()
|
|
180 |
*/
|
|
181 |
void GetValueL( TDes& aValue );
|
|
182 |
|
|
183 |
/**
|
|
184 |
* Updating parent view
|
|
185 |
*/
|
|
186 |
void UpdateParentViewL();
|
|
187 |
|
|
188 |
private: // From MGSSettingPSObserver
|
|
189 |
/**
|
|
190 |
* Callback from MGSSettingPSObserver
|
|
191 |
*/
|
|
192 |
void HandleNotifyPSL( const TUid aUid, const TInt& aKey,
|
|
193 |
const TRequestStatus& aStatus );
|
|
194 |
|
|
195 |
protected: // Data
|
|
196 |
|
|
197 |
// PDataHSDPA model.
|
|
198 |
CGSPDataHSDPAModel* iModel;
|
|
199 |
|
|
200 |
// Resource loader.
|
|
201 |
RConeResourceLoader iResources;
|
|
202 |
|
|
203 |
//PubSub object for NW mode state listener
|
|
204 |
CGSPubSubsListener* iNwModeListener;
|
|
205 |
|
|
206 |
MProfileEngine* iProfileEngine;
|
|
207 |
MProEngNotifyHandler* iNotifyHandler;
|
|
208 |
|
|
209 |
TInt iNetworkMode;
|
|
210 |
|
|
211 |
TBool iHSDPASettingSupport;
|
|
212 |
};
|
|
213 |
|
|
214 |
#endif // GSPDATAHSDPAPLUGIN_H
|
|
215 |
// End of File
|