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

Side by Side Diff: components/proximity_auth/bluetooth_low_energy_advertiser.h

Issue 2900253005: BLE advertiser
Patch Set: Created 3 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 2017 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 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_ADVERTISER_H
6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_ADVERTISER_H
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "device/bluetooth/bluetooth_adapter.h"
14 #include "device/bluetooth/bluetooth_advertisement.h"
15
16 namespace proximity_auth {
17
18 class BluetoothLowEnergyAdvertiser {
19 public:
20 BluetoothLowEnergyAdvertiser();
21 ~BluetoothLowEnergyAdvertiser();
22
23 void Advertise();
24
25 private:
26 void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter);
27 void OnAdvertisementRegistered(
28 scoped_refptr<device::BluetoothAdvertisement> advertisement);
29 void OnAdvertisementError(
30 device::BluetoothAdvertisement::ErrorCode error_code);
31
32 // The Bluetooth adapter over which this connection is made. Non-null iff
33 // |this| connection is registered as an observer of the |adapter_|.
34 scoped_refptr<device::BluetoothAdapter> adapter_;
35
36 scoped_refptr<device::BluetoothAdvertisement> advertisement_;
37
38 base::WeakPtrFactory<BluetoothLowEnergyAdvertiser> weak_ptr_factory_;
39
40 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyAdvertiser);
41 };
42
43 } // namespace proximity_auth
44
45 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_ADVERTISER_H
OLDNEW
« no previous file with comments | « components/proximity_auth/BUILD.gn ('k') | components/proximity_auth/bluetooth_low_energy_advertiser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698