// // Open Service Platform // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /** * @file FNetBt_BluetoothHealthEvent.h * @brief This is the header file for the _BluetoothHealthEvent class. * * This header file contains the declarations of the _BluetoothHealthEvent class. * The _BluetoothHealthEvent class can call a method of a listener (_IBluetoothHealthEventListener object). * So, when a device event is occurred, listener instances can handle it appropriately. */ #ifndef _FNET_BT_INTERNAL_BLUETOOTH_HEALTH_EVENT_H_ #define _FNET_BT_INTERNAL_BLUETOOTH_HEALTH_EVENT_H_ #include #include #include // Forward declaration namespace Tizen { namespace Base { namespace Runtime { class IEventListener; class IEventArg; } } } namespace Tizen { namespace Net { namespace Bluetooth { // // @class _BluetoothHealthEvent // @brief This class handles Bluetooth Health events. // // When a Bluetooth device event occurs, the _BluetoothHealthEvent object finds a _IBluetoothHealthEventListener object // and calls an appropriate method of the listener. // class _BluetoothHealthEvent : public Tizen::Base::Runtime::_Event { public: /** * This is the default constructor. */ _BluetoothHealthEvent(void); /** * This is the class destructor. */ virtual ~_BluetoothHealthEvent(void); result Construct(void); protected: /** * Checks the argument and finds out the type of event. After that, this method calls appropriate Listener's method. * * @return A result code. * @param[in] pListener An event listener related to this Bluetooth health event. * @param[in] arg An event argument including information to be passed to the event listeners * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The argument passed to a method contains invalid values. * @exception E_SYSTEM A system error occurred. */ virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); private: _BluetoothHealthEvent(const _BluetoothHealthEvent& value); _BluetoothHealthEvent& operator =(const _BluetoothHealthEvent& rhs); }; // _BluetoothHealthEvent } } } #endif // _FNET_BT_INTERNAL_BLUETOOTH_HEALTH_EVENT_H_