Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 // to implement the delegate methods. | 174 // to implement the delegate methods. |
| 175 // | 175 // |
| 176 // This method only makes sense for local characteristics and does nothing and | 176 // This method only makes sense for local characteristics and does nothing and |
| 177 // returns false if this instance represents a remote characteristic. | 177 // returns false if this instance represents a remote characteristic. |
| 178 virtual bool UpdateValue(const std::vector<uint8_t>& value) = 0; | 178 virtual bool UpdateValue(const std::vector<uint8_t>& value) = 0; |
| 179 | 179 |
| 180 // Starts a notify session for the remote characteristic, if it supports | 180 // Starts a notify session for the remote characteristic, if it supports |
| 181 // notifications/indications. On success, the characteristic starts sending | 181 // notifications/indications. On success, the characteristic starts sending |
| 182 // value notifications and |callback| is called with a session object whose | 182 // value notifications and |callback| is called with a session object whose |
| 183 // ownership belongs to the caller. |error_callback| is called on errors. | 183 // ownership belongs to the caller. |error_callback| is called on errors. |
| 184 // This function will try to write to the Client Characteristic Configuration | |
|
scheib
2016/03/04 01:27:20
blank line above this.
"This function will try to
ortuno
2016/03/07 21:58:44
Done.
scheib
2016/03/07 22:18:29
Blank line above this.
ortuno
2016/03/07 22:26:24
Done.
| |
| 185 // descriptor to enable notifications/indications. According Core Bluetooth | |
|
scheib
2016/03/04 01:27:20
remove 'According'
ortuno
2016/03/07 21:58:44
Done.
| |
| 186 // Specification [V4.2 Vol 3 Part G Section 3.3.1.1. | |
| 187 // Characteristic Properties] this descriptor must be present when | |
|
scheib
2016/03/04 01:27:20
"this descriptor must be" -> "requires this descri
ortuno
2016/03/07 21:58:44
Done.
| |
| 188 // notifications/indications is supported. If the descriptor is not present | |
|
scheib
2016/03/04 01:27:20
is -> are
ortuno
2016/03/07 21:58:44
Done.
| |
| 189 // |error_callback| will be ran. | |
|
scheib
2016/03/04 01:27:20
ran -> run
ortuno
2016/03/07 21:58:44
Done.
| |
| 184 virtual void StartNotifySession(const NotifySessionCallback& callback, | 190 virtual void StartNotifySession(const NotifySessionCallback& callback, |
| 185 const ErrorCallback& error_callback) = 0; | 191 const ErrorCallback& error_callback) = 0; |
| 186 | 192 |
| 187 // Sends a read request to a remote characteristic to read its value. | 193 // Sends a read request to a remote characteristic to read its value. |
| 188 // |callback| is called to return the read value on success and | 194 // |callback| is called to return the read value on success and |
| 189 // |error_callback| is called for failures. | 195 // |error_callback| is called for failures. |
| 190 virtual void ReadRemoteCharacteristic( | 196 virtual void ReadRemoteCharacteristic( |
| 191 const ValueCallback& callback, | 197 const ValueCallback& callback, |
| 192 const ErrorCallback& error_callback) = 0; | 198 const ErrorCallback& error_callback) = 0; |
| 193 | 199 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 205 BluetoothGattCharacteristic(); | 211 BluetoothGattCharacteristic(); |
| 206 virtual ~BluetoothGattCharacteristic(); | 212 virtual ~BluetoothGattCharacteristic(); |
| 207 | 213 |
| 208 private: | 214 private: |
| 209 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); | 215 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); |
| 210 }; | 216 }; |
| 211 | 217 |
| 212 } // namespace device | 218 } // namespace device |
| 213 | 219 |
| 214 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 220 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| OLD | NEW |