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

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

Issue 2907913002: Fix ManufacturerData and ServiceData DBus data type to match with bluez. (Closed)
Patch Set: Fix ManufacturerData and ServiceData DBus data type to match with bluez. Created 3 years, 6 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 13 matching lines...) Expand all
24 // BluetoothAdvertisement represents an advertisement which advertises over the 24 // BluetoothAdvertisement represents an advertisement which advertises over the
25 // LE channel during its lifetime. 25 // LE channel during its lifetime.
26 class DEVICE_BLUETOOTH_EXPORT BluetoothAdvertisement 26 class DEVICE_BLUETOOTH_EXPORT BluetoothAdvertisement
27 : public base::RefCounted<BluetoothAdvertisement> { 27 : public base::RefCounted<BluetoothAdvertisement> {
28 public: 28 public:
29 // Possible types of error raised while registering or unregistering 29 // Possible types of error raised while registering or unregistering
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
rkc 2017/06/01 18:10:50 This error doesn't really make sense anymore since
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 #endif 43 #endif
44 ERROR_ADVERTISEMENT_FAILED,
rkc 2017/06/01 18:10:50 Description for this error?
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
53 // indicates to receivers that our device is connectable. 54 // indicates to receivers that our device is connectable.
(...skipping 89 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