summaryrefslogtreecommitdiff
path: root/src/FNetBt_BluetoothConnectionEventArg.h
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:54:36 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:54:36 +0900
commit005198d696da404107874d3bcaed9204666ed790 (patch)
treea782fe818f8d5883ab2a25b35605abfd5ed881d7 /src/FNetBt_BluetoothConnectionEventArg.h
parent212ceac58e2c8455482eed7e46ae688904059216 (diff)
downloadbluetooth-tizen_2.0.tar.gz
bluetooth-tizen_2.0.tar.bz2
bluetooth-tizen_2.0.zip
Diffstat (limited to 'src/FNetBt_BluetoothConnectionEventArg.h')
-rw-r--r--src/FNetBt_BluetoothConnectionEventArg.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/FNetBt_BluetoothConnectionEventArg.h b/src/FNetBt_BluetoothConnectionEventArg.h
new file mode 100644
index 0000000..154d88d
--- /dev/null
+++ b/src/FNetBt_BluetoothConnectionEventArg.h
@@ -0,0 +1,101 @@
+//
+// 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_BluetoothConnectionEventArg.h
+ * @brief This is the header file for the _BluetoothConnectionEventArg class.
+ *
+ * This header file contains the declarations of the _BluetoothConnectionEventArg class which includes information to be
+ * passed to the event listeners
+ */
+#ifndef _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_
+#define _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_
+
+#include <FBaseObject.h>
+#include <FOspConfig.h>
+#include <FBaseRtIEventArg.h>
+
+namespace Tizen { namespace Base
+{
+class ByteBuffer;
+} }
+
+namespace Tizen { namespace Net { namespace Bluetooth
+{
+
+/**
+ * @enum _BluetoothConnectionEventType
+ * Type for specifying the type of _BluetoothConnectionEvent
+ */
+enum _BluetoothConnectionEventType
+{
+ _BT_CONNECTION_EVENT_CONNECTED, /**< For notifying that the device is connected */
+ _BT_CONNECTION_EVENT_DISCONNECTED, /**< For notifying that the device is disconnected */
+};
+
+/**
+ * @class _BluetoothConnectionEventArg
+ * @brief This class is used as an argument for callback methods of the _IBluetoothConnectionEventListener class.
+ *
+ * When a _BluetoothConnectionEvent occurs, the _BluetoothConnectionEvent finds a _IBluetoothConnectionEventListener instance
+ * which is registered for the _BluetoothConnectionEvent and calls an appropriate method of the listener.
+ * @see _IBluetoothConnectionEventListener
+ */
+class _BluetoothConnectionEventArg
+ : public Tizen::Base::Object
+ , public Tizen::Base::Runtime::IEventArg
+{
+public:
+
+ /**
+ * This is a class constructor for _BT_CONNECTION_EVENT_CONNECTED and _BT_CONNECTION_EVENT_DISCONNECTED event.
+ *
+ * @param[in] address the remote device address to be observed regarding connection
+ */
+ _BluetoothConnectionEventArg(_BluetoothConnectionEventType type, const Tizen::Base::ByteBuffer& address);
+
+ /**
+ * This is the class destructor.
+ */
+ ~_BluetoothConnectionEventArg(void);
+
+ /**
+ * Gets the type of this event.
+ *
+ * @return The type of the event
+ */
+ _BluetoothConnectionEventType GetEventType(void) const;
+
+ /**
+ * Gets the remote device address.
+ *
+ * @return the pointer of the remote device address which is a connected or disconnected device
+ */
+ const Tizen::Base::ByteBuffer* GetRemoteAddress(void) const;
+
+private:
+ _BluetoothConnectionEventArg(void);
+ _BluetoothConnectionEventArg(const _BluetoothConnectionEventArg& eventArg);
+ _BluetoothConnectionEventArg& operator =(const _BluetoothConnectionEventArg& rValue);
+
+private:
+ _BluetoothConnectionEventType __evtType;
+ Tizen::Base::ByteBuffer* __pRemoteAddress;
+
+}; // _BluetoothConnectionEventArg
+
+} } }
+#endif // _FNET_BT_INTERNAL_BLUETOOTH_CONNECTION_EVENT_ARG_H_