diff options
Diffstat (limited to 'src/FNetBt_BluetoothDeviceEvent.h')
-rw-r--r-- | src/FNetBt_BluetoothDeviceEvent.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/FNetBt_BluetoothDeviceEvent.h b/src/FNetBt_BluetoothDeviceEvent.h new file mode 100644 index 0000000..d6d151c --- /dev/null +++ b/src/FNetBt_BluetoothDeviceEvent.h @@ -0,0 +1,84 @@ +// +// 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_BluetoothDeviceEvent.h + * @brief This is the header file for the _BluetoothDeviceEvent class. + * + * This header file contains the declarations of the _BluetoothDeviceEvent class. + * The _BluetoothDeviceEvent class can call a method of a listener (IBluetoothDeviceEventListener object). + * So, when a device event is occurred, listener instances can handle it appropriately. + */ +#ifndef _FNET_BT_INTERNAL_BLUETOOTH_DEVICE_EVENT_H_ +#define _FNET_BT_INTERNAL_BLUETOOTH_DEVICE_EVENT_H_ + +#include <FOspConfig.h> +#include <FBaseResult.h> +#include <FBaseRt_Event.h> + +// Forward declaration +namespace Tizen { namespace Base { namespace Runtime +{ +class IEventListener; +class IEventArg; +} } } + +namespace Tizen { namespace Net { namespace Bluetooth +{ + +// +// @class _BluetoothDeviceEvent +// @brief This class handles Bluetooth device events. +// +// When a Bluetooth device event occurs, the _BluetoothDeviceEvent object finds a IBluetoothDeviceEventListener object +// and calls an appropriate method of the listener. +// +class _BluetoothDeviceEvent + : public Tizen::Base::Runtime::_Event +{ +public: + /** + * This is the default constructor. + */ + _BluetoothDeviceEvent(void); + + /** + * This is the class destructor. + */ + virtual ~_BluetoothDeviceEvent(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 device 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: + _BluetoothDeviceEvent(const _BluetoothDeviceEvent& value); + _BluetoothDeviceEvent& operator =(const _BluetoothDeviceEvent& rhs); + +}; // _BluetoothDeviceEvent + +} } } +#endif // _FNET_BT_INTERNAL_BLUETOOTH_DEVICE_EVENT_H_ |