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
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
69 virtual ~WifiDirectGroupClient(void);
73 * Closes the connection.
75 * @brief <i> [Deprecated] </i>
76 * @deprecated The %WifiDirectGroupClient class is deprecated. Therefore, this method is also deprecated, because
77 * previously the Wi-Fi Direct APIs were provided centered on the role(e.g. group owner, group
79 * So it was necessary to use APIs in accordance with the strict role; however, it has been revised to
80 * allow using APIs with ease without discerning the role. @n
81 * It is integrated into WifiDirectDevice class. Use the WifiDirectDevice::Disconnect() method.
85 * @privilege %http://tizen.org/privilege/wifi.wifidirect.admin
87 * @return An error code
88 * @exception E_SUCCESS The method is successful.
89 * @exception E_SYSTEM A system error has occurred.
90 * @exception E_IN_PROGRESS A previous request is in progress.
91 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
92 * For example, when the member type of a device is not a Wi-Fi Direct group client.
93 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
94 * @see IWifiDirectGroupClientListener::OnWifiDirectAssociationTerminated()
97 result Disassociate(void);
101 * Requests the WifiDirectDeviceInfo of the Wi-Fi Direct group owner.
103 * @brief <i> [Deprecated] </i>
104 * @deprecated The %WifiDirectGroupClient class is deprecated. Therefore, this method is also deprecated, because
105 * previously the Wi-Fi Direct APIs were provided centered on the role(e.g. group owner, group
107 * so it was necessary to use APIs in accordance with the strict role; however, it has been revised to
108 * allow using APIs with ease without discerning the role. @n
109 * Instead of using this method, use the WifiDirectDevice::GetGroupOwnerInfoN() method.
113 * @privilege %http://tizen.org/privilege/wifi.wifidirect.read, %http://tizen.org/privilege/network.connection
114 * and %http://tizen.org/privilege/socket @n
115 * All the above privileges are required.
117 * @return An error code
118 * @param[in] portNumber A port number to connect to the group member information service
119 * @exception E_SUCCESS The method is successful.
120 * @exception E_SYSTEM A system error has occurred.
121 * @exception E_IN_PROGRESS The previous request for the group owner information is in progress.
122 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
123 * For example, when the member type of a device is not a Wi-Fi Direct group client.
124 * @exception E_OUT_OF_RANGE The specified port number is less than 1024 or greater than 65535.
125 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
126 * @remarks The port number used by the group owner must be specified if the group owner changes the port number
127 * in WifiDirectGroupOwner::StartGroupMemberInfoService().
128 * @see IWifiDirectGroupClientListener::OnWifiDirectGroupOwnerInfoReceived()
131 result RequestGroupOwnerInfo(int portNumber = DEFAULT_PORT);
135 * Requests the WifiDirectDeviceInfo list of the Wi-Fi Direct group members.
137 * @brief <i> [Deprecated] </i>
138 * @deprecated %WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
139 * Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
140 * owner, group client, and so on) and so it was necessary to use these APIs. @n
141 * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
146 * @privilege %http://tizen.org/privilege/wifi.wifidirect.read, %http://tizen.org/privilege/network.connection
147 * and %http://tizen.org/privilege/socket @n
148 * All the above privileges are required.
150 * @return An error code
151 * @param[in] portNumber A port number to connect to the group member information service
152 * @exception E_SUCCESS The method is successful.
153 * @exception E_SYSTEM A system error has occurred.
154 * @exception E_IN_PROGRESS The previous request for the group owner information is in progress.
155 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. @n
156 * For example, when the member type of a device is not a Wi-Fi Direct group client.
157 * @exception E_OUT_OF_RANGE The specified port number is less than 1024 or greater than 65535.
158 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
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 WifiDirectGroupClient(void);
173 // The implementation of this copy constructor is intentionally blank to prohibit copying of objects.
175 WifiDirectGroupClient(const WifiDirectGroupClient& value);
178 // Initializes this instance of %WifiDirectGroupClient with the specified parameter. @n
179 // This method is intentionally declared as private so that only the platform can initialize the instance.
181 result Construct(_WifiDirectGroupClientImpl& wifiDirectGroupClientImpl);
184 // The implementation of this copy assignment operator is intentionally blank to prohibit copying of objects.
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_