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

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

Issue 1872943002: Add support for local services/characteristics/descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_bluez.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_remote_gatt_service_win.h" 5 #include "device/bluetooth/bluetooth_remote_gatt_service_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 bool BluetoothRemoteGattServiceWin::AddIncludedService( 111 bool BluetoothRemoteGattServiceWin::AddIncludedService(
112 device::BluetoothGattService* service) { 112 device::BluetoothGattService* service) {
113 NOTIMPLEMENTED(); 113 NOTIMPLEMENTED();
114 return false; 114 return false;
115 } 115 }
116 116
117 void BluetoothRemoteGattServiceWin::Register( 117 void BluetoothRemoteGattServiceWin::Register(
118 const base::Closure& callback, 118 const base::Closure& callback,
119 const ErrorCallback& error_callback) { 119 const ErrorCallback& error_callback) {
120 NOTIMPLEMENTED(); 120 NOTIMPLEMENTED();
121 error_callback.Run(); 121 error_callback.Run(GATT_ERROR_NOT_SUPPORTED);
122 } 122 }
123 123
124 void BluetoothRemoteGattServiceWin::Unregister( 124 void BluetoothRemoteGattServiceWin::Unregister(
125 const base::Closure& callback, 125 const base::Closure& callback,
126 const ErrorCallback& error_callback) { 126 const ErrorCallback& error_callback) {
127 NOTIMPLEMENTED(); 127 NOTIMPLEMENTED();
128 error_callback.Run(); 128 error_callback.Run(GATT_ERROR_NOT_SUPPORTED);
129 } 129 }
130 130
131 void BluetoothRemoteGattServiceWin::GattCharacteristicDiscoveryComplete( 131 void BluetoothRemoteGattServiceWin::GattCharacteristicDiscoveryComplete(
132 BluetoothRemoteGattCharacteristicWin* characteristic) { 132 BluetoothRemoteGattCharacteristicWin* characteristic) {
133 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); 133 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
134 DCHECK(included_characteristics_.find(characteristic->GetIdentifier()) != 134 DCHECK(included_characteristics_.find(characteristic->GetIdentifier()) !=
135 included_characteristics_.end()); 135 included_characteristics_.end());
136 136
137 discovery_completed_included_charateristics_.insert( 137 discovery_completed_included_charateristics_.insert(
138 characteristic->GetIdentifier()); 138 characteristic->GetIdentifier());
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 void BluetoothRemoteGattServiceWin::ClearIncludedCharacteristics() { 257 void BluetoothRemoteGattServiceWin::ClearIncludedCharacteristics() {
258 discovery_completed_included_charateristics_.clear(); 258 discovery_completed_included_charateristics_.clear();
259 // Explicitly reset to null to ensure that calling GetCharacteristic() on the 259 // Explicitly reset to null to ensure that calling GetCharacteristic() on the
260 // removed characteristic in GattDescriptorRemoved() returns null. 260 // removed characteristic in GattDescriptorRemoved() returns null.
261 for (auto& entry : included_characteristics_) 261 for (auto& entry : included_characteristics_)
262 entry.second.reset(); 262 entry.second.reset();
263 included_characteristics_.clear(); 263 included_characteristics_.clear();
264 } 264 }
265 265
266 } // namespace device. 266 } // namespace device.
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_bluez.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698