summaryrefslogtreecommitdiff
path: root/src/platform/Tizen/Bluetooth/BluetoothSocketManager.h
diff options
context:
space:
mode:
authorKibum Kim <kb0929.kim@samsung.com>2012-01-09 17:19:24 +0900
committerKibum Kim <kb0929.kim@samsung.com>2012-01-09 17:19:24 +0900
commitf7d6a7695dfc4f7c03732ece121fc9f4a8a5ad2f (patch)
tree9606a7459bfe89e6302860684303bcfaf0d47f34 /src/platform/Tizen/Bluetooth/BluetoothSocketManager.h
parenta3f30e3e61a72e5d9c0252d3edc359c2c12887a5 (diff)
downloadwrt-plugins-tizen-f7d6a7695dfc4f7c03732ece121fc9f4a8a5ad2f.tar.gz
wrt-plugins-tizen-f7d6a7695dfc4f7c03732ece121fc9f4a8a5ad2f.tar.bz2
wrt-plugins-tizen-f7d6a7695dfc4f7c03732ece121fc9f4a8a5ad2f.zip
Git Init
Diffstat (limited to 'src/platform/Tizen/Bluetooth/BluetoothSocketManager.h')
-rw-r--r--src/platform/Tizen/Bluetooth/BluetoothSocketManager.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/platform/Tizen/Bluetooth/BluetoothSocketManager.h b/src/platform/Tizen/Bluetooth/BluetoothSocketManager.h
new file mode 100644
index 0000000..343a623
--- /dev/null
+++ b/src/platform/Tizen/Bluetooth/BluetoothSocketManager.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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.
+ */
+
+#ifndef TIZENAPIS_PLATFROM_BLUETOOTH_SOCKET_MANAGER_H_
+#define TIZENAPIS_PLATFROM_BLUETOOTH_SOCKET_MANAGER_H_
+
+#include <dpl/shared_ptr.h>
+#include <Commons/ThreadPool.h>
+#include <API/Bluetooth/IBluetoothSocketManager.h>
+#include <API/Bluetooth/BluetoothFactory.h>
+#include <bluetooth.h>
+#include <dpl/mutex.h>
+#include <vector>
+
+using namespace TizenApis::Api;
+using namespace TizenApis::Api::Bluetooth;
+
+namespace TizenApis {
+namespace Platform {
+namespace Bluetooth {
+
+
+class BluetoothSocketManager : public Api::Bluetooth::IBluetoothSocketManager
+{
+ friend class TizenApis::Api::Bluetooth::BluetoothFactory;
+public:
+ virtual ~BluetoothSocketManager();
+ virtual std::string getUUID();
+ virtual unsigned int getProtocol();
+ virtual unsigned int getState();
+ virtual BluetoothDeviceData getPeer();
+ virtual int setSocketNotifier(EventBTSocketNotificationEmitterPtr emitter);
+ virtual int writeData(const char *data, const unsigned int length);
+ virtual EventBTReadDataType readData();
+ virtual int close();
+ virtual void setSocketData(BluetoothSocketData socketData);
+ virtual void setReadData(EventBTReadDataType readData);
+ void setDataReceivedEmit(bt_socket_received_data_s *data);
+ void connectionStateChangedEmit(int result, bt_socket_connection_state_e connection_state,
+ bt_socket_connection_s *connection);
+private:
+ EventBTReadDataType m_readData;
+ DPL::Mutex m_mtx;
+ BluetoothSocketData m_socketData;
+ EventBTSocketNotificationEmitterPtr m_EventBTSocketNotificationEmitterPtr;
+protected:
+ BluetoothSocketManager();
+
+};
+
+}
+}
+}
+
+#endif /* WRTPLUGINS_API_BluetoothSocketManager_H_ */
+