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 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 the 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 with ease irrespective of the role (for example, group owner, group client, and so on). @n
37 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role and so it was necessary to use these APIs.
38 * As the APIs have been integrated into WifiDirectDevice class, use WifiDirectDevice class instead.
42 * The %WifiDirectGroupClient class provides methods to manage the Wi-Fi Direct client.
44 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/net/wi-fi_direct_connectivity.htm">Wi-Fi Direct Connectivity</a>.
48 class _OSP_EXPORT_ WifiDirectGroupClient
49 : public WifiDirectGroupMember
54 * This is the destructor for this class.
56 * @brief <i> [Deprecated] </i>
57 * @deprecated The %WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
58 * 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
59 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
64 virtual ~WifiDirectGroupClient(void);
68 * Closes the connection.
70 * @brief <i> [Deprecated] </i>
71 * @deprecated The %WifiDirectGroupClient class is deprecated. Therefore, this method is also deprecated, because previously the Wi-Fi Direct APIs were provided centered on the role(e.g. group owner, group client) @n
72 * so it was necessary to use APIs in accordance with the strict role; however, it has been revised to allow using APIs with ease without discerning the role. @n
73 * It is integrated into WifiDirectDevice class. Use the WifiDirectDevice::Disconnect() method.
77 * @privilege http://tizen.org/privilege/wifi.wifidirect.admin
79 * @return An error code
80 * @exception E_SUCCESS The method is successful.
81 * @exception E_SYSTEM A system error has occurred.
82 * @exception E_IN_PROGRESS A previous request is in progress.
83 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
84 * For example, when the member type of a device is not a Wi-Fi Direct group client.
85 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
86 * @see IWifiDirectGroupClientListener::OnWifiDirectAssociationTerminated()
89 result Disassociate(void);
93 * Requests the WifiDirectDeviceInfo of the Wi-Fi Direct group owner.
95 * @brief <i> [Deprecated] </i>
96 * @deprecated The %WifiDirectGroupClient class is deprecated. Therefore, this method is also deprecated, because previously the Wi-Fi Direct APIs were provided centered on the role(e.g. group owner, group client) @n
97 * so it was necessary to use APIs in accordance with the strict role; however, it has been revised to allow using APIs with ease without discerning the role. @n
98 * Instead of using this method, use the WifiDirectDevice::GetGroupOwnerInfoN() method.
102 * @privilege http://tizen.org/privilege/wifi.wifidirect.read, http://tizen.org/privilege/network.connection and http://tizen.org/privilege/socket @n
103 * All the above privileges are required
105 * @return An error code
106 * @param[in] portNumber A port number to connect to the group member information service
107 * @exception E_SUCCESS The method is successful.
108 * @exception E_SYSTEM A system error has occurred.
109 * @exception E_IN_PROGRESS The previous request for the group owner information is in progress.
110 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
111 * For example, when the member type of a device is not a Wi-Fi Direct group client.
112 * @exception E_OUT_OF_RANGE The specified port number is less than 1024 or greater than 65535.
113 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
114 * @remarks The port number used by the group owner must be specified if the group owner changes the port number
115 * in WifiDirectGroupOwner::StartGroupMemberInfoService().
116 * @see IWifiDirectGroupClientListener::OnWifiDirectGroupOwnerInfoReceived()
119 result RequestGroupOwnerInfo(int portNumber = DEFAULT_PORT);
123 * Requests the WifiDirectDeviceInfo list of the Wi-Fi Direct group members.
125 * @brief <i> [Deprecated] </i>
126 * @deprecated %WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
127 * 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
128 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
132 * @privilege http://tizen.org/privilege/wifi.wifidirect.read, http://tizen.org/privilege/network.connection and http://tizen.org/privilege/socket @n
133 * All the above privileges are required
135 * @return An error code
136 * @param[in] portNumber A port number to connect to the group member information service
137 * @exception E_SUCCESS The method is successful.
138 * @exception E_SYSTEM A system error has occurred.
139 * @exception E_IN_PROGRESS The previous request for the group owner information is in progress.
140 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
141 * For example, when the member type of a device is not a Wi-Fi Direct group client.
142 * @exception E_OUT_OF_RANGE The specified port number is less than 1024 or greater than 65535.
143 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
144 * @remarks The port number used by the group owner should be specified if the group owner changed the port number in WifiDirectGroupOwner::StartGroupMemberInfoService().
145 * @see IWifiDirectGroupClientListener::OnWifiDirectAllGroupMemberInfoReceivedN()
148 result RequestAllGroupMemberInfo(int portNumber = DEFAULT_PORT);
152 * This default constructor is intentionally declared as private so that only the platform can create an instance.
154 * @remarks After creating an instance of this class, the Construct() method must be called explicitly
155 * to initialize this instance.
159 WifiDirectGroupClient(void);
162 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
164 * @param[in] value An instance of %WifiDirectGroupClient
166 WifiDirectGroupClient(const WifiDirectGroupClient& value);
169 * Initializes this instance of %WifiDirectGroupClient with the specified parameter.
171 * @return An error code
173 * @param[in] wifiDirectGroupClientImpl A reference to the _WifiDirectGroupClientImpl instance
175 * @exception E_SUCCESS The method is successful.
176 * @exception E_SYSTEM A system error has occurred.
178 result Construct(_WifiDirectGroupClientImpl& wifiDirectGroupClientImpl);
181 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit
182 * copying of objects.
184 * @param[in] rhs An instance of %WifiDirectGroupClient
186 WifiDirectGroupClient& operator=(const WifiDirectGroupClient& rhs);
189 static const int DEFAULT_PORT = 3895;
191 _WifiDirectGroupClientImpl* __pWifiDirectGroupClientImpl;
193 friend class _WifiDirectGroupClientImpl;
194 }; // WifiDirectGroupClient
196 } } } // Tizen::Net::Wifi
197 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_