[Doxygen] Merge LB's review comment.
[platform/framework/native/net.git] / inc / FNetWifiWifiDirectGroupOwner.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    FNetWifiWifiDirectGroupOwner.h
19  * @brief   This is the header file for the %WifiDirectGroupOwner class.
20  *
21  * This header file contains the declarations of the %WifiDirectGroupOwner class.
22  */
23 #ifndef _FNET_WIFI_WIFI_DIRECT_GROUP_OWNER_H_
24 #define _FNET_WIFI_WIFI_DIRECT_GROUP_OWNER_H_
25
26 #include <FNetWifiWifiDirectGroupMember.h>
27
28 namespace Tizen { namespace Base { namespace Collection
29 {
30 class IList;
31 } } } // Tizen::Base::Collection
32
33 namespace Tizen { namespace Net { namespace Wifi
34 {
35 class _WifiDirectGroupOwnerImpl;
36 class WifiDirectDeviceInfo;
37
38 /**
39  * @if OSPDEPREC
40  * @class   WifiDirectGroupOwner
41  * @brief   <i> [Deprecated] </i> This class provides methods for the Wi-Fi Direct group owner management.
42  * @deprecated   This class 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.
45  *
46  * @since   2.0
47  *
48  * The %WifiDirectGroupOwner class provides methods to manage the Wi-Fi Direct group.
49  * @endif
50  */
51
52 class _OSP_EXPORT_ WifiDirectGroupOwner
53     : public WifiDirectGroupMember
54 {
55 public:
56     /**
57      * @if OSPDEPREC
58      * This destructor overrides Tizen::Base::Object::~Object().
59      *
60      * @brief   <i> [Deprecated] </i>
61      * @deprecated  The %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.
64      *
65      * @since 2.0
66      * @endif
67      */
68     virtual ~WifiDirectGroupOwner(void);
69
70     /**
71      * @if OSPDEPREC
72      * Destroys a Wi-Fi Direct group.
73      *
74      * @brief   <i> [Deprecated] </i>
75      * @deprecated  The %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 the WifiDirectDevice::LeaveGroup() method instead.
79      *
80      * @since 2.0
81      * @privlevel   public
82      * @privilege   http://tizen.org/privilege/wifi.wifidirect.admin
83      *
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()
92      * @endif
93      */
94     result DestroyGroup(void);
95
96     /**
97      * @if OSPDEPREC
98      * Disconnects a specified Wi-Fi Direct group client.
99      *
100      * @brief   <i> [Deprecated] </i>
101      * @deprecated  The %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 the WifiDirectDevice::Disconnect() method instead.
105      *
106      * @since 2.0
107      * @privlevel   public
108      * @privilege   http://tizen.org/privilege/wifi.wifidirect.admin
109      *
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()
120      * @endif
121      */
122     result Disconnect(const WifiDirectDeviceInfo& wifiDirectRemoteDeviceInfo);
123
124     /**
125      * @if OSPDEPREC
126      * Gets the list of information of all the members of the Wi-Fi Direct group.
127      *
128      * @brief   <i> [Deprecated] </i>
129      * @deprecated  The %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 the GetAllGroupMemberInfoListN() method, use WifiDirectDevice::GetGroupOwnerInfoN() for group owner information and WifiDirectDevice::GetGroupClientInfoListN() for group clients information.
133      *
134      * @since 2.0
135      *
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.
143      * @endif
144      */
145     Tizen::Base::Collection::IList* GetAllGroupMemberInfoListN(void) const;
146
147     /**
148      * @if OSPDEPREC
149      * Starts the group member information service.
150      *
151      * @brief   <i> [Deprecated] </i>
152      * @deprecated  The %WifiDirectGroupOwner class 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.
155      *
156      * @since 2.0
157      * @privlevel   public
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
160      *
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()
171      * @endif
172      */
173     result StartGroupMemberInfoService(int portNumber = DEFAULT_PORT);
174
175     /**
176      * @if OSPDEPREC
177      * Stops the group member information service.
178      *
179      * @brief   <i> [Deprecated] </i>
180      * @deprecated  The %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.
183      *
184      * @since 2.0
185      * @privlevel   public
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
188      *
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()
196      * @endif
197      */
198     result StopGroupMemberInfoService(void);
199
200 private:
201     /**
202      * This default constructor is intentionally declared as private so that only the platform can create an instance.
203      *
204      * @remarks     After creating an instance of this class, the Construct() method must be explicitly called to
205      *              initialize this instance.
206      * @see         Construct()
207      */
208     WifiDirectGroupOwner(void);
209
210     /**
211      * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
212      *
213      * @param[in]   value   An instance of %WifiDirectGroupOwner
214      */
215     WifiDirectGroupOwner(const WifiDirectGroupOwner& value);
216
217     /**
218      * Initializes this instance of WifiDirectGroupOwner with the specified listener.
219      *
220      * @return      An error code
221      *
222      * @param[in]   wifiDirectDeviceImpl    A reference to the __WifiDirectDeviceImpl instance
223      *
224      * @exception   E_SUCCESS               The method is successful.
225      * @exception   E_SYSTEM                A system error has occurred.
226      */
227     result Construct(_WifiDirectGroupOwnerImpl& wifiDirectGroupOwnerImpl);
228
229     /**
230      * The implementation of this copy assignment operator is intentionally blank and
231      * declared as private to prohibit copying of objects.
232      *
233      * @param[in]   rhs An instance of %WifiDirectGroupOwner
234      */
235     WifiDirectGroupOwner& operator =(const WifiDirectGroupOwner& rhs);
236
237 private:
238     static const int DEFAULT_PORT = 3895;
239
240     _WifiDirectGroupOwnerImpl* __pWifiDirectGroupOwnerImpl;
241
242     friend class _WifiDirectGroupOwnerImpl;
243 }; // WifiDirectGroupOwner
244
245 } } } // Tizen::Net::Wifi
246 #endif // _FNET_WIFI_WIFI_DIRECT_GROUP_OWNER_H_