diff options
Diffstat (limited to 'src/FNetBt_BluetoothManagerEventArg.h')
-rw-r--r-- | src/FNetBt_BluetoothManagerEventArg.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/src/FNetBt_BluetoothManagerEventArg.h b/src/FNetBt_BluetoothManagerEventArg.h new file mode 100644 index 0000000..48a73af --- /dev/null +++ b/src/FNetBt_BluetoothManagerEventArg.h @@ -0,0 +1,114 @@ +// +// 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_BluetoothManagerEventArg.h + * @brief This is the header file for the _BluetoothManagerEventArg class. + * + * This header file contains the declarations of the _BluetoothManagerEventArg class which includes information to be + * passed to the event listeners + */ +#ifndef _FNET_BT_INTERNAL_BLUETOOTH_MANAGER_EVENT_ARG_H_ +#define _FNET_BT_INTERNAL_BLUETOOTH_MANAGER_EVENT_ARG_H_ + +#include <FBaseObject.h> +#include <FBaseResult.h> +#include <FOspConfig.h> +#include <FBaseRtIEventArg.h> +#include <FNetBtBluetoothTypes.h> + +namespace Tizen { namespace Net { namespace Bluetooth +{ + +/** + * @enum _BluetoothMangerEventType + * Type for specifying the type of _BluetoothMangerEvent + */ +enum _BluetoothMangerEventType +{ + _BT_MANAGER_EVENT_ACTIVATED, /**< For notifying that Bluetooth is activated */ + _BT_MANAGER_EVENT_DEACTIVATED, /**< For notifying that Bluetooth is deactivated */ + _BT_MANAGER_EVENT_DISCOVERABLE /**< For notifying that Bluetooth discoverable mode is changed */ +}; + +/** + * @class _BluetoothManagerEventArg + * @brief This class is used as an argument for callback methods of the IBluetoothManagerEventListener class. + * + * When a _BluetoothManagerEvent occurs, the _BluetoothManagerEvent finds a IBluetoothManagerEventListener instance + * which is registered for the _BluetoothManagerEvent and calls an appropriate method of the listener. + * @see IBluetoothManagerEventListener + */ +class _BluetoothManagerEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +public: + /** + * This is a class constructor for _BT_MANAGER_EVENT_ACTIVATED or _BT_MANAGER_EVENT_DEACTIVATED. + * + * @param[in] evt The type of the event + * @param[in] r The result of the event + */ + _BluetoothManagerEventArg(_BluetoothMangerEventType evt, result r); + + /** + * This is a class constructor for _BT_MANAGER_EVENT_DISCOVERABLE. + * + * @param[in] mode The changed discoverable mode + */ + _BluetoothManagerEventArg(BluetoothDiscoverableMode mode); + + /** + * This is the class destructor. + */ + ~_BluetoothManagerEventArg(void); + + /** + * Gets the type of this event. + * + * @return The type of the event + */ + _BluetoothMangerEventType GetEventType(void) const; + + /** + * Gets the error result of this event. + * + * @return The result of the event + */ + result GetErrorResult(void) const; + + /** + * Gets the discoverable mode of this event. + * + * @return The discoverable mode + */ + BluetoothDiscoverableMode GetDiscoverableMode(void) const; + +private: + _BluetoothManagerEventArg(void); + _BluetoothManagerEventArg(const _BluetoothManagerEventArg& eventArg); + _BluetoothManagerEventArg& operator =(const _BluetoothManagerEventArg& rValue); + +private: + _BluetoothMangerEventType __evt; + result __result; + BluetoothDiscoverableMode __mode; + +}; // _BluetoothManagerEventArg + +} } } +#endif // _FNET_BT_INTERNAL_BLUETOOTH_MANAGER_EVENT_ARG_H_ |