2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.1 (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 FNetWifiWifiDirectGroupClient.h
19 * @brief This is the header file for the %WifiDirectGroupClient class.
21 * This header file contains the declarations of the %WifiDirectGroupClient class.
23 #ifndef _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_
24 #define _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_
26 #include <FNetWifiWifiDirectGroupMember.h>
28 namespace Tizen { namespace Net { namespace Wifi
30 class _WifiDirectGroupClientImpl;
34 * @class WifiDirectGroupClient
35 * @brief <i> [Deprecated] </i> This class provides methods for Wi-Fi Direct group client management.
36 * @deprecated This method is deprecated because the Wi-Fi Direct APIs have been revised to allow the use of APIs
37 * with ease irrespective of the role (for example, group owner, group client, and so on). @n
38 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role and so it was necessary to
40 * As the APIs have been integrated into WifiDirectDevice class, use %WifiDirectDevice class instead.
44 * The %WifiDirectGroupClient class provides methods to manage the Wi-Fi Direct client.
46 * For more information on the class features, see
47 * <a href="../org.tizen.native.appprogramming/html/guide/net/wi-fi_direct_connectivity.htm">Wi-Fi Direct Connectivity</a>.
51 class _OSP_EXPORT_ WifiDirectGroupClient
52 : public WifiDirectGroupMember
57 * This is the destructor for this class.
59 * @brief <i> [Deprecated] </i>
60 * @deprecated The %WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
61 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
62 * 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.
68 virtual ~WifiDirectGroupClient(void);
72 * Closes the connection.
74 * @brief <i> [Deprecated] </i>
75 * @deprecated The %WifiDirectGroupClient class is deprecated. Therefore, this method is also deprecated, because
76 * previously the Wi-Fi Direct APIs were provided depending on the role(e.g. group owner, group client).@n
77 * So it was necessary to use APIs in accordance with the strict role; however, it has been revised to
78 * allow using APIs with ease without discerning the role. @n
79 * It is integrated into the WifiDirectDevice class. Use the WifiDirectDevice::Disconnect() method.
83 * @privilege %http://tizen.org/privilege/wifi.wifidirect.admin
85 * @return An error code
86 * @exception E_SUCCESS The method is successful.
87 * @exception E_SYSTEM A system error has occurred.
88 * @exception E_IN_PROGRESS A previous request is in progress.
89 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
90 * For example, when the member type of a device is not a Wi-Fi Direct group client.
91 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
92 * @see IWifiDirectGroupClientListener::OnWifiDirectAssociationTerminated()
95 result Disassociate(void);
99 * Requests the WifiDirectDeviceInfo of the Wi-Fi Direct group owner.
101 * @brief <i> [Deprecated] </i>
102 * @deprecated The %WifiDirectGroupClient class is deprecated. Therefore, this method is also deprecated, because
103 * previously the Wi-Fi Direct APIs were provided depending on the role(e.g. group owner, group client) @n
104 * so it was necessary to use APIs in accordance with the strict role; however, it has been revised to
105 * allow using APIs with ease without discerning the role. @n
106 * Instead of using this method, use the WifiDirectDevice::GetGroupOwnerInfoN() method.
110 * @privilege %http://tizen.org/privilege/wifi.wifidirect.read, %http://tizen.org/privilege/network.connection
111 * and %http://tizen.org/privilege/socket @n
112 * All the above privileges are required.
114 * @return An error code
115 * @param[in] portNumber The port number to connect to the group member information service
116 * @exception E_SUCCESS The method is successful.
117 * @exception E_SYSTEM A system error has occurred.
118 * @exception E_IN_PROGRESS The previous request for the group owner information is in progress.
119 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
120 * For example, when the member type of a device is not a Wi-Fi Direct group client.
121 * @exception E_OUT_OF_RANGE The specified port number is either less than @c 1024 or greater than @c 65535.
122 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
123 * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
125 * @remarks The port number used by the group owner must be specified if the group owner changes the port number
126 * in WifiDirectGroupOwner::StartGroupMemberInfoService().
127 * @see IWifiDirectGroupClientListener::OnWifiDirectGroupOwnerInfoReceived()
130 result RequestGroupOwnerInfo(int portNumber = DEFAULT_PORT);
134 * Requests the WifiDirectDeviceInfo list of the Wi-Fi Direct group members.
136 * @brief <i> [Deprecated] </i>
137 * @deprecated %WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
138 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
139 * owner, group client, and so on) and so it was necessary to use these APIs. @n
140 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
145 * @privilege %http://tizen.org/privilege/wifi.wifidirect.read, %http://tizen.org/privilege/network.connection
146 * and %http://tizen.org/privilege/socket @n
147 * All the above privileges are required.
149 * @return An error code
150 * @param[in] portNumber The port number to connect to the group member information service
151 * @exception E_SUCCESS The method is successful.
152 * @exception E_SYSTEM A system error has occurred.
153 * @exception E_IN_PROGRESS The previous request for the group owner information is in progress.
154 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
155 * For example, when the member type of a device is not a Wi-Fi Direct group client.
156 * @exception E_OUT_OF_RANGE The specified port number is either less than @c 1024 or greater than @c 65535.
157 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
158 * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1
159 * @remarks The port number used by the group owner should be specified if the group owner changed the port
160 * number in WifiDirectGroupOwner::StartGroupMemberInfoService().
161 * @see IWifiDirectGroupClientListener::OnWifiDirectAllGroupMemberInfoReceivedN()
164 result RequestAllGroupMemberInfo(int portNumber = DEFAULT_PORT);
168 * This default constructor is intentionally declared as private so that only the platform can create an instance.
170 * @remarks After creating an instance of this class, the Construct() method must be called explicitly
171 * to initialize this instance.
175 WifiDirectGroupClient(void);
178 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
180 * @param[in] value An instance of %WifiDirectGroupClient
182 WifiDirectGroupClient(const WifiDirectGroupClient& value);
185 * Initializes this instance of %WifiDirectGroupClient with the specified parameter.
187 * @return An error code
189 * @param[in] wifiDirectGroupClientImpl A reference to the _WifiDirectGroupClientImpl instance
190 * @exception E_SUCCESS The method is successful.
191 * @exception E_SYSTEM A system error has occurred.
193 result Construct(_WifiDirectGroupClientImpl& wifiDirectGroupClientImpl);
196 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit
197 * copying of objects.
199 * @param[in] rhs An instance of %WifiDirectGroupClient
201 WifiDirectGroupClient& operator=(const WifiDirectGroupClient& rhs);
204 static const int DEFAULT_PORT = 3895;
206 _WifiDirectGroupClientImpl* __pWifiDirectGroupClientImpl;
208 friend class _WifiDirectGroupClientImpl;
209 }; // WifiDirectGroupClient
211 } } } // Tizen::Net::Wifi
212 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_