summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authoryoungki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 00:52:00 +0000
committeryoungki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 00:52:00 +0000
commitc579317dce3a89cf83f355b7082bac80025cfa4e (patch)
tree9aeca0bcd7c7a48875b401d8d45833ed9b968b93 /device
parent8c4b4db2734de7836eceeaa8e8d707dcef9c643c (diff)
downloadchromium_src-c579317dce3a89cf83f355b7082bac80025cfa4e.zip
chromium_src-c579317dce3a89cf83f355b7082bac80025cfa4e.tar.gz
chromium_src-c579317dce3a89cf83f355b7082bac80025cfa4e.tar.bz2
Added BluetoothDeviceMac (empty implementation)
I added NOTIMPLEMENTED() to the methods which won't be supported in BluetoothDeviceMac. BUG=135472 Review URL: https://chromiumcodereview.appspot.com/12660013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188894 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/bluetooth_device_mac.h62
-rw-r--r--device/bluetooth/bluetooth_device_mac.mm110
-rw-r--r--device/device.gyp2
3 files changed, 174 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h
new file mode 100644
index 0000000..105de1c
--- /dev/null
+++ b/device/bluetooth/bluetooth_device_mac.h
@@ -0,0 +1,62 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
+#define DEVICE_BLUETOOTH_BlUETOOTH_DEVICE_MAC_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "device/bluetooth/bluetooth_device.h"
+
+namespace device {
+
+class BluetoothDeviceMac : public BluetoothDevice {
+ public:
+ BluetoothDeviceMac();
+ virtual ~BluetoothDeviceMac();
+
+ // BluetoothDevice override
+ virtual bool IsPaired() const OVERRIDE;
+ virtual const ServiceList& GetServices() const OVERRIDE;
+ virtual void GetServiceRecords(
+ const ServiceRecordsCallback& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
+ virtual void ProvidesServiceWithName(
+ const std::string& name,
+ const ProvidesServiceCallback& callback) OVERRIDE;
+ virtual bool ExpectingPinCode() const OVERRIDE;
+ virtual bool ExpectingPasskey() const OVERRIDE;
+ virtual bool ExpectingConfirmation() const OVERRIDE;
+ virtual void Connect(
+ PairingDelegate* pairing_delegate,
+ const base::Closure& callback,
+ const ConnectErrorCallback& error_callback) OVERRIDE;
+ virtual void SetPinCode(const std::string& pincode) OVERRIDE;
+ virtual void SetPasskey(uint32 passkey) OVERRIDE;
+ virtual void ConfirmPairing() OVERRIDE;
+ virtual void RejectPairing() OVERRIDE;
+ virtual void CancelPairing() OVERRIDE;
+ virtual void Disconnect(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
+ virtual void Forget(const ErrorCallback& error_callback) OVERRIDE;
+ virtual void ConnectToService(
+ const std::string& service_uuid,
+ const SocketCallback& callback) OVERRIDE;
+ virtual void SetOutOfBandPairingData(
+ const BluetoothOutOfBandPairingData& data,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
+ virtual void ClearOutOfBandPairingData(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac);
+};
+
+} // namespace device
+
+#endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
diff --git a/device/bluetooth/bluetooth_device_mac.mm b/device/bluetooth/bluetooth_device_mac.mm
new file mode 100644
index 0000000..d0a6762
--- /dev/null
+++ b/device/bluetooth/bluetooth_device_mac.mm
@@ -0,0 +1,110 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "device/bluetooth/bluetooth_device_mac.h"
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "device/bluetooth/bluetooth_out_of_band_pairing_data.h"
+#include "device/bluetooth/bluetooth_service_record_mac.h"
+
+namespace device {
+
+BluetoothDeviceMac::BluetoothDeviceMac()
+ : BluetoothDevice() {
+}
+
+BluetoothDeviceMac::~BluetoothDeviceMac() {
+}
+
+bool BluetoothDeviceMac::IsPaired() const {
+ return false;
+}
+
+const BluetoothDevice::ServiceList& BluetoothDeviceMac::GetServices() const {
+ return service_uuids_;
+}
+
+void BluetoothDeviceMac::GetServiceRecords(
+ const ServiceRecordsCallback& callback,
+ const ErrorCallback& error_callback) {
+}
+
+void BluetoothDeviceMac::ProvidesServiceWithName(
+ const std::string& name,
+ const ProvidesServiceCallback& callback) {
+}
+
+bool BluetoothDeviceMac::ExpectingPinCode() const {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool BluetoothDeviceMac::ExpectingPasskey() const {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool BluetoothDeviceMac::ExpectingConfirmation() const {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void BluetoothDeviceMac::Connect(
+ PairingDelegate* pairing_delegate,
+ const base::Closure& callback,
+ const ConnectErrorCallback& error_callback) {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::SetPinCode(const std::string& pincode) {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::SetPasskey(uint32 passkey) {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::ConfirmPairing() {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::RejectPairing() {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::CancelPairing() {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::Disconnect(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::Forget(const ErrorCallback& error_callback) {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::ConnectToService(
+ const std::string& service_uuid,
+ const SocketCallback& callback) {
+}
+
+void BluetoothDeviceMac::SetOutOfBandPairingData(
+ const BluetoothOutOfBandPairingData& data,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) {
+ NOTIMPLEMENTED();
+}
+
+void BluetoothDeviceMac::ClearOutOfBandPairingData(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace device
diff --git a/device/device.gyp b/device/device.gyp
index ff6454d..8e96979 100644
--- a/device/device.gyp
+++ b/device/device.gyp
@@ -35,6 +35,8 @@
'bluetooth/bluetooth_device.h',
'bluetooth/bluetooth_device_chromeos.cc',
'bluetooth/bluetooth_device_chromeos.h',
+ 'bluetooth/bluetooth_device_mac.h',
+ 'bluetooth/bluetooth_device_mac.mm',
'bluetooth/bluetooth_device_win.cc',
'bluetooth/bluetooth_device_win.h',
'bluetooth/bluetooth_init_win.cc',