Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: device/bluetooth/bluetooth_adapter_android.cc

Issue 1080593007: bluetooth: Stub out BluetoothAdapterAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "device/bluetooth/bluetooth_adapter_android.h"
6
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"
11
12 namespace device {
13
14 // static
15 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter(
16 const InitCallback& init_callback) {
17 return BluetoothAdapterAndroid::CreateAdapter();
18 }
19
20 // static
21 base::WeakPtr<BluetoothAdapter> BluetoothAdapterAndroid::CreateAdapter() {
22 BluetoothAdapterAndroid* adapter = new BluetoothAdapterAndroid();
23 return adapter->weak_ptr_factory_.GetWeakPtr();
24 }
25
26 std::string BluetoothAdapterAndroid::GetAddress() const {
27 return address_;
28 }
29
30 std::string BluetoothAdapterAndroid::GetName() const {
31 return name_;
32 }
33
34 void BluetoothAdapterAndroid::SetName(const std::string& name,
35 const base::Closure& callback,
36 const ErrorCallback& error_callback) {
37 NOTIMPLEMENTED();
38 }
39
40 bool BluetoothAdapterAndroid::IsInitialized() const {
41 NOTIMPLEMENTED();
42 return false;
43 }
44
45 bool BluetoothAdapterAndroid::IsPresent() const {
46 NOTIMPLEMENTED();
47 return false;
48 }
49
50 bool BluetoothAdapterAndroid::IsPowered() const {
51 NOTIMPLEMENTED();
52 return false;
53 }
54
55 void BluetoothAdapterAndroid::SetPowered(bool powered,
56 const base::Closure& callback,
57 const ErrorCallback& error_callback) {
58 NOTIMPLEMENTED();
59 }
60
61 bool BluetoothAdapterAndroid::IsDiscoverable() const {
62 NOTIMPLEMENTED();
63 return false;
64 }
65
66 void BluetoothAdapterAndroid::SetDiscoverable(
67 bool discoverable,
68 const base::Closure& callback,
69 const ErrorCallback& error_callback) {
70 NOTIMPLEMENTED();
71 }
72
73 bool BluetoothAdapterAndroid::IsDiscovering() const {
74 NOTIMPLEMENTED();
75 return false;
76 }
77
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");
85 }
86
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");
94 }
95
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);
101 }
102
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);
108 }
109
110 BluetoothAdapterAndroid::BluetoothAdapterAndroid() : weak_ptr_factory_(this) {
111 }
112
113 BluetoothAdapterAndroid::~BluetoothAdapterAndroid() {
114 }
115
116 void BluetoothAdapterAndroid::AddDiscoverySession(
117 BluetoothDiscoveryFilter* discovery_filter,
118 const base::Closure& callback,
119 const ErrorCallback& error_callback) {
120 }
121
122 void BluetoothAdapterAndroid::RemoveDiscoverySession(
123 BluetoothDiscoveryFilter* discovery_filter,
124 const base::Closure& callback,
125 const ErrorCallback& error_callback) {
126 }
127
128 void BluetoothAdapterAndroid::SetDiscoveryFilter(
129 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
130 const base::Closure& callback,
131 const ErrorCallback& error_callback) {
132 }
133
134 void BluetoothAdapterAndroid::RemovePairingDelegateInternal(
135 device::BluetoothDevice::PairingDelegate* pairing_delegate) {
136 }
137
138 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.h ('k') | device/bluetooth/bluetooth_adapter_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698