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

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

Issue 1758293003: bluetooth: Clarify how StartNotifySession function works (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Add blank line Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 //
185 // Writes to the Client Characteristic Configuration descriptor to enable
186 // notifications/indications. Core Bluetooth Specification [V4.2 Vol 3 Part G
187 // Section 3.3.1.1. Characteristic Properties] requires this descriptor to be
188 // present when notifications/indications are supported. If the descriptor is
189 // not present |error_callback| will be run.
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
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_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698