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 FNetWifiWifiDirectDeviceInfo.h
19 * @brief This is the header file for the %WifiDirectDeviceInfo class.
21 * This header file contains the declarations of the %WifiDirectDeviceInfo class.
23 #ifndef _FNET_WIFI_WIFI_DIRECT_DEVICE_INFO_H_
24 #define _FNET_WIFI_WIFI_DIRECT_DEVICE_INFO_H_
26 #include <FBaseObject.h>
27 #include <FNetWifiWifiTypes.h>
29 namespace Tizen { namespace Base { namespace Collection
33 } } } // Tizen::Base::Collection
35 namespace Tizen { namespace Net
40 namespace Tizen { namespace Net { namespace Wifi
42 class _WifiDirectDeviceInfoImpl;
45 * @class WifiDirectDeviceInfo
46 * @brief This class provides methods for the Wi-Fi Direct device information.
50 * The %WifiDirectDeviceInfo class provides methods for getting information related to a Wi-Fi Direct device.
52 class _OSP_EXPORT_ WifiDirectDeviceInfo
53 : public Tizen::Base::Object
57 * This is the default constructor for this class.
61 WifiDirectDeviceInfo(void);
64 * Copying of objects using this copy constructor is allowed.
68 * @param[in] value An instance of %WifiDirectDeviceInfo
70 WifiDirectDeviceInfo(const WifiDirectDeviceInfo& value);
73 * Initializes this instance of %WifiDirectDeviceInfo with the specified device name
74 * and the MAC address.
78 * @param[in] deviceName The device name @n
79 * The length of @c deviceName must not exceed 64 characters.
80 * @param[in] macAddr The MAC address @n
81 * The value of @c macAddr must be in the form '00-00-00-00-00-00'.
84 WifiDirectDeviceInfo(const Tizen::Base::String& deviceName, const Tizen::Base::String& macAddr);
87 * This destructor overrides Tizen::Base::Object::~Object().
91 virtual ~WifiDirectDeviceInfo(void);
94 * Gets the ID of the device.
98 * @return The ID of the Wi-Fi Direct device
100 * - This value is only available for local device information query, such as
101 * WifiDirectDeviceManager::GetAllDeviceInfoN() or WifiDirectDevice::GetLocalDeviceInfoN().
102 * - When the value is not available, the return value is @c -1.
104 WifiDirectDeviceId GetDeviceId(void) const;
107 * Gets the device name.
111 * @return The device name
113 Tizen::Base::String GetDeviceName(void) const;
116 * Gets the MAC address of the device.
120 * @return The MAC address in the form '00-00-00-00-00-00'
121 * @remarks This MAC address is different from the MAC address provided by the WifiManager or DhcpClientInfo
122 * class. Especially, the MAC address which is provided in DhcpClientInfo is a virtual MAC address for
123 * data communication during a Wi-Fi Direct group member.
125 Tizen::Base::String GetMacAddress(void) const;
128 * Gets the IP address of the device.
132 * @return An IpAddress pointer to the local address in the calling instance
133 * @remarks The IP address is provided only using WifiDirectDevice::GetGroupOwnerInfoN(),
134 * WifiDirectDevice::GetGroupClientInfoListN(), or WifiDirectDevice::GetLocalDeviceInfoN() after
135 * becoming a group member.
137 const Tizen::Net::IpAddress* GetIpAddress(void) const;
145 * @remarks This method returns an empty string if the member type of a device is not a Wi-Fi Direct group
148 Tizen::Base::String GetSsid(void) const;
151 * Gets the status of the device.
155 * @return The status of the Wi-Fi Direct device
157 WifiDirectDeviceStatus GetDeviceStatus(void) const;
160 * Gets the member type of the Wi-Fi Direct device.
164 * @return The member type of the Wi-Fi Direct device
166 WifiDirectGroupMemberType GetGroupMemberType(void) const;
169 * Gets the category of the Wi-Fi Direct device type.
173 * @return The category of the Wi-Fi Direct device type
175 WifiDirectDeviceTypeCategory GetDeviceTypeCategory(void) const;
178 * Gets the list of supporting WPS configuration modes.
182 * @return The list of supporting WPS configuration modes
183 * @remarks The result of this method is available only using WifiDirectDevice::Scan() or
184 * WifiDirectDevice::GetLocalDeviceInfoN().
186 const Tizen::Base::Collection::IListT <WifiWpsConfigurationMode>* GetSupportedWpsConfigurationModeList(void) const;
189 * Checks whether the specified instance of %WifiDirectDeviceInfo equals the current instance.
193 * @return @c true if the specified instance equals the current instance, @n
195 * @param[in] obj An instance of %WifiDirectDeviceInfo
196 * @remarks This method returns @c false if the specified object is not %WifiDirectDeviceInfo.
198 virtual bool Equals(const Tizen::Base::Object& obj) const;
201 * Gets the hash value of the current instance.
205 * @return The hash value of the current instance
207 virtual int GetHashCode(void) const;
210 * Assigns the value of the specified instance to the current instance of %WifiDirectDeviceInfo.
214 * @return A reference to this instance
215 * @param[in] rhs An instance of %WifiDirectDeviceInfo
217 WifiDirectDeviceInfo& operator =(const WifiDirectDeviceInfo& rhs);
220 _WifiDirectDeviceInfoImpl* __pWifiDirectDeviceInfoImpl;
222 friend class _WifiDirectDeviceInfoImpl;
223 }; // WifiDirectDeviceInfo
225 } } } // Tizen::Net::Wifi
226 #endif // _FNET_WIFI_WIFI_DIRECT_DEVICE_INFO_H_