|
1 /* |
|
2 * Copyright (c) 2002-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: Wlan agent's state machine |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 9 % |
|
20 */ |
|
21 |
|
22 #ifndef _WLANSM_H_ |
|
23 #define _WLANSM_H_ |
|
24 |
|
25 #include <comms-infras/cagentsmbase.h> |
|
26 #include "rwlmserver.h" |
|
27 |
|
28 struct SWLANSettings; |
|
29 |
|
30 /** |
|
31 * WLAN agent statemachine |
|
32 * |
|
33 * @lib wlanagt.agt |
|
34 * @since S60 v3.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CWlanSM ): public CAgentSMBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * NewL |
|
42 * |
|
43 * @since S60 v3.0 |
|
44 * @param aObserver |
|
45 * @param aDlgPrc |
|
46 * @param aDbAccess |
|
47 * @return instance of statemachine |
|
48 */ |
|
49 static CWlanSM* NewL( |
|
50 MAgentNotify& aObserver, |
|
51 CDialogProcessor* aDlgPrc, |
|
52 CCommsDbAccess& aDbAccess ); |
|
53 |
|
54 /** |
|
55 * destructor |
|
56 * |
|
57 * @since S60 v3.0 |
|
58 */ |
|
59 ~CWlanSM(); |
|
60 |
|
61 public: // From CAgentSMBase |
|
62 |
|
63 /** |
|
64 * GetExcessData |
|
65 * |
|
66 * @since S60 v3.0 |
|
67 * @param aBuffer |
|
68 * @return |
|
69 */ |
|
70 virtual TInt GetExcessData( TDes8& aBuffer ); |
|
71 |
|
72 /** |
|
73 * Notification |
|
74 * |
|
75 * @since S60 v3.0 |
|
76 * @param aEvent |
|
77 * @param aInfo |
|
78 */ |
|
79 virtual TInt Notification( TNifToAgentEventType aEvent, TAny* aInfo ); |
|
80 |
|
81 |
|
82 /** |
|
83 * SetOverrideSettingsL |
|
84 * |
|
85 * @since S60 v3.0 |
|
86 * @param aWLMOverrideSettings |
|
87 */ |
|
88 void SetOverrideSettingsL( const TWLMOverrideSettings& aWLMOverrideSettings ); |
|
89 |
|
90 /** |
|
91 * WlanSettings |
|
92 * |
|
93 * @since S60 v3.0 |
|
94 * @return pointer to SWLANSettings structure |
|
95 */ |
|
96 const SWLANSettings* WlanSettings() const; |
|
97 |
|
98 /** |
|
99 * SettingsId |
|
100 * |
|
101 * @since S60 v3.0 |
|
102 * @return Id of the chosen IAP |
|
103 */ |
|
104 TUint32 SettingsId() const; |
|
105 |
|
106 /** |
|
107 * IapId |
|
108 * |
|
109 * @since S60 v3.0 |
|
110 * @return Id of the chosen IAP |
|
111 */ |
|
112 TUint32 IapId() const; |
|
113 |
|
114 /** |
|
115 * OverrideSettings |
|
116 * |
|
117 * @since S60 v3.0 |
|
118 * @param overridesettings object |
|
119 */ |
|
120 TWLMOverrideSettings* OverrideSettings() const; |
|
121 |
|
122 /** |
|
123 * SetHotSpotAP |
|
124 * |
|
125 * @since S60 v3.2 |
|
126 * @Sets the flag indicating if the AP is HotSpot AP or Normal AP |
|
127 */ |
|
128 void SetHotSpotAP(TBool aHotSpotAP); |
|
129 |
|
130 /** |
|
131 * IsHotSpotAP |
|
132 * |
|
133 * @since S60 v3.2 |
|
134 * @Returns the flag indicating if the AP is HotSpot AP or Normal AP |
|
135 */ |
|
136 TBool IsHotSpotAP() const; |
|
137 |
|
138 |
|
139 protected: |
|
140 |
|
141 /** |
|
142 * constructor |
|
143 * |
|
144 * @since S60 v3.0 |
|
145 * @param aObserver |
|
146 * @param aDlgPrc |
|
147 * @param aDbAccess |
|
148 */ |
|
149 CWlanSM( |
|
150 MAgentNotify& aObserver, |
|
151 CDialogProcessor* aDlgPrc, |
|
152 CCommsDbAccess& aDbAccess ); |
|
153 |
|
154 /** |
|
155 * ConstructL |
|
156 * |
|
157 * @since S60 v3.0 |
|
158 */ |
|
159 void ConstructL(); |
|
160 |
|
161 private: |
|
162 |
|
163 /** |
|
164 * DoConstructL |
|
165 * |
|
166 * @since S60 v3.0 |
|
167 */ |
|
168 void DoConstructL(); |
|
169 |
|
170 private: |
|
171 /** Client API instance of the WLAN Engine */ |
|
172 RWLMServer iWLMServer; |
|
173 /** WLAN Settings of the IAP from CommsDat*/ |
|
174 SWLANSettings* iWlanSettings; |
|
175 /** An index for accessing IAP specific WLAN settings from CommsDat */ |
|
176 TUint32 iServiceId; |
|
177 /** |
|
178 * Structure that can convey connection parameters which should override |
|
179 * the ones in CommsDat |
|
180 */ |
|
181 TWLMOverrideSettings* iWLMOverrideSettings; |
|
182 /** Identifier of the IAP */ |
|
183 TUint32 iIapId; |
|
184 |
|
185 /** HotSpot related variable |
|
186 */ |
|
187 TBool iIsHotSpotAP; |
|
188 }; |
|
189 |
|
190 #endif // _WLANSM_H_ |