Merge from 2.2.1
[platform/framework/native/net.git] / inc / FNetWifiIWifiDirectGroupClientListener.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        FNetWifiIWifiDirectGroupClientListener.h
19  * @brief       This is the header file for the %IWifiDirectGroupClientListener interface.
20  *
21  * This header file contains the declarations of the %IWifiDirectGroupClientListener interface.
22  */
23 #ifndef _FNET_WIFI_IWIFI_DIRECT_GROUP_CLIENT_LISTENER_H_
24 #define _FNET_WIFI_IWIFI_DIRECT_GROUP_CLIENT_LISTENER_H_
25
26 #include <FBaseRtIEventListener.h>
27 #include <FNetWifiWifiTypes.h>
28
29 namespace Tizen { namespace Base { namespace Collection
30 {
31 class IList;
32 } } } // Tizen::Base::Collection
33
34 namespace Tizen { namespace Net { namespace Wifi
35 {
36 class WifiDirectDeviceInfo;
37
38 /**
39  * @if OSPDEPREC
40  * @interface   IWifiDirectGroupClientListener
41  * @brief       <i> [Deprecated] </i> This interface implements listeners for the WifiDirectGroupClient events.
42  * @deprecated  The WifiDirectGroupClient class is deprecated, therefore, this interface is also deprecated. @n
43  *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role(for example, group owner,
44  *              group client, and so on) and so it was necessary to use these APIs. @n
45  *              The Wi-Fi Direct APIs have now been revised to allow the use of APIs with ease irrespective of the
46  *              role. Now the APIs have been integrated into the IWifiDirectDeviceListener interface. @n
47  *              Instead of using the %IWifiDirectGroupClientListener interface, use the %IWifiDirectDeviceListener
48  *              interface.
49  *
50  * @since       2.0
51  *
52  * The %IWifiDirectGroupClientListener interface represents a listener that is used to obtain the Wi-Fi Direct client's
53  * 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_ IWifiDirectGroupClientListener
61         : virtual public Tizen::Base::Runtime::IEventListener
62 {
63 public:
64    /**
65         * @if OSPDEPREC
66         * This polymorphic destructor should be overridden if required. @n 
67         * This way, the destructors of the derived classes are called when the destructor of this interface is called.
68         *
69         * @brief       <i> [Deprecated] </i>
70         * @deprecated  The WifiDirectGroupClient class is deprecated, therefore, this destructor is also deprecated. @n
71         *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role(for example, group
72         *              owner, group client, and so on) and so it was necessary to use these APIs. @n
73         *              However, now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease
74         *              irrespective of the role.
75         *
76         * @since       2.0
77         * @endif
78         */
79         virtual ~IWifiDirectGroupClientListener(void) {}
80
81    /**
82         * @if OSPDEPREC
83         * Called to notify an application when the connection to a Wi-Fi Direct group owner is terminated.
84         *
85         * @brief       <i> [Deprecated] </i>
86         * @deprecated  The WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
87         *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role(for example, group
88         *              owner, group client, and so on) and so it was necessary to use these APIs. @n
89         *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
90         *              role. @n
91         *              As these APIs have now been integrated into the IWifiDirectDeviceListener interface, use
92         *              IWifiDirectDeviceListener::OnWifiDirectDisconnected() method instead.
93         *
94         * @since       2.0
95         *
96         * @param[in]   localDeviceId       The ID of the Wi-Fi Direct device
97         * @param[in]   reason              The reason to terminate this association
98         * @param[in]   r                   An error code
99         * @exception   E_SUCCESS           The disassociation is successful.
100         * @exception   E_SYSTEM            A system error has occurred.
101         * @exception   E_NOT_RESPONDING    The target is not responding.
102         * @remarks
103         *              - When a device is disconnected by itself using WifiDirectGroupClient::Disassociate() method, this
104         *                event is invoked with Wifi::WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_SELF_INITIATED.
105         *              - When a device is disconnected by a group owner using WifiDirectGroupOwner::Disconnect() method, due
106         *                to no range, or abrupt connection loss to the group owner, this event is invoked with
107         *                Wifi::WIFI_DIRECT_ASSOCIATION_TERMINATION_REASON_DISCONNECTED.
108         * @endif
109         */
110         virtual void OnWifiDirectAssociationTerminated(WifiDirectDeviceId localDeviceId,
111                         WifiDirectAssociationTerminationReason reason, result r) = 0;
112
113    /**
114         * @if OSPDEPREC
115         * Called to notify an application when the request to acquire WifiDirectDeviceInfo from a Wi-Fi Direct group
116         * owner is received.
117         *
118         * @brief       <i> [Deprecated] </i>
119         * @deprecated  The WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
120         *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role(for example, group
121         *              owner, group client, and so on) and so it was necessary to use these APIs. @n
122         *              Now the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease irrespective of the
123         *              role. @n
124         *              So the APIs have been integrated into the WifiDirectDevice class. Hence, use the
125         *              WifiDirectDevice::GetGroupOwnerInfoN() method instead.
126         *
127         * @since       2.0
128         *
129         * @param[in]   localDeviceId                   The ID of the Wi-Fi Direct device
130         * @param[in]   wifiDirectGroupOwnerDeviceInfo  The WifiDirectDeviceInfo instance of the Wi-Fi Direct group owner
131         * @param[in]   r                               An error code
132         * @exception   E_SUCCESS                       The request for acquiring group owner information is successful.
133         * @exception   E_SYSTEM                        A system error has occurred.
134         * @exception   E_ALREADY_BOUND                 The specified port number is already in use.
135         * @exception   E_OUT_OF_MEMORY                 The memory is insufficient.
136         * @exception   E_NOT_RESPONDING                The target is not responding.
137         * @see         WifiDirectGroupClient::RequestGroupOwnerInfo()
138         * @endif
139         */
140         virtual void OnWifiDirectGroupOwnerInfoReceived(WifiDirectDeviceId localDeviceId,
141                         const WifiDirectDeviceInfo& wifiDirectGroupOwnerDeviceInfo, result r) = 0;
142
143    /**
144         * @if OSPDEPREC
145         * Called to notify an application that the WifiDirectDeviceInfo list of group members has been received.
146         *
147         * @brief       <i> [Deprecated] </i>
148         * @deprecated  The WifiDirectGroupClient class is deprecated, therefore, this method is also deprecated. @n
149         *              Earlier, the Wi-Fi Direct APIs were strictly provided depending on the role(for example, group
150         *               owner, group client, and so on) and so it was necessary to use these APIs. @n
151         *              This is because the Wi-Fi Direct APIs have been revised to allow the use of APIs with ease
152         *              irrespective of the role. @n
153         *
154         * @since       2.0
155         *
156         * @param[in]   localDeviceId             The ID of the Wi-Fi Direct device
157         * @param[in]   pWifiDirectDeviceInfoList The list of WifiDirectDeviceInfo, @n
158         *                                        else @c null if it fails
159         * @param[in]   r                         An error code
160         * @exception   E_SUCCESS                 The response has been received successfully.
161         * @exception   E_SYSTEM                  A system error has occurred.
162         * @exception   E_ALREADY_BOUND           The specified port number is already in use.
163         * @exception   E_OUT_OF_MEMORY           The memory is insufficient.
164         * @exception   E_NOT_RESPONDING          The group owner is not reachable.
165         * @see         WifiDirectGroupClient::RequestAllGroupMemberInfo()
166         * @endif
167         */
168         virtual void OnWifiDirectAllGroupMemberInfoReceivedN(WifiDirectDeviceId localDeviceId,
169                         Tizen::Base::Collection::IList* pWifiDirectDeviceInfoList, result r) = 0;
170
171 protected:
172         //
173         // This method is for internal use only. Using this method can cause behavioral, security-related,
174         // and consistency-related issues in the application.
175         //
176         // This method is reserved and may change its name at any time without prior notice.
177         //
178         // @since       2.0
179         //
180         virtual void OnWifiDirectGroupClientListener_Reserved1(void) {}
181
182         //
183         // This method is for internal use only. Using this method can cause behavioral, security-related,
184         // and consistency-related issues in the application.
185         //
186         // This method is reserved and may change its name at any time without prior notice.
187         //
188         // @since       2.0
189         //
190         virtual void OnWifiDirectGroupClientListener_Reserved2(void) {}
191
192         //
193         // This method is for internal use only. Using this method can cause behavioral, security-related,
194         // and consistency-related issues in the application.
195         //
196         // This method is reserved and may change its name at any time without prior notice.
197         //
198         // @since       2.0
199         //
200         virtual void OnWifiDirectGroupClientListener_Reserved3(void) {}
201
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 OnWifiDirectGroupClientListener_Reserved4(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 OnWifiDirectGroupClientListener_Reserved5(void) {}
221 }; // IWifiDirectGroupClientListener
222
223 } } } //Tizen::Net::Wifi
224 #endif // _FNET_WIFI_IWIFI_DIRECT_GROUP_CLIENT_LISTENER_H_