diff options
author | scheib <scheib@chromium.org> | 2015-04-29 14:31:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 21:32:37 +0000 |
commit | 35fbdd40277f2d4806abe3c90705f35d1e66bd8c (patch) | |
tree | 2bc4e5fb4ad6c929ec763e3499c0fb2350e9e247 /device/bluetooth/bluetooth_adapter_android.cc | |
parent | cb91176fc71741eebaf67b2f6af88f28cec5fadc (diff) | |
download | chromium_src-35fbdd40277f2d4806abe3c90705f35d1e66bd8c.zip chromium_src-35fbdd40277f2d4806abe3c90705f35d1e66bd8c.tar.gz chromium_src-35fbdd40277f2d4806abe3c90705f35d1e66bd8c.tar.bz2 |
bluetooth: Stub out BluetoothAdapterAndroid
BUG=471536
Review URL: https://codereview.chromium.org/1080593007
Cr-Commit-Position: refs/heads/master@{#327562}
Diffstat (limited to 'device/bluetooth/bluetooth_adapter_android.cc')
-rw-r--r-- | device/bluetooth/bluetooth_adapter_android.cc | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc new file mode 100644 index 0000000..9ca54df --- /dev/null +++ b/device/bluetooth/bluetooth_adapter_android.cc @@ -0,0 +1,138 @@ +// Copyright 2015 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_adapter_android.h" + +#include "base/sequenced_task_runner.h" +#include "base/single_thread_task_runner.h" +#include "base/thread_task_runner_handle.h" +#include "device/bluetooth/bluetooth_advertisement.h" + +namespace device { + +// static +base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter( + const InitCallback& init_callback) { + return BluetoothAdapterAndroid::CreateAdapter(); +} + +// static +base::WeakPtr<BluetoothAdapter> BluetoothAdapterAndroid::CreateAdapter() { + BluetoothAdapterAndroid* adapter = new BluetoothAdapterAndroid(); + return adapter->weak_ptr_factory_.GetWeakPtr(); +} + +std::string BluetoothAdapterAndroid::GetAddress() const { + return address_; +} + +std::string BluetoothAdapterAndroid::GetName() const { + return name_; +} + +void BluetoothAdapterAndroid::SetName(const std::string& name, + const base::Closure& callback, + const ErrorCallback& error_callback) { + NOTIMPLEMENTED(); +} + +bool BluetoothAdapterAndroid::IsInitialized() const { + NOTIMPLEMENTED(); + return false; +} + +bool BluetoothAdapterAndroid::IsPresent() const { + NOTIMPLEMENTED(); + return false; +} + +bool BluetoothAdapterAndroid::IsPowered() const { + NOTIMPLEMENTED(); + return false; +} + +void BluetoothAdapterAndroid::SetPowered(bool powered, + const base::Closure& callback, + const ErrorCallback& error_callback) { + NOTIMPLEMENTED(); +} + +bool BluetoothAdapterAndroid::IsDiscoverable() const { + NOTIMPLEMENTED(); + return false; +} + +void BluetoothAdapterAndroid::SetDiscoverable( + bool discoverable, + const base::Closure& callback, + const ErrorCallback& error_callback) { + NOTIMPLEMENTED(); +} + +bool BluetoothAdapterAndroid::IsDiscovering() const { + NOTIMPLEMENTED(); + return false; +} + +void BluetoothAdapterAndroid::CreateRfcommService( + const BluetoothUUID& uuid, + const ServiceOptions& options, + const CreateServiceCallback& callback, + const CreateServiceErrorCallback& error_callback) { + NOTIMPLEMENTED(); + error_callback.Run("Not Implemented"); +} + +void BluetoothAdapterAndroid::CreateL2capService( + const BluetoothUUID& uuid, + const ServiceOptions& options, + const CreateServiceCallback& callback, + const CreateServiceErrorCallback& error_callback) { + NOTIMPLEMENTED(); + error_callback.Run("Not Implemented"); +} + +void BluetoothAdapterAndroid::RegisterAudioSink( + const BluetoothAudioSink::Options& options, + const AcquiredCallback& callback, + const BluetoothAudioSink::ErrorCallback& error_callback) { + error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM); +} + +void BluetoothAdapterAndroid::RegisterAdvertisement( + scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, + const CreateAdvertisementCallback& callback, + const CreateAdvertisementErrorCallback& error_callback) { + error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM); +} + +BluetoothAdapterAndroid::BluetoothAdapterAndroid() : weak_ptr_factory_(this) { +} + +BluetoothAdapterAndroid::~BluetoothAdapterAndroid() { +} + +void BluetoothAdapterAndroid::AddDiscoverySession( + BluetoothDiscoveryFilter* discovery_filter, + const base::Closure& callback, + const ErrorCallback& error_callback) { +} + +void BluetoothAdapterAndroid::RemoveDiscoverySession( + BluetoothDiscoveryFilter* discovery_filter, + const base::Closure& callback, + const ErrorCallback& error_callback) { +} + +void BluetoothAdapterAndroid::SetDiscoveryFilter( + scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, + const base::Closure& callback, + const ErrorCallback& error_callback) { +} + +void BluetoothAdapterAndroid::RemovePairingDelegateInternal( + device::BluetoothDevice::PairingDelegate* pairing_delegate) { +} + +} // namespace device |