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 FNetWifiWifiDirectGroupInfo.h
19 * @brief This is the header file for the %WifiDirectGroupInfo class.
21 * This header file contains the declarations of the %WifiDirectGroupInfo class.
23 #ifndef _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_
24 #define _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_
26 #include <FBaseObject.h>
27 #include <FNetWifiWifiTypes.h>
29 namespace Tizen { namespace Net { namespace Wifi
31 class _WifiDirectGroupInfoImpl;
34 * @class WifiDirectGroupInfo
35 * @brief This class provides methods for the Wi-Fi Direct group information.
39 * The %WifiDirectGroupInfo class provides methods to get or set the information for a Wi-Fi Direct group.
42 class _OSP_EXPORT_ WifiDirectGroupInfo
43 : public Tizen::Base::Object
47 * This is the default constructor for this class.
51 WifiDirectGroupInfo(void);
54 * Copying of objects using this copy constructor is allowed.
58 * @param[in] value An instance of %WifiDirectGroupInfo
60 WifiDirectGroupInfo(const WifiDirectGroupInfo& value);
63 * This is the destructor for this class.
67 virtual ~WifiDirectGroupInfo(void);
71 * Gets the autonomous group owner mode.
73 * @brief <i> [Deprecated] </i>
74 * @deprecated This method is deprecated because this class has been modified and is now composed of information
75 * exclusively required to configure a group. @n
76 * So, a new API has been added. Instead of using this API, use
77 * WifiDirectDevice::CreateAutonomousGroup() API.
82 * @return @c true if the autonomous group owner mode is activated, @n
86 bool GetAutonomousGroupOwnerMode(void) const;
89 * Gets the intent of a group owner. @n It is used during the negotiation phase.
93 * @return An intent value
95 int GetGroupOwnerIntent(void) const;
98 * Gets the maximum number of clients to be associated.
102 * @return The maximum number of clients to be associated
104 int GetMaxNumberOfClients(void) const;
112 * @brief <i> [Deprecated] [Compatibility] </i>
114 * @deprecated This method is deprecated because this class has been modified and is now composed of information
115 * that is exclusively required to configure a group. @n
116 * So, new APIs have been added. Instead of using the %GetSsid() method, use the
117 * WifiDirectDevice::GetGroupOwnerInfoN() or WifiDirectDevice::GetLocalDeviceInfo() method.
121 * @compatibility This method has compatibility issues with OSP compatible applications. @n
122 * For more information, see the issue description for @ref CompWifiDirectGroupInfoGetSsidPage "here".
128 Tizen::Base::String GetSsid(void) const;
132 * @page CompWifiDirectGroupInfoGetSsidPage Compatibility for GetSsid().
133 * @section CompWifiDirectGroupInfoGetSsidPageIssueSection Issues
134 * Implementing this method in OSP compatible applications has the following issues: @n
135 * -# The method returns the SSID which is the same as the device name.
137 * @section CompWifiDirectGroupInfoGetSsidPageSolutionSection Resolutions
138 * This issue has been resolved in Tizen @n
139 * -# The method returns the SSID which has 'Direct-xy' as its prefix. The 'xy' is two ASCII
140 * characters or digits thesystem generates randomly.
148 * @brief <i> [Deprecated] </i>
149 * @deprecated This method is deprecated because this class has been modified and is now composed of information
150 * that is exclusively required to configure a group. @n
151 * So, a new API has been added. Instead of using the %GetBssId() method, use the
152 * WifiDirectDevice::GetGroupOwnerInfoN() method.
159 Tizen::Base::String GetBssId(void) const;
163 * Gets the index of a currently working channel.
165 * @brief <i> [Deprecated] </i>
166 * @deprecated This method is deprecated because this class has been modified and is now composed of information
167 * exclusively required to configure a group. @n
168 * So this API has been moved to the WifiDirectDevice class.
172 * @return The Wi-Fi radio channel
175 WifiRadioChannel GetOperatingChannel(void) const;
179 * Sets the mode for an autonomous group owner.
181 * @brief <i> [Deprecated] </i>
182 * @deprecated This method is deprecated because this class has been modified and is now composed of information
183 * exclusively required to configure a group. @n
184 * So, a new API has been added. Instead of using the %SetAutonomousGroupOwnerMode() method, use the
185 * WifiDirectDevice::CreateAutonomousGroup() method.
189 * @param[in] mode Set to @c true if autonomous group owner mode is enabled, @n
193 void SetAutonomousGroupOwnerMode(bool mode);
196 * Sets the intent of a group owner.
200 * @return An error code
201 * @param[in] intent The intent to become a group owner
202 * @exception E_SUCCESS The method is successful.
203 * @exception E_INVALID_ARG Either the specified @c intent is less than @c 0, or exceeds
204 * Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT.
206 * - A higher intent value means that the intent to become a group owner is higher.
207 * - If Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT is selected, it means that a device insists to be a
209 * - If two devices participating in a group creation select the intent value as
210 * Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT, the group creation fails.
212 result SetGroupOwnerIntent(int intent);
215 * Sets the maximum number of clients to be associated.
219 * @return An error code
220 * @param[in] numberOfClient The maximum number of clients to associate
221 * @exception E_SUCCESS The method is successful.
222 * @exception E_INVALID_ARG Either the specified @c numberOfClient is less than @c 0 or exceeds
223 * Wifi::MAX_WIFI_DIRECT_CONNECTED_CLIENTS.
225 result SetMaxNumberOfClients(int numberOfClient);
228 * Checks whether the specified instance of %WifiDirectGroupInfo equals the current instance.
232 * @return @c true if the specified instance equals the current instance, @n
234 * @param[in] obj An instance of %WifiDirectGroupInfo
235 * @remarks This method returns @c false if the specified object is not %WifiDirectGroupInfo.
237 virtual bool Equals(const Tizen::Base::Object& obj) const;
240 * Gets the hash value of the current instance.
244 * @return The hash value of the current instance
246 virtual int GetHashCode(void) const;
249 * Assigns the value of the specified instance to the current instance of %WifiDirectGroupInfo.
253 * @return A reference to the %WifiDirectGroupInfo instance
254 * @param[in] rhs An instance of %WifiDirectGroupInfo
256 WifiDirectGroupInfo& operator =(const WifiDirectGroupInfo& rhs);
259 _WifiDirectGroupInfoImpl* __pWifiDirectGroupInfoImpl;
261 friend class _WifiDirectGroupInfoImpl;
262 }; // WifiDirectGroupInfo
264 } } } // Tizen::Net::Wifi
265 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_