update the header for Doxygen
[platform/framework/native/bluetooth.git] / src / FNetBt_BluetoothConnectionEventArg.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file    FNetBt_BluetoothConnectionEventArg.h
19  * @brief   This is the header file for the _BluetoothConnectionEventArg class.
20  *
21  * This header file contains the declarations of the _BluetoothConnectionEventArg class which includes information to be
22  * passed to the event listeners
23  */
24 #ifndef _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_
25 #define _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_
26
27 #include <FBaseObject.h>
28 #include <FOspConfig.h>
29 #include <FBaseRtIEventArg.h>
30
31 namespace Tizen { namespace Base
32 {
33 class ByteBuffer;
34 } }
35
36 namespace Tizen { namespace Net { namespace Bluetooth
37 {
38
39 /**
40   * @enum    _BluetoothConnectionEventType
41   * Type for specifying the type of _BluetoothConnectionEvent
42   */
43 enum _BluetoothConnectionEventType
44 {
45         _BT_CONNECTION_EVENT_CONNECTED,        /**< For notifying that the device is connected */
46         _BT_CONNECTION_EVENT_DISCONNECTED,     /**< For notifying that the device is disconnected */
47 };
48
49 /**
50  * @class   _BluetoothConnectionEventArg
51  * @brief   This class is used as an argument for callback methods of the _IBluetoothConnectionEventListener class.
52  *
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
56  */
57 class _BluetoothConnectionEventArg
58         : public Tizen::Base::Object
59         , public Tizen::Base::Runtime::IEventArg
60 {
61 public:
62
63         /**
64          * This is a class constructor for _BT_CONNECTION_EVENT_CONNECTED and _BT_CONNECTION_EVENT_DISCONNECTED event.
65          *
66          * @param[in]   address             the remote device address to be observed regarding connection
67          */
68         _BluetoothConnectionEventArg(_BluetoothConnectionEventType type, const Tizen::Base::ByteBuffer& address);
69
70         /**
71          * This is the class destructor.
72          */
73         ~_BluetoothConnectionEventArg(void);
74
75         /**
76          * Gets the type of this event.
77          *
78          * @return      The type of the event
79          */
80         _BluetoothConnectionEventType GetEventType(void) const;
81
82         /**
83          * Gets the remote device address.
84          *
85          * @return      the pointer of the remote device address which is a connected or disconnected device
86          */
87         const Tizen::Base::ByteBuffer* GetRemoteAddress(void) const;
88
89 private:
90         _BluetoothConnectionEventArg(void);
91         _BluetoothConnectionEventArg(const _BluetoothConnectionEventArg& eventArg);
92         _BluetoothConnectionEventArg& operator =(const _BluetoothConnectionEventArg& rValue);
93
94 private:
95         _BluetoothConnectionEventType __evtType;
96         Tizen::Base::ByteBuffer* __pRemoteAddress;
97
98 }; // _BluetoothConnectionEventArg
99
100 } } }
101 #endif // _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_