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);
72 * Gets the autonomous group owner mode.
74 * @brief <i> [Deprecated] </i>
75 * @deprecated This method is deprecated because this class has been modified and is now composed of information exclusively required to configure a group. @n
76 * So, a new API has been added. Instead of using this API, use WifiDirectDevice::CreateAutonomousGroup() API.
81 * @return @c true if the autonomous group owner mode is activated, @n
85 bool GetAutonomousGroupOwnerMode(void) const;
88 * Gets the intent of a group owner. It is used during the negotiation phase.
92 * @return An intent value
94 int GetGroupOwnerIntent(void) const;
97 * Gets the maximum number of clients to be associated.
101 * @return The maximum number of clients to be associated
103 int GetMaxNumberOfClients(void) const;
111 * @brief <i> [Deprecated] [Compatibility] </i>
113 * @deprecated This method is deprecated because this class has been modified and is now composed of information that is exclusively required to configure a group. @n
114 * So, new APIs have been added. Instead of using GetSsid() API, use WifiDirectDevice::GetGroupOwnerInfoN() or WifiDirectDevice::GetLocalDeviceInfo() API.
118 * @compatibility This method has compatibility issues with OSP compatible applications. @n
119 * For more information, see the issue description for @ref CompWifiDirectGroupInfoGetSsidPage "here".
125 Tizen::Base::String GetSsid(void) const;
129 * @page CompWifiDirectGroupInfoGetSsidPage Compatibility for GetSsid().
130 * @section CompWifiDirectGroupInfoGetSsidPageIssueSection Issues
131 * Implementing this method in OSP compatible applications has the following issues: @n
132 * -# The method returns the SSID which is the same as the device name.
134 * @section CompWifiDirectGroupInfoGetSsidPageSolutionSection Resolutions
135 * This issue has been resolved in Tizen @n
136 * -# The method returns the SSID which has 'Direct-xy' as its prefix. The 'xy' is two ASCII characters or digits the
137 * system generates randomly.
145 * @brief <i> [Deprecated] </i>
146 * @deprecated This method is deprecated because this class has been modified and is now composed of information that is exclusively required to configure a group. @n
147 * So, a new API has been added. Instead of using GetBssId() API, use WifiDirectDevice::GetGroupOwnerInfoN() API.
154 Tizen::Base::String GetBssId(void) const;
158 * Gets the index of a currently working channel.
160 * @brief <i> [Deprecated] </i>
161 * @deprecated This method is deprecated because this class has been modified and is now composed of information exclusively required to configure a group. @n
162 * So this API has been moved to the WifiDirectDevice class.
166 * @return The Wi-Fi radio channel
169 WifiRadioChannel GetOperatingChannel(void) const;
173 * Sets the mode for an autonomous group owner.
175 * @brief <i> [Deprecated] </i>
176 * @deprecated This method is deprecated because this class has been modified and is now composed of information exclusively required to configure a group. @n
177 * So, a new API has been added. Instead of using SetAutonomousGroupOwnerMode() method, use WifiDirectDevice::CreateAutonomousGroup() API.
181 * @param[in] mode Set to @c true if autonomous group owner mode is enabled, @n
185 void SetAutonomousGroupOwnerMode(bool mode);
188 * Sets the intent of a group owner.
192 * @return An error code
193 * @param[in] intent The intent to become a group owner
194 * @exception E_SUCCESS The method is successful.
195 * @exception E_INVALID_ARG Either the specified @c intent is less than @c 0, or exceeds Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT.
196 * @remarks A higher intent value means that the intent to become a group owner is higher.
197 * If Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT is selected, it means that a device insists to be a group owner only.
198 * If two devices participating in a group creation select the intent value as
199 * Wifi::MAX_WIFI_DIRECT_GROUP_OWNER_INTENT, the group creation fails.
201 result SetGroupOwnerIntent(int intent);
204 * Sets the maximum number of clients to be associated.
208 * @return An error code
209 * @param[in] numberOfClient The maximum number of clients to associate
210 * @exception E_SUCCESS The method is successful.
211 * @exception E_INVALID_ARG Either the specified @c numberOfClient is less than @c 0 or exceeds
212 * Wifi::MAX_WIFI_DIRECT_CONNECTED_CLIENTS.
214 result SetMaxNumberOfClients(int numberOfClient);
217 * Checks whether the specified instance of %WifiDirectGroupInfo equals the current instance.
221 * @return @c true if the specified instance equals the current instance, @n
223 * @param[in] obj An instance of %WifiDirectGroupInfo
224 * @remarks This method returns @c false if the specified object is not %WifiDirectGroupInfo.
226 virtual bool Equals(const Tizen::Base::Object& obj) const;
229 * Gets the hash value of the current instance.
233 * @return The hash value of the current instance
235 virtual int GetHashCode(void) const;
238 * Assigns the value of the specified instance to the current instance of %WifiDirectGroupInfo.
242 * @return A reference to the %WifiDirectGroupInfo instance
243 * @param[in] rhs An instance of %WifiDirectGroupInfo
245 WifiDirectGroupInfo& operator =(const WifiDirectGroupInfo& rhs);
248 _WifiDirectGroupInfoImpl* __pWifiDirectGroupInfoImpl;
250 friend class _WifiDirectGroupInfoImpl;
251 }; // WifiDirectGroupInfo
253 } } } // Tizen::Net::Wifi
254 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_INFO_H_