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 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_ |
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 std::unique_ptr<device::BluetoothAdvertisement::Data> data, | 31 std::unique_ptr<device::BluetoothAdvertisement::Data> data, |
32 scoped_refptr<BluetoothAdapterBlueZ> adapter); | 32 scoped_refptr<BluetoothAdapterBlueZ> adapter); |
33 | 33 |
34 // BluetoothAdvertisement overrides: | 34 // BluetoothAdvertisement overrides: |
35 void Unregister(const SuccessCallback& success_callback, | 35 void Unregister(const SuccessCallback& success_callback, |
36 const ErrorCallback& error_callback) override; | 36 const ErrorCallback& error_callback) override; |
37 | 37 |
38 // bluez::BluetoothLEAdvertisementServiceProvider::Delegate overrides: | 38 // bluez::BluetoothLEAdvertisementServiceProvider::Delegate overrides: |
39 void Released() override; | 39 void Released() override; |
40 | 40 |
41 void Register( | 41 void Register(const base::Closure& success_callback, |
42 const base::Closure& success_callback, | 42 const device::BluetoothAdapter::AdvertisementErrorCallback& |
43 const device::BluetoothAdapter::CreateAdvertisementErrorCallback& | 43 error_callback); |
44 error_callback); | |
45 | 44 |
46 // Used from tests to be able to trigger events on the fake advertisement | 45 // Used from tests to be able to trigger events on the fake advertisement |
47 // provider. | 46 // provider. |
48 bluez::BluetoothLEAdvertisementServiceProvider* provider() { | 47 bluez::BluetoothLEAdvertisementServiceProvider* provider() { |
49 return provider_.get(); | 48 return provider_.get(); |
50 } | 49 } |
51 | 50 |
52 private: | 51 private: |
53 ~BluetoothAdvertisementBlueZ() override; | 52 ~BluetoothAdvertisementBlueZ() override; |
54 | 53 |
55 // Adapter this advertisement is advertising on. | 54 // Adapter this advertisement is advertising on. |
56 scoped_refptr<BluetoothAdapterBlueZ> adapter_; | 55 scoped_refptr<BluetoothAdapterBlueZ> adapter_; |
57 std::unique_ptr<bluez::BluetoothLEAdvertisementServiceProvider> provider_; | 56 std::unique_ptr<bluez::BluetoothLEAdvertisementServiceProvider> provider_; |
58 | 57 |
59 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementBlueZ); | 58 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementBlueZ); |
60 }; | 59 }; |
61 | 60 |
62 } // namespace bluez | 61 } // namespace bluez |
63 | 62 |
64 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_ | 63 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_ |
OLD | NEW |