| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GATT_CHARACTERISTIC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // set the correspoding bit in the characteristic's properties field. If | 110 // set the correspoding bit in the characteristic's properties field. If |
| 111 // |properties| has |PROPERTY_EXTENDED_PROPERTIES| set, it will be ignored. | 111 // |properties| has |PROPERTY_EXTENDED_PROPERTIES| set, it will be ignored. |
| 112 static BluetoothGattCharacteristic* Create(const BluetoothUUID& uuid, | 112 static BluetoothGattCharacteristic* Create(const BluetoothUUID& uuid, |
| 113 const std::vector<uint8>& value, | 113 const std::vector<uint8>& value, |
| 114 Properties properties, | 114 Properties properties, |
| 115 Permissions permissions); | 115 Permissions permissions); |
| 116 | 116 |
| 117 // Identifier used to uniquely identify a GATT characteristic object. This is | 117 // Identifier used to uniquely identify a GATT characteristic object. This is |
| 118 // different from the characteristic UUID: while multiple characteristics with | 118 // different from the characteristic UUID: while multiple characteristics with |
| 119 // the same UUID can exist on a Bluetooth device, the identifier returned from | 119 // the same UUID can exist on a Bluetooth device, the identifier returned from |
| 120 // this method is unique among all characteristics of a device. The contents | 120 // this method is unique among all characteristics on the adapter. The |
| 121 // of the identifier are platform specific. | 121 // contents of the identifier are platform specific. |
| 122 virtual std::string GetIdentifier() const = 0; | 122 virtual std::string GetIdentifier() const = 0; |
| 123 | 123 |
| 124 // The Bluetooth-specific UUID of the characteristic. | 124 // The Bluetooth-specific UUID of the characteristic. |
| 125 virtual BluetoothUUID GetUUID() const = 0; | 125 virtual BluetoothUUID GetUUID() const = 0; |
| 126 | 126 |
| 127 // Returns true, if this characteristic is hosted locally. If false, then this | 127 // Returns true, if this characteristic is hosted locally. If false, then this |
| 128 // instance represents a remote GATT characteristic. | 128 // instance represents a remote GATT characteristic. |
| 129 virtual bool IsLocal() const = 0; | 129 virtual bool IsLocal() const = 0; |
| 130 | 130 |
| 131 // Returns the value of the characteristic. For remote characteristics, this | 131 // Returns the value of the characteristic. For remote characteristics, this |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 BluetoothGattCharacteristic(); | 203 BluetoothGattCharacteristic(); |
| 204 virtual ~BluetoothGattCharacteristic(); | 204 virtual ~BluetoothGattCharacteristic(); |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); | 207 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 } // namespace device | 210 } // namespace device |
| 211 | 211 |
| 212 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 212 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| OLD | NEW |