2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FNetWifiWifiBssInfo.h
19 * @brief This is the header file for the %WifiBssInfo class.
21 * This header file contains the declarations of the %WifiBssInfo class.
23 #ifndef _FNET_WIFI_WIFI_BSS_INFO_H_
24 #define _FNET_WIFI_WIFI_BSS_INFO_H_
26 #include <FBaseObject.h>
27 #include <FNetNetTypes.h>
28 #include <FNetWifiWifiTypes.h>
30 namespace Tizen { namespace Net
35 namespace Tizen { namespace Net { namespace Wifi
37 class WifiSecurityInfo;
38 class _WifiBssInfoImpl;
42 * @brief This class provides methods for managing the BSS information of a Wi-Fi network.
46 * The %WifiBssInfo class provides methods for managing the BSS information of a Wi-Fi network.
48 * For more information on the class features,
49 * see <a href="../org.tizen.native.appprogramming/html/guide/net/wi-fi_connectivity.htm">Wi-Fi Connectivity</a>.
52 class _OSP_EXPORT_ WifiBssInfo
53 : public Tizen::Base::Object
57 * This is the default constructor for this class.
64 * Copying of objects using this copy constructor is allowed.
67 * @param[in] value An instance of %WifiBssInfo
69 WifiBssInfo(const WifiBssInfo& value);
72 * This destructor overrides Tizen::Base::Object::~Object().
76 virtual ~WifiBssInfo(void);
79 * Gets the SSID of this BSS.
85 Tizen::Base::String GetSsid(void) const;
88 * Gets the ID of this BSS.
92 * @return The BSSID expressed as a 6 byte hexadecimal value delimited by dashes. @n
93 * For example, "00-3D-47-EF-8A-03".
95 Tizen::Base::String GetBssId(void) const;
98 * Gets the type of this BSS.
102 * @return The type of this BSS
104 WifiBssType GetBssType(void) const;
107 * Gets the radio channel of this BSS.
111 * @return The radio channel of this BSS
113 WifiRadioChannel GetRadioChannel(void) const;
116 * Gets the security information of this BSS.
120 * @return The authentication and encryption type of this BSS
122 const WifiSecurityInfo* GetSecurityInfo(void) const;
125 * Gets the Received Signal Strength Indication (RSSI) value of the BSS at the time of scanning.
129 * @return The RSSI value in dBm
131 long GetRssi(void) const;
134 * Gets the data rate of this BSS.
138 * @return The data rate value (Mbps), @n
139 * else @c -1.0 if the supported data rate is unknown
141 float GetDataRate(void) const;
148 * @param[in] ssid The SSID
150 void SetSsid(const Tizen::Base::String& ssid);
153 * Checks whether an access point (BSS) is known or not. @n
154 * The access point becomes a known BSS if it has been connected with this device.
158 * @return @c true if the access point is known, @n
162 bool IsKnown(void) const;
165 * Sets the access point (BSS) unknown.
171 void SetUnknown(void);
174 * Gets the local IP address scheme.
178 * @return The address scheme for the local IP address
180 Tizen::Net::NetAddressScheme GetLocalAddressScheme(void) const;
183 * Sets the local IP address scheme. @n
184 * The %SetLocalAddressScheme() method allows determining whether to use static address or dynamic address.
188 * @param[in] scheme The address scheme for the local IP address
190 void SetLocalAddressScheme(Tizen::Net::NetAddressScheme scheme);
193 * Gets the local IP address in the static address scheme.
197 * @return The local address configured to this access point, @n
198 * else @c null if an error occurs or there is no previously set address
199 * @exception E_SUCCESS The method is successful.
200 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
201 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
202 * @remarks The specific error code can be accessed using the GetLastResult() method.
203 * @see SetLocalAddress()
205 const Tizen::Net::IpAddress* GetLocalAddress(void) const;
208 * Sets the local IP address in the static address scheme.
212 * @return An error code
213 * @param[in] pAddress The new address to assign
214 * @exception E_SUCCESS The method is successful.
215 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation.
216 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
217 * @remarks The existing local address is unset when the input argument is @c null.
218 * @see GetLocalAddress()
220 result SetLocalAddress(const Tizen::Net::IpAddress* pAddress);
223 * Gets the subnet mask address in the static address scheme.
227 * @return The subnet mask address configured to this access point, @n
228 * else @c null if an error occurs or there is no previously set address
229 * @exception E_SUCCESS The method is successful.
230 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
231 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
232 * @remarks The specific error code can be accessed using the GetLastResult() method.
233 * @see SetSubnetMaskAddress()
235 const Tizen::Net::IpAddress* GetSubnetMaskAddress(void) const;
238 * Sets the subnet mask address in the static address scheme.
242 * @return An error code
243 * @param[in] pAddress The new address to assign
244 * @exception E_SUCCESS The method is successful.
245 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
246 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
247 * @remarks The existing subnet mask address is unset when the input argument is @c null.
248 * @see GetSubnetMaskAddress()
250 result SetSubnetMaskAddress(const Tizen::Net::IpAddress* pAddress);
253 * Gets the default gateway address in the static address scheme.
257 * @return The default gateway address configured to this access point, @n
258 * else @c null if an error occurs or there is no previously set address
259 * @exception E_SUCCESS The method is successful.
260 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
261 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
262 * @remarks The specific error code can be accessed using the GetLastResult() method.
263 * @see SetDefaultGatewayAddress()
265 const Tizen::Net::IpAddress* GetDefaultGatewayAddress(void) const;
268 * Sets the default gateway address in the static address scheme.
272 * @return An error code
273 * @param[in] pAddress The new address to assign
274 * @exception E_SUCCESS The method is successful.
275 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
276 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
277 * @remarks The existing gateway address is unset when the input argument is @c null.
278 * @see GetDefaultGatewayAddress()
280 result SetDefaultGatewayAddress(const Tizen::Net::IpAddress* pAddress);
283 * Gets the primary DNS address in the static address scheme.
287 * @return The primary DNS address configured to this access point, @n
288 * else @c null if an error occurs or there is no previously set address
289 * @exception E_SUCCESS The method is successful.
290 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
291 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
292 * @remarks The specific error code can be accessed using the GetLastResult() method.
293 * @see SetPrimaryDnsAddress()
295 const Tizen::Net::IpAddress* GetPrimaryDnsAddress(void) const;
298 * Sets the primary DNS address in the static address scheme.
302 * @return An error code
303 * @param[in] pAddress The new address to assign
304 * @exception E_SUCCESS The method is successful.
305 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
306 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
307 * @remarks The existing primary DNS address is unset when the input argument is @c null.
308 * @see GetPrimaryDnsAddress()
310 result SetPrimaryDnsAddress(const Tizen::Net::IpAddress* pAddress);
313 * Gets the secondary DNS address in the static address scheme.
317 * @return The secondary DNS address configured to this access point, @n
318 * else @c null if an error occurs or there is no previously set address
319 * @exception E_SUCCESS The method is successful.
320 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
321 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
322 * @remarks The specific error code can be accessed using the GetLastResult() method.
323 * @see SetSecondaryDnsAddress()
325 const Tizen::Net::IpAddress* GetSecondaryDnsAddress(void) const;
328 * Sets the secondary DNS address in the static address scheme.
332 * @return An error code
333 * @param[in] pAddress The new address to assign
334 * @exception E_SUCCESS The method is successful.
335 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
336 * For example, the address scheme for the IP address is @c NET_ADDRESS_SCHEME_DYNAMIC.
337 * @remarks The existing secondary DNS address is unset when the input argument is @c null.
338 * @see GetSecondaryDnsAddress()
340 result SetSecondaryDnsAddress(const Tizen::Net::IpAddress* pAddress);
343 * Gets the proxy type.
347 * @return The proxy type
348 * @see SetProxyType()
350 Tizen::Net::NetProxyType GetProxyType(void) const;
353 * Sets the proxy type.
357 * @param[in] type The proxy type
358 * @see GetProxyType()
360 void SetProxyType(Tizen::Net::NetProxyType type);
363 * Gets the proxy address.
367 * @return The proxy address, @n
368 * else an empty string if an error occurs or there is no previously set address
369 * @exception E_SUCCESS The method is successful.
370 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
371 * For example, the specified input type is @c NET_PROXY_TYPE_NONE.
372 * @remarks The specific error code can be accessed using the GetLastResult() method.
373 * @see SetProxyAddress()
375 Tizen::Base::String GetProxyAddress(void) const;
378 * Sets the proxy address.
382 * @return An error code
383 * @param[in] address The proxy address containing the IP address and port. @n
384 * For example, 'proxy.example.com:3125' or '192.168.0.1:8080'.
385 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation.
386 * For example, the specified input type is @c NET_PROXY_TYPE_NONE.
387 * @remarks The existing proxy address is unset when the input argument is an empty string.
388 * @see GetProxyAddress()
390 result SetProxyAddress(const Tizen::Base::String& address);
393 * Checks whether the specified instance of %WifiBssInfo equals the current instance.
397 * @return @c true if the specified instance equals the current instance, @n
399 * @param[in] obj An instance of %WifiBssInfo
400 * @remarks The method returns @c false if the specified object is not %WifiBssInfo.
402 virtual bool Equals(const Tizen::Base::Object& obj) const;
405 * Gets the hash value of the current instance.
409 * @return The hash value of the current instance
411 virtual int GetHashCode(void) const;
414 * Assigns the value of the specified instance to the current instance of %WifiBssInfo.
418 * @return The reference of this instance
419 * @param[in] rhs An instance of %WifiBssInfo
421 WifiBssInfo& operator=(const WifiBssInfo& rhs);
424 _WifiBssInfoImpl *__pWifiBssInfoImpl;
426 friend class _WifiBssInfoImpl;
429 } } } //Tizen::Net::Wifi
430 #endif // _FNET_WIFI_WIFI_BSS_INFO_H_