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_BLUETOOTH_ADVERTISEMENT_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 19 matching lines...) Expand all Loading... | |
30 // advertisements. | 30 // advertisements. |
31 enum ErrorCode { | 31 enum ErrorCode { |
32 ERROR_UNSUPPORTED_PLATFORM, // Bluetooth advertisement not supported on | 32 ERROR_UNSUPPORTED_PLATFORM, // Bluetooth advertisement not supported on |
33 // current platform. | 33 // current platform. |
34 ERROR_ADVERTISEMENT_ALREADY_EXISTS, // An advertisement is already | 34 ERROR_ADVERTISEMENT_ALREADY_EXISTS, // An advertisement is already |
35 // registered. | 35 // registered. |
36 ERROR_ADVERTISEMENT_DOES_NOT_EXIST, // Unregistering an advertisement which | 36 ERROR_ADVERTISEMENT_DOES_NOT_EXIST, // Unregistering an advertisement which |
37 // is not registered. | 37 // is not registered. |
38 ERROR_ADVERTISEMENT_INVALID_LENGTH, // Advertisement is not of a valid | 38 ERROR_ADVERTISEMENT_INVALID_LENGTH, // Advertisement is not of a valid |
39 // length. | 39 // length. |
40 ERROR_INVALID_ADVERTISEMENT_INTERVAL, // Advertisement interval specified | |
scheib
2016/09/21 19:57:00
This is forever ChromeOS only, right? Wrap in #ifd
Rahul Chaturvedi
2016/09/21 20:09:22
Done.
| |
41 // is out of valid range. | |
40 INVALID_ADVERTISEMENT_ERROR_CODE | 42 INVALID_ADVERTISEMENT_ERROR_CODE |
41 }; | 43 }; |
42 | 44 |
43 // Type of advertisement. | 45 // Type of advertisement. |
44 enum AdvertisementType { | 46 enum AdvertisementType { |
45 // This advertises with the type set to ADV_NONCONN_IND, which indicates | 47 // This advertises with the type set to ADV_NONCONN_IND, which indicates |
46 // to receivers that our device is not connectable. | 48 // to receivers that our device is not connectable. |
47 ADVERTISEMENT_TYPE_BROADCAST, | 49 ADVERTISEMENT_TYPE_BROADCAST, |
48 // This advertises with the type set to ADV_IND or ADV_SCAN_IND, which | 50 // This advertises with the type set to ADV_IND or ADV_SCAN_IND, which |
49 // indicates to receivers that our device is connectable. | 51 // indicates to receivers that our device is connectable. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 // |observers_| are expected to outlive a BluetoothAdvertisement object. | 141 // |observers_| are expected to outlive a BluetoothAdvertisement object. |
140 base::ObserverList<BluetoothAdvertisement::Observer> observers_; | 142 base::ObserverList<BluetoothAdvertisement::Observer> observers_; |
141 | 143 |
142 private: | 144 private: |
143 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisement); | 145 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisement); |
144 }; | 146 }; |
145 | 147 |
146 } // namespace device | 148 } // namespace device |
147 | 149 |
148 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_ | 150 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_ |
OLD | NEW |