2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FNetWifiIWifiManagerEventListener.h
19 * @brief This is the header file for the %IWifiManagerEventListener interface.
21 * This header file contains the declarations of the %IWifiManagerEventListener interface.
24 #ifndef _FNET_WIFI_IWIFI_MANAGER_EVENT_LISTENER_H_
25 #define _FNET_WIFI_IWIFI_MANAGER_EVENT_LISTENER_H_
27 #include <FBaseRtIEventListener.h>
28 #include <FBaseColArrayList.h>
29 #include <FNetWifiWifiTypes.h>
31 namespace Tizen { namespace Net { namespace Wifi
34 * @interface IWifiManagerEventListener
35 * @brief This interface provides the listeners for WifiManager events.
39 * The %IWifiManagerEventListener interface specifies the methods used for creating notifications about the different
40 * kinds of WifiManager events. These events are only sent out when using %WifiManager. When a %WifiManager event is
41 * generated, a method of this class is called. Thus, if an application provides any functionality related to the
42 * %WifiManager events, override and use the methods of this interface. This interface specifies the methods used for
43 * creating notifications about the different kinds of %WifiManager events.
45 * For more information on the class features, see
46 * <a href="../org.tizen.native.appprogramming/html/guide/net/wi-fi_connectivity.htm">Wi-Fi Connectivity</a>.
48 class _OSP_EXPORT_ IWifiManagerEventListener
49 : virtual public Tizen::Base::Runtime::IEventListener
53 * This polymorphic destructor should be overridden if required. This way,
54 * the destructors of the derived classes are called when the destructor of this interface is called.
58 virtual ~IWifiManagerEventListener(void) {}
61 * Called to notify the application that the local Wi-Fi radio is activated.
65 * @param[in] r The error code that occurs during the activation
66 * @exception E_SUCCESS The activation is successful.
67 * @exception E_FAILURE The method has failed to activate.
68 * @see WifiManager::Activate()
70 virtual void OnWifiActivated(result r) = 0;
73 * Called to notify the application that the local Wi-Fi radio is deactivated.
77 * @param[in] r The error code that occurs during the deactivation
78 * @exception E_SUCCESS The deactivation is successful.
79 * @exception E_FAILURE The method has failed to deactivate.
80 * @see WifiManager::Deactivate()
82 virtual void OnWifiDeactivated(result r) = 0;
85 * Called to notify that the connection to an access point (only an infrastructure mode BSS) has been completely
90 * @param[in] ssid The SSID of the connected BSS
91 * @param[in] r The error code that occurs during the connection
92 * @exception E_SUCCESS The connection is successful.
93 * @exception E_FAILURE The method has failed to connect.
94 * @exception E_AUTHENTICATION The authentication fails when Wi-Fi is connected.
95 * @exception E_NOT_RESPONDING The target is not responding when Wi-Fi is connected.
96 * @exception E_DHCP The DHCP fails in case of a dynamic IP.
97 * @see WifiManager::Connect()
99 virtual void OnWifiConnected(const Tizen::Base::String& ssid, result r) = 0;
102 * Called to notify that the connection to a BSS has been terminated.
106 virtual void OnWifiDisconnected(void) = 0;
109 * Called to notify that the Received Signal Strength Indication (RSSI) from BSS has been changed.
113 * @param[in] rssi The updated RSSI value (dbm)
115 virtual void OnWifiRssiChanged(long rssi) = 0;
118 * Called to notify that the scan to find the access points has been completed.
122 * @param[in] pWifiBssInfoList The list of WifiBssInfo information representing the access points discovered
124 * @param[in] r The error code that occurs during the scan
125 * @exception E_SUCCESS The scan is successful.
126 * @exception E_FAILURE The scan has failed.
127 * @see WifiManager::Scan()
129 virtual void OnWifiScanCompletedN(const Tizen::Base::Collection::IList* pWifiBssInfoList, result r) = 0;
133 // This method is for internal use only. Using this method can cause behavioral, security-related,
134 // and consistency-related issues in the application.
136 // This method is reserved and may change its name at any time without prior notice.
140 virtual void IWifiManagerEventListener_Reserved1(void) {}
143 // This method is for internal use only. Using this method can cause behavioral, security-related,
144 // and consistency-related issues in the application.
146 // This method is reserved and may change its name at any time without prior notice.
150 virtual void IWifiManagerEventListener_Reserved2(void) {}
151 }; // IWifiManagerEventListener
153 } } } // Tizen::Net::Wifi
154 #endif // _FNET_WIFI_IWIFI_MANAGER_EVENT_LISTENER_H_