add % before the privilege tag not to link to the linkage page
[platform/framework/native/net.git] / inc / FNetWifiWifiDirectGroupClient.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17 /**
18  * @file    FNetWifiWifiDirectGroupClient.h
19  * @brief   This is the header file for the %WifiDirectGroupClient class.
20  *
21  * This header file contains the declarations of the %WifiDirectGroupClient class.
22  */
23 #ifndef _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_
24 #define _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_
25
26 #include <FNetWifiWifiDirectGroupMember.h>
27
28 namespace Tizen { namespace Net { namespace Wifi
29 {
30 class _WifiDirectGroupClientImpl;
31
32 /**
33  * @if OSPDEPREC
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.
39  *
40  * @since   2.0
41  *
42  * The %WifiDirectGroupClient class provides methods to manage the Wi-Fi Direct client.
43  *
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>.
45  * @endif
46  */
47
48 class _OSP_EXPORT_ WifiDirectGroupClient
49         : public WifiDirectGroupMember
50 {
51 public:
52     /**
53      * @if OSPDEPREC
54      * This is the destructor for this class.
55      *
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
60      *
61      * @since 2.0
62      * @endif
63      */
64     virtual ~WifiDirectGroupClient(void);
65
66     /**
67      * @if OSPDEPREC
68      * Closes the connection.
69      *
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.
74      *
75      * @since 2.0
76      * @privlevel    public
77      * @privilege    %http://tizen.org/privilege/wifi.wifidirect.admin
78      *
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()
87      * @endif
88      */
89     result Disassociate(void);
90
91     /**
92      * @if OSPDEPREC
93      * Requests the WifiDirectDeviceInfo of the Wi-Fi Direct group owner.
94      *
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.
99      *
100      * @since 2.0
101      * @privlevel   public
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
104      *
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()
117      * @endif
118      */
119     result RequestGroupOwnerInfo(int portNumber = DEFAULT_PORT);
120
121     /**
122      * @if OSPDEPREC
123      * Requests the WifiDirectDeviceInfo list of the Wi-Fi Direct group members.
124      *
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
129          *
130      * @since 2.0
131      * @privlevel   public
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
134      *
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()
146      * @endif
147      */
148     result RequestAllGroupMemberInfo(int portNumber = DEFAULT_PORT);
149
150 private:
151     /**
152      * This default constructor is intentionally declared as private so that only the platform can create an instance.
153      *
154      * @remarks     After creating an instance of this class, the Construct() method must be called explicitly
155      *              to initialize this instance.
156      *
157      * @see         Construct()
158      */
159     WifiDirectGroupClient(void);
160
161     /**
162      * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
163      *
164      * @param[in]   value   An instance of %WifiDirectGroupClient
165      */
166     WifiDirectGroupClient(const WifiDirectGroupClient& value);
167
168     /**
169      * Initializes this instance of %WifiDirectGroupClient with the specified parameter.
170      *
171      * @return An error code
172      *
173      * @param[in]   wifiDirectGroupClientImpl   A reference to the _WifiDirectGroupClientImpl instance
174      *
175      * @exception   E_SUCCESS           The method is successful.
176      * @exception   E_SYSTEM            A system error has occurred.
177      */
178     result Construct(_WifiDirectGroupClientImpl& wifiDirectGroupClientImpl);
179
180     /**
181     * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit
182     * copying of objects.
183     *
184     * @param[in]   rhs An instance of %WifiDirectGroupClient
185     */
186     WifiDirectGroupClient& operator=(const WifiDirectGroupClient& rhs);
187
188 private:
189     static const int DEFAULT_PORT = 3895;
190
191     _WifiDirectGroupClientImpl* __pWifiDirectGroupClientImpl;
192
193     friend class _WifiDirectGroupClientImpl;
194 }; // WifiDirectGroupClient
195
196 } } } // Tizen::Net::Wifi
197 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_CLIENT_H_