Fixed bug.
[platform/framework/native/net.git] / inc / FNetWifiIWifiDirectGroupOwnerListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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        FNetWifiIWifiDirectGroupOwnerListener.h
19  * @brief       This is the header file for the %IWifiDirectGroupOwnerListener interface.
20  *
21  * This header file contains the declarations of the %IWifiDirectGroupOwnerListener interface.
22  */
23 #ifndef _FNET_WIFI_IWIFI_DIRECT_GROUP_OWNER_LISTENER_H_
24 #define _FNET_WIFI_IWIFI_DIRECT_GROUP_OWNER_LISTENER_H_
25
26 #include <FBaseRtIEventListener.h>
27 #include <FNetWifiWifiTypes.h>
28 #include <FNetNetConnection.h>
29
30 namespace Tizen { namespace Net
31 {
32 class NetConnection;
33 } } // Tizen::Net
34
35 namespace Tizen { namespace Net { namespace Wifi
36 {
37 class WifiDirectDeviceInfo;
38
39 /**
40  * @if OSPDEPREC
41  * @interface   IWifiDirectGroupOwnerListener
42  * @brief       <i> [Deprecated] </i> This interface implements listeners for the WifiDirectGroupOwner events.
43  * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this interface is also deprecated. @n
44  *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role(for example, group owner,
45  *              group client, and so on) and so it was necessary to use these APIs. Now the Wi-Fi Direct APIs have been
46  *              revised to allow the use of APIs with ease irrespective of the role. @n
47  *              As the APIs have been integrated into the IWifiDirectDeviceListener interface. Hence, use the
48  *              IWifiDirectDeviceListener interface instead.
49  *
50  * @since       2.0
51  *
52  * The %IWifiDirectGroupOwnerListener interface represents a listener that is used to obtain the Wi-Fi Direct group
53  * owner's status or information.
54  *
55  * For more information on the class features, see
56  * <a href="../org.tizen.native.appprogramming/html/guide/net/wi-fi_direct_connectivity.htm">Wi-Fi Direct Connectivity</a>.
57  * @endif
58  */
59
60 class _OSP_EXPORT_ IWifiDirectGroupOwnerListener
61         : virtual public Tizen::Base::Runtime::IEventListener
62 {
63 public:
64         /**
65          * @if OSPDEPREC
66          * @brief       <i> [Deprecated] </i>
67          * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this destructor is also deprecated. @n
68          *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role for example, group
69          *              owner, group client, and so on) and so it was necessary to use these APIs. Now the Wi-Fi Direct
70          *              APIs have been revised to allow the use of APIs with ease irrespective of the role.
71          *
72          * @since       2.0
73          * @endif
74          */
75         virtual ~IWifiDirectGroupOwnerListener(void) {}
76
77         /**
78          * @if OSPDEPREC
79          * Called to notify the application that a successful association has occurred with a client.
80          *
81          * @brief       <i> [Deprecated] </i>
82          * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
83          *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
84          *              owner, group client, and so on) and so it was necessary to use these APIs. @n
85          *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
86          *              role. @n
87          *              As the APIs have been integrated into the IWifiDirectDeviceListener interface, use the
88          *              IWifiDirectDeviceListener::OnWifiDirectConnected() method instead.
89          *
90          * @since       2.0
91          *
92          * @param[in]   localDeviceId           An ID for a Wi-Fi Direct device
93          * @param[in]   wifiDirectClientInfo    The WifiDirectDeviceInfo instance of an associated node
94          * @endif
95          */
96         virtual void OnWifiDirectClientAssociated(WifiDirectDeviceId localDeviceId,
97                         const WifiDirectDeviceInfo& wifiDirectClientInfo) = 0;
98
99         /**
100          * @if OSPDEPREC
101          * Called to notify the application that a disassociation has occurred with a client.
102          *
103          * @brief       <i> [Deprecated] </i>
104          * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
105          *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
106          *              owner, group client, and so on) and so it was necessary to use these APIs. @n
107          *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
108          *              role. @n
109          *              As the APIs have been integrated into the IWifiDirectDeviceListener interface, use the
110          *              IWifiDirectDeviceListener::OnWifiDirectDisconnected() method instead.
111          *
112          * @since       2.0
113          *
114          * @param[in]   localDeviceId           An ID for a Wi-Fi Direct device
115          * @param[in]   wifiDirectClientInfo    The WifiDirectDeviceInfo instance of a disassociated node
116          * @param[in]   reason                  The reason of termination of an association
117          * @remarks     - When a client is disconnected by a group owner using WifiDirectGroupOwner::Disconnect, this event
118          *                is invoked with Wifi::WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_SELF_INITIATED. @n
119          *              - When a client is disconnected by itself using WifiDirectGroupClient::Disassociate(), due to no
120          *                range, or due to abrupt connection loss to the group owner, this event is invoked with
121          *                Wifi::WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_DISCONNECTED.
122          * @endif
123          */
124         virtual void OnWifiDirectClientDisassociated(WifiDirectDeviceId localDeviceId,
125                         const WifiDirectDeviceInfo& wifiDirectClientInfo, WifiDirectAssociationTerminationReason reason) = 0;
126
127         /**
128          * @if OSPDEPREC
129          * Called to notify the application when the Wi-Fi Direct group is destroyed.
130          *
131          * @brief       <i> [Deprecated] </i>
132          * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
133          *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
134          *              owner, group client, and so on) and so it was necessary to use these APIs. @n
135          *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
136          *              role. @n
137          *              As the APIs have been integrated into the IWifiDirectDeviceListener interface, use the
138          *              IWifiDirectDeviceListener::OnWifiDirectDisconnected() or
139          *              IWifiDirectDeviceListener::OnWifiDirectGroupLeft() method instead.
140          *
141          * @since       2.0
142          *
143          * @param[in]   localDeviceId       An ID for a Wi-Fi Direct device
144          * @param[in]   r                   An error code
145          * @exception   E_SUCCESS           The method is successful.
146          * @exception   E_SYSTEM            A system error has occurred.
147          * @see         WifiDirectGroupOwner::DestroyGroup()
148          * @endif
149          */
150         virtual void OnWifiDirectGroupDestroyed(WifiDirectDeviceId localDeviceId, result r) = 0;
151
152         /**
153          * @if OSPDEPREC
154          * Called to notify the application that the group member information service has started.
155          *
156          * @brief       <i> [Deprecated] </i>
157          * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
158          *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
159          *              owner, group client, and so on) and so it was necessary to use these APIs. @n
160          *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
161          *              role.
162          *
163          * @since       2.0
164          *
165          * @param[in]   localDeviceId       An ID for a Wi-Fi Direct device
166          * @param[in]   pNetConnection      The network connection that started with the Wi-Fi Direct net account, @n
167          *                                  else @c null if the system fails to start the network connection @n
168          * @param[in]   r                   An error code
169          * @exception   E_SUCCESS           The method is successful.
170          * @exception   E_SYSTEM            A system error has occurred.
171          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
172          * @exception   E_ALREADY_BOUND     The specified port number is already in use.
173          * @see         WifiDirectGroupOwner::StartGroupMemberInfoService()
174          * @endif
175          */
176         virtual void OnWifiDirectGroupMemberInfoServiceStarted(WifiDirectDeviceId localDeviceId,
177                         const Tizen::Net::NetConnection* pNetConnection, result r) = 0;
178
179         /**
180          * @if OSPDEPREC
181          * Called to notify the application that the group member information service has stopped.
182          *
183          * @brief       <i> [Deprecated] </i>
184          * @deprecated  The %WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
185          *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role (for example, group
186          *              owner, group client, and so on) and so it was necessary to use these APIs. @n
187          *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
188          *              role.
189          *
190          * @since       2.0
191          *
192          * @param[in]   localDeviceId       An ID for a Wi-Fi Direct device
193          * @param[in]   r                   An error code
194          * @exception   E_SUCCESS           The method is successful.
195          * @exception   E_SYSTEM            A system error has occurred.
196          * @see         WifiDirectGroupOwner::StopGroupMemberInfoService()
197          * @endif
198          */
199         virtual void OnWifiDirectGroupMemberInfoServiceStopped(WifiDirectDeviceId localDeviceId, result r) = 0;
200
201 protected:
202         //
203         // This method is for internal use only. Using this method can cause behavioral, security-related,
204         // and consistency-related issues in the application.
205         //
206         // This method is reserved and may change its name at any time without prior notice.
207         //
208         // @since       2.0
209         //
210         virtual void OnWifiDirectGroupOwnerListener_Reserved1(void) {}
211
212         //
213         // This method is for internal use only. Using this method can cause behavioral, security-related,
214         // and consistency-related issues in the application.
215         //
216         // This method is reserved and may change its name at any time without prior notice.
217         //
218         // @since       2.0
219         //
220         virtual void OnWifiDirectGroupOwnerListener_Reserved2(void) {}
221
222         //
223         // This method is for internal use only. Using this method can cause behavioral, security-related,
224         // and consistency-related issues in the application.
225         //
226         // This method is reserved and may change its name at any time without prior notice.
227         //
228         // @since       2.0
229         //
230         virtual void OnWifiDirectGroupOwnerListener_Reserved3(void) {}
231
232         //
233         // This method is for internal use only. Using this method can cause behavioral, security-related,
234         // and consistency-related issues in the application.
235         //
236         //
237         // This method is reserved and may change its name at any time without prior notice.
238         //
239         // @since       2.0
240         //
241         virtual void OnWifiDirectGroupOwnerListener_Reserved4(void) {}
242
243         //
244         // This method is for internal use only. Using this method can cause behavioral, security-related,
245         // and consistency-related issues in the application.
246         //
247         // This method is reserved and may change its name at any time without prior notice.
248         //
249         // @since       2.0
250         //
251         virtual void OnWifiDirectGroupOwnerListener_Reserved5(void) {}
252 }; // IWifiDirectGroupOwnerListener
253
254 } } } //Tizen::Net::Wifi
255 #endif // _FNET_WIFI_IWIFI_DIRECT_GROUP_OWNER_LISTENER_H_