|
1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef NETWORK_BASE_NOTIF_H_INCLUDED |
|
21 #define NETWORK_BASE_NOTIF_H_INCLUDED |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <stdlib.h> |
|
26 #include <cdblen.h> |
|
27 #include <badesca.h> |
|
28 #include <e32std.h> |
|
29 #include <stdlib.h> |
|
30 #include <wlanmgmtcommon.h> |
|
31 |
|
32 // CONSTANTS |
|
33 /** |
|
34 * Max length of ListBox item text |
|
35 */ |
|
36 LOCAL_D const TUint KNetworkListItemText = 64; |
|
37 |
|
38 /** |
|
39 * This masks are used for set ListBox item text at network details |
|
40 */ |
|
41 _LIT( KNetworkListItemTextFormat, "%d\t%S\t%S\t%d\t%d" ); |
|
42 |
|
43 |
|
44 // FORWARD DECLARATIONS |
|
45 class CWlanNetworkDataProvider; |
|
46 class CNetworkInfoArray; |
|
47 class CNetworkInfoKey; |
|
48 |
|
49 // TYPES |
|
50 |
|
51 |
|
52 /** |
|
53 * Possible values of SignalStrength of a network |
|
54 */ |
|
55 enum TSignalStrength |
|
56 { |
|
57 ESignalStrengthMax = 60, |
|
58 ESignalStrengthGood = 74, |
|
59 ESignalStrengthLow = 87, |
|
60 ESignalStrengthMin = 100 |
|
61 }; |
|
62 |
|
63 |
|
64 /** |
|
65 * Possible modes of a network |
|
66 */ |
|
67 enum TNetworkMode |
|
68 { |
|
69 ENetworkModeInfrastructure = 1, |
|
70 ENetworkModeAdHoc |
|
71 }; |
|
72 |
|
73 |
|
74 // CLASS DECLARATION |
|
75 /** |
|
76 * Represents a network. |
|
77 */ |
|
78 NONSHARABLE_CLASS( CNetworkInfoBase ): public CBase |
|
79 { |
|
80 public: |
|
81 /** |
|
82 * Constructor |
|
83 */ |
|
84 CNetworkInfoBase(); |
|
85 |
|
86 /** |
|
87 * Destructor |
|
88 */ |
|
89 virtual ~CNetworkInfoBase(); |
|
90 |
|
91 public: // New functions |
|
92 |
|
93 /** |
|
94 * Refresh iListBoxItemText text, network ListBox has a reference to |
|
95 * this text. |
|
96 */ |
|
97 /*virtual*/ void RefreshNetworksListBoxItemTextL() /*= 0*/; |
|
98 |
|
99 /** |
|
100 * Gives back the name of network (SSID) |
|
101 * @return the name of network |
|
102 */ |
|
103 inline TPtrC NetworkName() const; |
|
104 |
|
105 /** |
|
106 * Gives back current SignalStrength |
|
107 * @return iSignalStrength |
|
108 */ |
|
109 inline TSignalStrength SignalStrength() const; |
|
110 |
|
111 /** |
|
112 * Gives back current NetworkMode |
|
113 * @return iNetworkMode |
|
114 */ |
|
115 inline TNetworkMode NetworkMode() const; |
|
116 |
|
117 /** |
|
118 * Gives back current SecurityMode |
|
119 * @return iSecurityMode |
|
120 */ |
|
121 inline TWlanConnectionSecurityMode SecurityMode() const; |
|
122 |
|
123 /** |
|
124 * Gives back current Protected Setup Support |
|
125 * @return iProtectedSetupSupported |
|
126 */ |
|
127 inline TBool ProtectedSetupSupported() const; |
|
128 |
|
129 /** |
|
130 * Gives back current ExtendedSecurityMode |
|
131 * @return iExtendedSecurityMode |
|
132 */ |
|
133 inline TWlanConnectionExtentedSecurityMode ExtendedSecurityMode() const; |
|
134 |
|
135 /** |
|
136 * Gives back a pointer the iListBoxItemText of network |
|
137 * @return the iListBoxItemText of network |
|
138 */ |
|
139 inline TPtrC GetNetworkListBoxItemText() const; |
|
140 |
|
141 inline TBool OthersEntry() const; |
|
142 |
|
143 inline void SetNetworkName( TDes8& aNetworkName ); |
|
144 inline void SetSignalStrength( TSignalStrength aStrength ); |
|
145 inline void SetNetworkMode( TNetworkMode aNetworkMode ); |
|
146 inline void SetSecurityMode( |
|
147 TWlanConnectionSecurityMode aSecurityMode ); |
|
148 inline void SetOthersEntry( TBool aOthersEntry ); |
|
149 inline void SetProtectedSetupSupported( |
|
150 TBool aProtectedSetupSupported ); |
|
151 inline void SetExtendedSecurityMode( |
|
152 TWlanConnectionExtentedSecurityMode aExtendedSecurityMode ); |
|
153 |
|
154 private: |
|
155 /** |
|
156 * The name of network (from SSID) |
|
157 */ |
|
158 TName iNetworkName; |
|
159 |
|
160 /** |
|
161 * Signale strength of network |
|
162 */ |
|
163 TSignalStrength iSignalStrength; |
|
164 |
|
165 /** |
|
166 * Network mode of network |
|
167 */ |
|
168 TNetworkMode iNetworkMode; |
|
169 |
|
170 /** |
|
171 * Security mode of network |
|
172 */ |
|
173 TWlanConnectionSecurityMode iSecurityMode; |
|
174 |
|
175 /** |
|
176 * The text of network list item. |
|
177 */ |
|
178 TBuf<KNetworkListItemText> iListBoxItemText; |
|
179 |
|
180 TBool iOthersEntry; |
|
181 |
|
182 TBool iProtectedSetupSupported; |
|
183 |
|
184 TWlanConnectionExtentedSecurityMode iExtendedSecurityMode; |
|
185 |
|
186 }; |
|
187 |
|
188 #include "NetworkInfoBase.inl" |
|
189 |
|
190 #endif //NETWORK_BASE_NOTIF_H_INCLUDED |
|
191 |
|
192 // End of File |