2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 FNetWifiWifiDirectGroupOwner.h
19 * @brief This is the header file for the %WifiDirectGroupOwner class.
21 * This header file contains the declarations of the %WifiDirectGroupOwner class.
23 #ifndef _FNET_WIFI_WIFI_DIRECT_GROUP_OWNER_H_
24 #define _FNET_WIFI_WIFI_DIRECT_GROUP_OWNER_H_
26 #include <FNetWifiWifiDirectGroupMember.h>
28 namespace Tizen { namespace Base { namespace Collection
31 } } } // Tizen::Base::Collection
33 namespace Tizen { namespace Net { namespace Wifi
35 class _WifiDirectGroupOwnerImpl;
36 class WifiDirectDeviceInfo;
40 * @class WifiDirectGroupOwner
41 * @brief <i> [Deprecated] </i> This class provides methods for the Wi-Fi Direct group owner management.
42 * @deprecated This method is deprecated because the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role (for example, group owner, group client, and so on). @n
43 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role and so it was necessary to use these APIs. @n
44 * As the APIs have been integrated into the WifiDirectDevice class, use IWifiDirectDevice class instead.
48 * The %WifiDirectGroupOwner class provides methods to manage the Wi-Fi Direct group.
52 class _OSP_EXPORT_ WifiDirectGroupOwner
53 : public WifiDirectGroupMember
58 * This destructor overrides Tizen::Base::Object::~Object().
60 * @brief <i> [Deprecated] </i>
61 * @deprecated %WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
62 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group owner, group client, and so on) and so it was necessary to use these APIs. @n
63 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
68 virtual ~WifiDirectGroupOwner(void);
72 * Destroys a Wi-Fi Direct group.
74 * @brief <i> [Deprecated] </i>
75 * @deprecated %WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
76 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group owner, group client, and so on) and so it was necessary to use these APIs. @n
77 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
78 * As the APIs have been integrated into the WifiDirectDevice class, use WifiDirectDevice::LeaveGroup() API instead.
82 * @privilege http://tizen.org/privilege/wifi.wifidirect.admin
84 * @return An error code
85 * @exception E_SUCCESS The method is successful.
86 * @exception E_SYSTEM A system error has occurred.
87 * @exception E_IN_PROGRESS A previous request is in progress.
88 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
89 * For example, when the member type of a device is not a Wi-Fi Direct group owner.
90 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
91 * @see IWifiDirectGroupOwnerListener::OnWifiDirectGroupDestroyed()
94 result DestroyGroup(void);
98 * Disconnects a specified Wi-Fi Direct group client.
100 * @brief <i> [Deprecated] </i>
101 * @deprecated %WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
102 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group owner, group client, and so on) and so it was necessary to use these APIs. @n
103 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
104 * As the APIs have been integrated into the WifiDirectDevice class, use WifiDirectDevice::Disconnect() API instead.
108 * @privilege http://tizen.org/privilege/wifi.wifidirect.admin
110 * @return An error code
111 * @param[in] wifiDirectRemoteDeviceInfo The device information of a group client to disconnect
112 * @exception E_SUCCESS The method is successful.
113 * @exception E_SYSTEM A system error has occurred.
114 * @exception E_IN_PROGRESS A previous request is in progress.
115 * @exception E_INVALID_ARG A specified input parameter is invalid.
116 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
117 * For example, when the member type of a device is not a Wi-Fi Direct group owner.
118 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
119 * @see IWifiDirectGroupOwnerListener::OnWifiDirectClientDisassociated()
122 result Disconnect(const WifiDirectDeviceInfo& wifiDirectRemoteDeviceInfo);
126 * Gets the list of information of all the members of the Wi-Fi Direct group.
128 * @brief <i> [Deprecated] </i>
129 * @deprecated %WifiDirectGroupOwner class is deprecated ,therefore, this method is also deprecated. @n
130 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group owner, group client, and so on) and so it was necessary to use these APIs. @n
131 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
132 * Instead of GetAllGroupMemberInfoListN() method, use WifiDirectDevice::GetGroupOwnerInfoN() for group owner information and WifiDirectDevice::GetGroupClientInfoListN() for group clients information.
136 * @return The list of WifiDirectDeviceInfo
137 * @exception E_SUCCESS The method is successful.
138 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
139 * For example, when the member type of a device is not a Wi-Fi Direct group owner.
140 * @exception E_SYSTEM A system error has occurred.
141 * @exception E_OUT_OF_MEMORY The memory is insufficient.
142 * @remarks The specific error code can be accessed using the GetLastResult() method.
145 Tizen::Base::Collection::IList* GetAllGroupMemberInfoListN(void) const;
149 * Starts the group member information service.
151 * @brief <i> [Deprecated] </i>
152 * @deprecated This method is deprecated, therefore, this method is also deprecated. @n
153 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group owner, group client, and so on) and so it was necessary to use these APIs. @n
154 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
158 * @privilege http://tizen.org/privilege/wifi.wifidirect.read, http://tizen.org/privilege/network.connection and http://tizen.org/privilege/socket @n
159 * All the above privileges are required
161 * @return An error code
162 * @param[in] portNumber A port number to start group member information service
163 * @exception E_SUCCESS The method is successful.
164 * @exception E_SYSTEM A system error has occurred.
165 * @exception E_IN_PROGRESS A previous request is in progress.
166 * @exception E_OUT_OF_RANGE The specified port number is less than 1024 or greater than 65535.
167 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
168 * For example, member type of @c wifiDirectDevice is not the group owner or client.
169 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
170 * @see IWifiDirectGroupOwnerListener::OnWifiDirectGroupMemberInfoServiceStarted()
173 result StartGroupMemberInfoService(int portNumber = DEFAULT_PORT);
177 * Stops the group member information service.
179 * @brief <i> [Deprecated] </i>
180 * @deprecated %WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
181 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group owner, group client, and so on) and so it was necessary to use these APIs. @n
182 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
186 * @privilege http://tizen.org/privilege/wifi.wifidirect.read, http://tizen.org/privilege/network.connection and http://tizen.org/privilege/socket @n
187 * All the above privileges are required
189 * @return An error code
190 * @exception E_SUCCESS The method is successful.
191 * @exception E_SYSTEM A system error has occurred.
192 * @exception E_IN_PROGRESS A previous request is in progress.
193 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
194 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
195 * @see IWifiDirectGroupOwnerListener::OnWifiDirectGroupMemberInfoServiceStopped()
198 result StopGroupMemberInfoService(void);
202 * This default constructor is intentionally declared as private so that only the platform can create an instance.
204 * @remarks After creating an instance of this class, the Construct() method must be explicitly called to
205 * initialize this instance.
208 WifiDirectGroupOwner(void);
211 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
213 * @param[in] value An instance of %WifiDirectGroupOwner
215 WifiDirectGroupOwner(const WifiDirectGroupOwner& value);
218 * Initializes this instance of WifiDirectGroupOwner with the specified listener.
220 * @return An error code
222 * @param[in] wifiDirectDeviceImpl A reference to the __WifiDirectDeviceImpl instance
224 * @exception E_SUCCESS The method is successful.
225 * @exception E_SYSTEM A system error has occurred.
227 result Construct(_WifiDirectGroupOwnerImpl& wifiDirectGroupOwnerImpl);
230 * The implementation of this copy assignment operator is intentionally blank and
231 * declared as private to prohibit copying of objects.
233 * @param[in] rhs An instance of %WifiDirectGroupOwner
235 WifiDirectGroupOwner& operator =(const WifiDirectGroupOwner& rhs);
238 static const int DEFAULT_PORT = 3895;
240 _WifiDirectGroupOwnerImpl* __pWifiDirectGroupOwnerImpl;
242 friend class _WifiDirectGroupOwnerImpl;
243 }; // WifiDirectGroupOwner
245 } } } // Tizen::Net::Wifi
246 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_OWNER_H_