db00add335f5e4a03984b95f35a915c1e46027d9
[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, group client, and so on) and so it was necessary to use these APIs. Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role.  @n
45  *              As the APIs have been integrated into the IWifiDirectDeviceListener interface. Hence, use the IWifiDirectDeviceListener interface instead.
46  *
47  * @since       2.0
48  *
49  * The %IWifiDirectGroupOwnerListener interface represents a listener that is used to obtain the Wi-Fi Direct group owner's status or information.
50  *
51  * 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>.
52  * @endif
53  */
54
55 class _OSP_EXPORT_ IWifiDirectGroupOwnerListener
56         : virtual public Tizen::Base::Runtime::IEventListener
57 {
58 public:
59     /**
60      * @if OSPDEPREC
61      * @brief   <i> [Deprecated] </i>
62      * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this destructor is also deprecated. @n
63          * 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. Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role.
64      *              
65      *
66      * @since   2.0
67      * @endif
68      */
69     virtual ~IWifiDirectGroupOwnerListener(void) {}
70
71     /**
72      * @if OSPDEPREC
73      * Called to notify the application that a successful association has occurred with a client.
74      *
75      * @brief   <i> [Deprecated] </i>
76      * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
77          * 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
78          * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
79      *              
80      *            As the APIs have been integrated into the IWifiDirectDeviceListener interface, use the IWifiDirectDeviceListener::OnWifiDirectConnected() method instead.
81      *
82      * @since 2.0
83      *
84      * @param[in]    localDeviceId           An ID for a Wi-Fi Direct device
85      * @param[in]    wifiDirectClientInfo    The WifiDirectDeviceInfo instance of an associated node
86      * @endif
87      */
88     virtual void OnWifiDirectClientAssociated(WifiDirectDeviceId localDeviceId, const WifiDirectDeviceInfo& wifiDirectClientInfo) = 0;
89
90     /**
91      * @if OSPDEPREC
92      * Called to notify the application that a disassociation has occurred with a client.
93      *
94      * @brief   <i> [Deprecated] </i>
95      * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
96          * 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
97          * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
98      *  
99      *              As the APIs have been integrated into the IWifiDirectDeviceListener interface, use the IWifiDirectDeviceListener::OnWifiDirectDisconnected() method instead.
100      *
101      * @since 2.0
102      *
103      * @param[in]   localDeviceId           An ID for a Wi-Fi Direct device
104      * @param[in]   wifiDirectClientInfo    The WifiDirectDeviceInfo instance of a disassociated node
105      * @param[in]   reason                  The reason of termination of an association
106      * @remarks When a client is disconnected by a group owner using WifiDirectGroupOwner::Disconnect, this event is invoked with Wifi::WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_SELF_INITIATED. @n
107      *          When a client is disconnected by itself using WifiDirectGroupClient::Disassociate(), due to no range, or due to abrupt connection loss to the group owner, this event is invoked with Wifi::WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_DISCONNECTED.
108      * @endif
109      */
110     virtual void OnWifiDirectClientDisassociated(WifiDirectDeviceId localDeviceId, const WifiDirectDeviceInfo& wifiDirectClientInfo, WifiDirectAssociationTerminationReason reason) = 0;
111
112     /**
113      * @if OSPDEPREC
114      * Called to notify the application when the Wi-Fi Direct group is destroyed.
115      *
116      * @brief   <i> [Deprecated] </i>
117      * @deprecated  The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
118      * 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
119          * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role. @n
120      
121      *              As the APIs have been integrated into the IWifiDirectDeviceListener interface, use the IWifiDirectDeviceListener::OnWifiDirectDisconnected() or IWifiDirectDeviceListener::OnWifiDirectGroupLeft() method instead.
122      *
123      * @since 2.0
124      *
125      * @param[in]   localDeviceId       An ID for a Wi-Fi Direct device
126      * @param[in]   r                   An error code
127      * @exception   E_SUCCESS           The method is successful.
128      * @exception   E_SYSTEM            A system error has occurred.
129      * @see         WifiDirectGroupOwner::DestroyGroup()
130      * @endif
131      */
132     virtual void OnWifiDirectGroupDestroyed(WifiDirectDeviceId localDeviceId, result r) = 0;
133
134     /**
135      * @if OSPDEPREC
136      * Called to notify the application that the group member information service has started.
137      *
138      * @brief   <i> [Deprecated] </i>
139     * @deprecated   The WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
140         * 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
141          * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role.
142     
143     *
144     * @since 2.0
145     *
146     * @param[in]    localDeviceId       An ID for a Wi-Fi Direct device
147     * @param[in]    pNetConnection      The network connection that started with the Wi-Fi Direct net account, @n
148     *                                   else @c null if the system fails to start the network connection @n
149     * @param[in]    r                   An error code
150     * @exception    E_SUCCESS           The method is successful.
151     * @exception    E_SYSTEM            A system error has occurred.
152     * @exception    E_OUT_OF_MEMORY     The memory is insufficient.
153     * @exception    E_ALREADY_BOUND     The specified port number is already in use.
154     * @see          WifiDirectGroupOwner::StartGroupMemberInfoService()
155      * @endif
156      */
157     virtual void OnWifiDirectGroupMemberInfoServiceStarted(WifiDirectDeviceId localDeviceId, const Tizen::Net::NetConnection* pNetConnection, result r) = 0;
158
159     /**
160      * @if OSPDEPREC
161     * Called to notify the application that the group member information service has stopped.
162     *
163     * @brief   <i> [Deprecated] </i>
164     * @deprecated  The %WifiDirectGroupOwner class is deprecated, therefore, this method is also deprecated. @n
165         * 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
166          * Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the role.
167     
168     *
169     * @since 2.0
170     *
171     * @param[in]    localDeviceId       An ID for a Wi-Fi Direct device
172     * @param[in]    r                   An error code
173     * @exception    E_SUCCESS           The method is successful.
174     * @exception    E_SYSTEM            A system error has occurred.
175     * @see          WifiDirectGroupOwner::StopGroupMemberInfoService()
176      * @endif
177      */
178     virtual void OnWifiDirectGroupMemberInfoServiceStopped(WifiDirectDeviceId localDeviceId, result r) = 0;
179
180 protected:
181     //
182     // This method is for internal use only. Using this method can cause behavioral, security-related,
183     // and consistency-related issues in the application.
184     //
185     // This method is reserved and may change its name at any time without prior notice.
186     //
187     // @since    2.0
188     //
189     virtual void OnWifiDirectGroupOwnerListener_Reserved1(void) {}
190
191     //
192     // This method is for internal use only. Using this method can cause behavioral, security-related,
193     // and consistency-related issues in the application.
194     //
195     // This method is reserved and may change its name at any time without prior notice.
196     //
197     // @since    2.0
198     //
199     virtual void OnWifiDirectGroupOwnerListener_Reserved2(void) {}
200
201     //
202     // This method is for internal use only. Using this method can cause behavioral, security-related,
203     // and consistency-related issues in the application.
204     //
205     // This method is reserved and may change its name at any time without prior notice.
206     //
207     // @since    2.0
208     //
209     virtual void OnWifiDirectGroupOwnerListener_Reserved3(void) {}
210
211     //
212     // This method is for internal use only. Using this method can cause behavioral, security-related,
213     // and consistency-related issues in the application.
214     //
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_Reserved4(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_Reserved5(void) {}
231 }; // IWifiDirectGroupOwnerListener
232
233 } } } //Tizen::Net::Wifi
234 #endif // _FNET_WIFI_IWIFI_DIRECT_GROUP_OWNER_LISTENER_H_