OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "components/proximity_auth/ble/proximity_auth_ble_system.h" | 5 #include "components/proximity_auth/ble/proximity_auth_ble_system.h" |
6 | 6 |
7 #include "base/bind.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "components/proximity_auth/connection.h" | |
11 #include "device/bluetooth/bluetooth_device.h" | |
12 | |
13 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
" | |
14 | 8 |
15 namespace proximity_auth { | 9 namespace proximity_auth { |
16 | 10 |
17 const std::string kSmartLockServiceUUID = | |
18 "b3b7e28e-a000-3e17-bd86-6e97b9e28c11"; | |
19 | |
20 void ConnectionCallback( | |
21 scoped_ptr<device::BluetoothGattConnection> connection) { | |
22 VLOG(1) << "Connection established"; | |
23 } | |
24 | |
25 ProximityAuthBleSystem::ProximityAuthBleSystem() { | 11 ProximityAuthBleSystem::ProximityAuthBleSystem() { |
26 VLOG(1) << "Starting Proximity Auth over Bluetooth Low Energy."; | 12 VLOG(1) << "Starting Proximity Auth over Bluetooth Low Energy."; |
27 BluetoothLowEnergyConnectionFinder* connection_finder = | |
28 new BluetoothLowEnergyConnectionFinder(kSmartLockServiceUUID); | |
29 connection_finder->Find(base::Bind(&ConnectionCallback)); | |
30 } | 13 } |
31 | 14 |
32 ProximityAuthBleSystem::~ProximityAuthBleSystem() { | 15 ProximityAuthBleSystem::~ProximityAuthBleSystem() { |
33 VLOG(1) << "Stopping Proximity over Bluetooth Low Energy."; | 16 VLOG(1) << "Stopping Proximity over Bluetooth Low Energy."; |
34 } | 17 } |
35 | 18 |
36 } // proximity_auth | 19 } // namespace proximity_auth |
OLD | NEW |