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 FNetBt_BluetoothConnectionEventArg.h
19 * @brief This is the header file for the _BluetoothConnectionEventArg class.
21 * This header file contains the declarations of the _BluetoothConnectionEventArg class which includes information to be
22 * passed to the event listeners
24 #ifndef _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_
25 #define _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_
27 #include <FBaseObject.h>
28 #include <FOspConfig.h>
29 #include <FBaseRtIEventArg.h>
31 namespace Tizen { namespace Base
36 namespace Tizen { namespace Net { namespace Bluetooth
40 * @enum _BluetoothConnectionEventType
41 * Type for specifying the type of _BluetoothConnectionEvent
43 enum _BluetoothConnectionEventType
45 _BT_CONNECTION_EVENT_CONNECTED, /**< For notifying that the device is connected */
46 _BT_CONNECTION_EVENT_DISCONNECTED, /**< For notifying that the device is disconnected */
50 * @class _BluetoothConnectionEventArg
51 * @brief This class is used as an argument for callback methods of the _IBluetoothConnectionEventListener class.
53 * When a _BluetoothConnectionEvent occurs, the _BluetoothConnectionEvent finds a _IBluetoothConnectionEventListener instance
54 * which is registered for the _BluetoothConnectionEvent and calls an appropriate method of the listener.
55 * @see _IBluetoothConnectionEventListener
57 class _BluetoothConnectionEventArg
58 : public Tizen::Base::Object
59 , public Tizen::Base::Runtime::IEventArg
64 * This is a class constructor for _BT_CONNECTION_EVENT_CONNECTED and _BT_CONNECTION_EVENT_DISCONNECTED event.
66 * @param[in] address the remote device address to be observed regarding connection
68 _BluetoothConnectionEventArg(_BluetoothConnectionEventType type, const Tizen::Base::ByteBuffer& address);
71 * This is the class destructor.
73 ~_BluetoothConnectionEventArg(void);
76 * Gets the type of this event.
78 * @return The type of the event
80 _BluetoothConnectionEventType GetEventType(void) const;
83 * Gets the remote device address.
85 * @return the pointer of the remote device address which is a connected or disconnected device
87 const Tizen::Base::ByteBuffer* GetRemoteAddress(void) const;
90 _BluetoothConnectionEventArg(void);
91 _BluetoothConnectionEventArg(const _BluetoothConnectionEventArg& eventArg);
92 _BluetoothConnectionEventArg& operator =(const _BluetoothConnectionEventArg& rValue);
95 _BluetoothConnectionEventType __evtType;
96 Tizen::Base::ByteBuffer* __pRemoteAddress;
98 }; // _BluetoothConnectionEventArg
101 #endif // _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_