1 /* |
|
2 * Copyright (c) 2008-2009 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: Handles displaying wlan related dialogs |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPMWLANQUERYDIALOG_H |
|
20 #define MPMWLANQUERYDIALOG_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <wdbifwlansettings.h> //for struct |
|
24 #include <ConnectionUiUtilities.h> |
|
25 |
|
26 #include "mpmcommsdataccess.h" |
|
27 |
|
28 // ID of OfflineWlanNote dialog |
|
29 const TUid KUidCOfflineWlanNoteDlg = { 0x101FD671 }; |
|
30 |
|
31 /** |
|
32 * This structure is copied from ConnectionUiUtilitiesCommon.h, |
|
33 * but given here a different name. |
|
34 * Defines preferences of the Wlan Network |
|
35 */ |
|
36 class TMpmWlanNetworkPrefs |
|
37 { |
|
38 public: |
|
39 TWlanSsid iSsId; ///< Ssid of Wlan network |
|
40 TWlanConnectionMode iNetworkMode; ///< mode of Wlan network |
|
41 TWlanConnectionSecurityMode iSecMode; ///< Security mode of Wlan network |
|
42 TBool iProtectedSetupSupported; |
|
43 ///< Wlan network supports Protected Setup |
|
44 }; |
|
45 |
|
46 class CMPMIapSelection; |
|
47 |
|
48 /** |
|
49 * Handles displaying wlan related dialogs |
|
50 * |
|
51 * @lib mpmserver.exe |
|
52 * @since S60 v3.2 |
|
53 */ |
|
54 class CMPMWlanQueryDialog : public CActive |
|
55 { |
|
56 |
|
57 enum TWlanQueryState |
|
58 { |
|
59 EOffline |
|
60 }; |
|
61 |
|
62 public: |
|
63 |
|
64 static CMPMWlanQueryDialog* NewL( CMPMIapSelection& aSession, |
|
65 TUint32 aSelectedWlanIap ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 virtual ~CMPMWlanQueryDialog(); |
|
71 |
|
72 public: // Functions from base classes |
|
73 |
|
74 /** |
|
75 * From CActive. Cancels UI dialogs. |
|
76 * @since 3.2 |
|
77 */ |
|
78 void DoCancel(); |
|
79 |
|
80 /** |
|
81 * From CActive. Run when UI dialog finished. |
|
82 * @since 3.2 |
|
83 */ |
|
84 void RunL(); |
|
85 |
|
86 /** |
|
87 * From CActive. Run if RunL leaves. |
|
88 * @since 3.2 |
|
89 * @param aError Error that caused leave. |
|
90 * @return KErrNone |
|
91 */ |
|
92 TInt RunError( TInt aError ); |
|
93 |
|
94 public: |
|
95 |
|
96 /** |
|
97 * Starts displaying wlan dialogs if necessary |
|
98 * @since 3.2 |
|
99 */ |
|
100 void StartWlanQueryL(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * Propagates wlan network selection as an initial value for the dialog, |
|
106 * Used if there are several dialogs queued. |
|
107 * |
|
108 * @param aDialogStatus Status of the dialog when destroyed. |
|
109 * @since 3.2 |
|
110 */ |
|
111 void OfferInformation( TInt aDialogStatus ); |
|
112 |
|
113 CMPMWlanQueryDialog( CMPMIapSelection& aIapSelection, |
|
114 TUint32 aSelectedWlanIap ); |
|
115 |
|
116 void ConstructL(); |
|
117 |
|
118 private: // data |
|
119 |
|
120 // Reference to iap selection object |
|
121 CMPMIapSelection& iIapSelection; |
|
122 |
|
123 // Stores data for offline note |
|
124 TPckgBuf<TBool> iOfflineReply; |
|
125 |
|
126 // Stores data for wlan network guery |
|
127 TPckgBuf<TMpmWlanNetworkPrefs> iNetworkPrefs; |
|
128 |
|
129 //Interfce to Notifier |
|
130 RNotifier iNotifier; |
|
131 |
|
132 //State of querying Wlan settings |
|
133 TWlanQueryState iWlanQueryState; |
|
134 |
|
135 // Connection Ui Utilities pointer |
|
136 CConnectionUiUtilities* iConnUiUtils; |
|
137 |
|
138 // Wlan iap |
|
139 TUint32 iWlanIapId; |
|
140 |
|
141 // Flag that can be used to cancel the dialog startup based on earlier dialog |
|
142 TInt iOverrideStatus; |
|
143 }; |
|
144 |
|
145 #endif // MPMWLANQUERYDIALOG_H |
|