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

Side by Side Diff: device/bluetooth/bluetooth_advertisement.h

Issue 2861533004: Implement chrome.bluetoothLowEnergy.resetAdvertising(). (Closed)
Patch Set: Implement chrome.bluetoothLowEnergy.resetAllAdvertisements(). Created 3 years, 5 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
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 22 matching lines...) Expand all
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 #if defined(OS_CHROMEOS) || defined(OS_LINUX) 40 #if defined(OS_CHROMEOS) || defined(OS_LINUX)
41 ERROR_INVALID_ADVERTISEMENT_INTERVAL, // Advertisement interval specified 41 ERROR_INVALID_ADVERTISEMENT_INTERVAL, // Advertisement interval specified
42 // is out of valid range. 42 // is out of valid range.
43 ERROR_RESET_ADVERTISING, // Error while resetting advertising.
43 #endif 44 #endif
44 INVALID_ADVERTISEMENT_ERROR_CODE 45 INVALID_ADVERTISEMENT_ERROR_CODE
45 }; 46 };
46 47
47 // Type of advertisement. 48 // Type of advertisement.
48 enum AdvertisementType { 49 enum AdvertisementType {
49 // This advertises with the type set to ADV_NONCONN_IND, which indicates 50 // This advertises with the type set to ADV_NONCONN_IND, which indicates
50 // to receivers that our device is not connectable. 51 // to receivers that our device is not connectable.
51 ADVERTISEMENT_TYPE_BROADCAST, 52 ADVERTISEMENT_TYPE_BROADCAST,
52 // This advertises with the type set to ADV_IND or ADV_SCAN_IND, which 53 // This advertises with the type set to ADV_IND or ADV_SCAN_IND, which
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // |observers_| are expected to outlive a BluetoothAdvertisement object. 144 // |observers_| are expected to outlive a BluetoothAdvertisement object.
144 base::ObserverList<BluetoothAdvertisement::Observer> observers_; 145 base::ObserverList<BluetoothAdvertisement::Observer> observers_;
145 146
146 private: 147 private:
147 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisement); 148 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisement);
148 }; 149 };
149 150
150 } // namespace device 151 } // namespace device
151 152
152 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_ 153 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698