| Index: device/bluetooth/bluetooth_adapter_android.cc
|
| diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9ca54df3e5630dc6f6aefb51216186dfa826fd9c
|
| --- /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
|
|
|