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

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: Created 6 years, 1 month 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
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 GetConnectionInfo(const ConnectionInfoCallback& callback) {
207 NOTIMPLEMENTED();
208 callback.Run(ConnectionInfo());
209 }
210
221 void BluetoothDeviceWin::Connect( 211 void BluetoothDeviceWin::Connect(
222 PairingDelegate* pairing_delegate, 212 PairingDelegate* pairing_delegate,
223 const base::Closure& callback, 213 const base::Closure& callback,
224 const ConnectErrorCallback& error_callback) { 214 const ConnectErrorCallback& error_callback) {
225 NOTIMPLEMENTED(); 215 NOTIMPLEMENTED();
226 } 216 }
227 217
228 void BluetoothDeviceWin::SetPinCode(const std::string& pincode) { 218 void BluetoothDeviceWin::SetPinCode(const std::string& pincode) {
229 NOTIMPLEMENTED(); 219 NOTIMPLEMENTED();
230 } 220 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 error_callback.Run(kApiUnavailable); 262 error_callback.Run(kApiUnavailable);
273 } 263 }
274 264
275 void BluetoothDeviceWin::CreateGattConnection( 265 void BluetoothDeviceWin::CreateGattConnection(
276 const GattConnectionCallback& callback, 266 const GattConnectionCallback& callback,
277 const ConnectErrorCallback& error_callback) { 267 const ConnectErrorCallback& error_callback) {
278 // TODO(armansito): Implement. 268 // TODO(armansito): Implement.
279 error_callback.Run(ERROR_UNSUPPORTED_DEVICE); 269 error_callback.Run(ERROR_UNSUPPORTED_DEVICE);
280 } 270 }
281 271
282 void BluetoothDeviceWin::StartConnectionMonitor(
283 const base::Closure& callback,
284 const ErrorCallback& error_callback) {
285 NOTIMPLEMENTED();
286 }
287
288 const BluetoothServiceRecordWin* BluetoothDeviceWin::GetServiceRecord( 272 const BluetoothServiceRecordWin* BluetoothDeviceWin::GetServiceRecord(
289 const device::BluetoothUUID& uuid) const { 273 const device::BluetoothUUID& uuid) const {
290 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); 274 for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
291 iter != service_record_list_.end(); 275 iter != service_record_list_.end();
292 ++iter) { 276 ++iter) {
293 if ((*iter)->uuid() == uuid) 277 if ((*iter)->uuid() == uuid)
294 return *iter; 278 return *iter;
295 } 279 }
296 return NULL; 280 return NULL;
297 } 281 }
298 282
299 } // namespace device 283 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698