diff options
Diffstat (limited to 'src/FNetBt_BluetoothManagerEvent.h')
-rw-r--r-- | src/FNetBt_BluetoothManagerEvent.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/FNetBt_BluetoothManagerEvent.h b/src/FNetBt_BluetoothManagerEvent.h new file mode 100644 index 0000000..6f54926 --- /dev/null +++ b/src/FNetBt_BluetoothManagerEvent.h @@ -0,0 +1,83 @@ +// +// 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_BluetoothManagerEvent.h + * @brief This is the header file for the _BluetoothManagerEvent class. + * + * This header file contains the declarations of the _BluetoothManagerEvent class. + * The _BluetoothManagerEvent class can call a method of a listener (IBluetoothManagerEventListener object). + * So, when a device event is occurred, listener instances can handle it appropriately. + */ +#ifndef _FNET_BT_INTERNAL_BLUETOOTH_MANAGER_EVENT_H_ +#define _FNET_BT_INTERNAL_BLUETOOTH_MANAGER_EVENT_H_ + +#include <FOspConfig.h> +#include <FBaseResult.h> +#include <FBaseRt_Event.h> + +namespace Tizen { namespace Base { namespace Runtime +{ +class IEventListener; +class IEventArg; +} } } + +namespace Tizen { namespace Net { namespace Bluetooth +{ + +/** + * @class _BluetoothManagerEvent + * @brief This class handles Bluetooth manager events. + * + * When a Bluetooth manager event occurs, the _BluetoothManagerEvent object finds a IBluetoothManagerEventListener object + * and calls an appropriate method of the listener. + */ +class _BluetoothManagerEvent + : public Base::Runtime::_Event +{ +public: + /** + * This is the default constructor. + */ + _BluetoothManagerEvent(void); + + /** + * This is the class destructor. + */ + virtual ~_BluetoothManagerEvent(void); + result Construct(void); + +protected: + /** + * Checks the argument and finds out the type of event. After that, this method calls appropriate pListener's method. + * + * @return A result code. + * @param[in] pListener An event listener related to this Bluetooth manger 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: + _BluetoothManagerEvent(const _BluetoothManagerEvent& value); + _BluetoothManagerEvent& operator =(const _BluetoothManagerEvent& rhs); + +}; // _BluetoothManagerEvent + +} } } +#endif // _FNET_BT_INTERNAL_BLUETOOTH_MANAGER_EVENT_H_ |