Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / device / bluetooth / bluetooth_adapter_android.cc
blob9ca54df3e5630dc6f6aefb51216186dfa826fd9c
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "device/bluetooth/bluetooth_adapter_android.h"
7 #include "base/sequenced_task_runner.h"
8 #include "base/single_thread_task_runner.h"
9 #include "base/thread_task_runner_handle.h"
10 #include "device/bluetooth/bluetooth_advertisement.h"
12 namespace device {
14 // static
15 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter(
16 const InitCallback& init_callback) {
17 return BluetoothAdapterAndroid::CreateAdapter();
20 // static
21 base::WeakPtr<BluetoothAdapter> BluetoothAdapterAndroid::CreateAdapter() {
22 BluetoothAdapterAndroid* adapter = new BluetoothAdapterAndroid();
23 return adapter->weak_ptr_factory_.GetWeakPtr();
26 std::string BluetoothAdapterAndroid::GetAddress() const {
27 return address_;
30 std::string BluetoothAdapterAndroid::GetName() const {
31 return name_;
34 void BluetoothAdapterAndroid::SetName(const std::string& name,
35 const base::Closure& callback,
36 const ErrorCallback& error_callback) {
37 NOTIMPLEMENTED();
40 bool BluetoothAdapterAndroid::IsInitialized() const {
41 NOTIMPLEMENTED();
42 return false;
45 bool BluetoothAdapterAndroid::IsPresent() const {
46 NOTIMPLEMENTED();
47 return false;
50 bool BluetoothAdapterAndroid::IsPowered() const {
51 NOTIMPLEMENTED();
52 return false;
55 void BluetoothAdapterAndroid::SetPowered(bool powered,
56 const base::Closure& callback,
57 const ErrorCallback& error_callback) {
58 NOTIMPLEMENTED();
61 bool BluetoothAdapterAndroid::IsDiscoverable() const {
62 NOTIMPLEMENTED();
63 return false;
66 void BluetoothAdapterAndroid::SetDiscoverable(
67 bool discoverable,
68 const base::Closure& callback,
69 const ErrorCallback& error_callback) {
70 NOTIMPLEMENTED();
73 bool BluetoothAdapterAndroid::IsDiscovering() const {
74 NOTIMPLEMENTED();
75 return false;
78 void BluetoothAdapterAndroid::CreateRfcommService(
79 const BluetoothUUID& uuid,
80 const ServiceOptions& options,
81 const CreateServiceCallback& callback,
82 const CreateServiceErrorCallback& error_callback) {
83 NOTIMPLEMENTED();
84 error_callback.Run("Not Implemented");
87 void BluetoothAdapterAndroid::CreateL2capService(
88 const BluetoothUUID& uuid,
89 const ServiceOptions& options,
90 const CreateServiceCallback& callback,
91 const CreateServiceErrorCallback& error_callback) {
92 NOTIMPLEMENTED();
93 error_callback.Run("Not Implemented");
96 void BluetoothAdapterAndroid::RegisterAudioSink(
97 const BluetoothAudioSink::Options& options,
98 const AcquiredCallback& callback,
99 const BluetoothAudioSink::ErrorCallback& error_callback) {
100 error_callback.Run(BluetoothAudioSink::ERROR_UNSUPPORTED_PLATFORM);
103 void BluetoothAdapterAndroid::RegisterAdvertisement(
104 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data,
105 const CreateAdvertisementCallback& callback,
106 const CreateAdvertisementErrorCallback& error_callback) {
107 error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM);
110 BluetoothAdapterAndroid::BluetoothAdapterAndroid() : weak_ptr_factory_(this) {
113 BluetoothAdapterAndroid::~BluetoothAdapterAndroid() {
116 void BluetoothAdapterAndroid::AddDiscoverySession(
117 BluetoothDiscoveryFilter* discovery_filter,
118 const base::Closure& callback,
119 const ErrorCallback& error_callback) {
122 void BluetoothAdapterAndroid::RemoveDiscoverySession(
123 BluetoothDiscoveryFilter* discovery_filter,
124 const base::Closure& callback,
125 const ErrorCallback& error_callback) {
128 void BluetoothAdapterAndroid::SetDiscoveryFilter(
129 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
130 const base::Closure& callback,
131 const ErrorCallback& error_callback) {
134 void BluetoothAdapterAndroid::RemovePairingDelegateInternal(
135 device::BluetoothDevice::PairingDelegate* pairing_delegate) {
138 } // namespace device