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

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

Issue 735893002: Add GetConnectionInfo function for BluetoothDevice, replacing the existing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors on other platforms Created 5 years, 11 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_device_win.h ('k') | device/bluetooth/test/mock_bluetooth_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_device_win.h" 5 #include "device/bluetooth/bluetooth_device_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 uint16 BluetoothDeviceWin::GetProductID() const { 163 uint16 BluetoothDeviceWin::GetProductID() const {
164 return 0; 164 return 0;
165 } 165 }
166 166
167 uint16 BluetoothDeviceWin::GetDeviceID() const { 167 uint16 BluetoothDeviceWin::GetDeviceID() const {
168 return 0; 168 return 0;
169 } 169 }
170 170
171 int BluetoothDeviceWin::GetRSSI() const {
172 NOTIMPLEMENTED();
173 return kUnknownPower;
174 }
175
176 int BluetoothDeviceWin::GetCurrentHostTransmitPower() const {
177 NOTIMPLEMENTED();
178 return kUnknownPower;
179 }
180
181 int BluetoothDeviceWin::GetMaximumHostTransmitPower() const {
182 NOTIMPLEMENTED();
183 return kUnknownPower;
184 }
185
186 bool BluetoothDeviceWin::IsPaired() const { 171 bool BluetoothDeviceWin::IsPaired() const {
187 return paired_; 172 return paired_;
188 } 173 }
189 174
190 bool BluetoothDeviceWin::IsConnected() const { 175 bool BluetoothDeviceWin::IsConnected() const {
191 return connected_; 176 return connected_;
192 } 177 }
193 178
194 bool BluetoothDeviceWin::IsConnectable() const { 179 bool BluetoothDeviceWin::IsConnectable() const {
195 return false; 180 return false;
(...skipping 15 matching lines...) Expand all
211 bool BluetoothDeviceWin::ExpectingPasskey() const { 196 bool BluetoothDeviceWin::ExpectingPasskey() const {
212 NOTIMPLEMENTED(); 197 NOTIMPLEMENTED();
213 return false; 198 return false;
214 } 199 }
215 200
216 bool BluetoothDeviceWin::ExpectingConfirmation() const { 201 bool BluetoothDeviceWin::ExpectingConfirmation() const {
217 NOTIMPLEMENTED(); 202 NOTIMPLEMENTED();
218 return false; 203 return false;
219 } 204 }
220 205
206 void BluetoothDeviceWin::GetConnectionInfo(
207 const ConnectionInfoCallback& callback) {
208 NOTIMPLEMENTED();
209 callback.Run(ConnectionInfo());
210 }
211
221 void BluetoothDeviceWin::Connect( 212 void BluetoothDeviceWin::Connect(
222 PairingDelegate* pairing_delegate, 213 PairingDelegate* pairing_delegate,
223 const base::Closure& callback, 214 const base::Closure& callback,
224 const ConnectErrorCallback& error_callback) { 215 const ConnectErrorCallback& error_callback) {
225 NOTIMPLEMENTED(); 216 NOTIMPLEMENTED();
226 } 217 }
227 218
228 void BluetoothDeviceWin::SetPinCode(const std::string& pincode) { 219 void BluetoothDeviceWin::SetPinCode(const std::string& pincode) {
229 NOTIMPLEMENTED(); 220 NOTIMPLEMENTED();
230 } 221 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 error_callback.Run(kApiUnavailable); 263 error_callback.Run(kApiUnavailable);
273 } 264 }
274 265
275 void BluetoothDeviceWin::CreateGattConnection( 266 void BluetoothDeviceWin::CreateGattConnection(
276 const GattConnectionCallback& callback, 267 const GattConnectionCallback& callback,
277 const ConnectErrorCallback& error_callback) { 268 const ConnectErrorCallback& error_callback) {
278 // TODO(armansito): Implement. 269 // TODO(armansito): Implement.
279 error_callback.Run(ERROR_UNSUPPORTED_DEVICE); 270 error_callback.Run(ERROR_UNSUPPORTED_DEVICE);
280 } 271 }
281 272
282 void BluetoothDeviceWin::StartConnectionMonitor(
283 const base::Closure& callback,
284 const ErrorCallback& error_callback) {
285 NOTIMPLEMENTED();
286 }
287
288 const BluetoothServiceRecordWin* BluetoothDeviceWin::GetServiceRecord( 273 const BluetoothServiceRecordWin* BluetoothDeviceWin::GetServiceRecord(
289 const device::BluetoothUUID& uuid) const { 274 const device::BluetoothUUID& uuid) const {
290 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); 275 for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
291 iter != service_record_list_.end(); 276 iter != service_record_list_.end();
292 ++iter) { 277 ++iter) {
293 if ((*iter)->uuid() == uuid) 278 if ((*iter)->uuid() == uuid)
294 return *iter; 279 return *iter;
295 } 280 }
296 return NULL; 281 return NULL;
297 } 282 }
298 283
299 } // namespace device 284 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win.h ('k') | device/bluetooth/test/mock_bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698