| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| 7 | 7 |
| 8 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" | 8 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 bool IsNotifying() const override; | 43 bool IsNotifying() const override; |
| 44 std::vector<BluetoothRemoteGattDescriptor*> GetDescriptors() const override; | 44 std::vector<BluetoothRemoteGattDescriptor*> GetDescriptors() const override; |
| 45 BluetoothRemoteGattDescriptor* GetDescriptor( | 45 BluetoothRemoteGattDescriptor* GetDescriptor( |
| 46 const std::string& identifier) const override; | 46 const std::string& identifier) const override; |
| 47 void StartNotifySession(const NotifySessionCallback& callback, | 47 void StartNotifySession(const NotifySessionCallback& callback, |
| 48 const ErrorCallback& error_callback) override; | 48 const ErrorCallback& error_callback) override; |
| 49 void StopNotifySession(BluetoothGattNotifySession* session, | 49 void StopNotifySession(BluetoothGattNotifySession* session, |
| 50 const base::Closure& callback) override; | 50 const base::Closure& callback) override; |
| 51 void ReadRemoteCharacteristic(const ValueCallback& callback, | 51 void ReadRemoteCharacteristic(const ValueCallback& callback, |
| 52 const ErrorCallback& error_callback) override; | 52 const ErrorCallback& error_callback) override; |
| 53 void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value, | 53 void WriteRemoteCharacteristic(const std::vector<uint8_t>& value, |
| 54 const base::Closure& callback, | 54 const base::Closure& callback, |
| 55 const ErrorCallback& error_callback) override; | 55 const ErrorCallback& error_callback) override; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicMac); | 57 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicMac); |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 void SubscribeToNotifications(BluetoothRemoteGattDescriptor* ccc_descriptor, | 60 void SubscribeToNotifications(BluetoothRemoteGattDescriptor* ccc_descriptor, |
| 61 const base::Closure& callback, | 61 const base::Closure& callback, |
| 62 const ErrorCallback& error_callback) override; | 62 const ErrorCallback& error_callback) override; |
| 63 void UnsubscribeFromNotifications( | 63 void UnsubscribeFromNotifications( |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 PendingStartNotifyCall; | 112 PendingStartNotifyCall; |
| 113 std::vector<PendingStartNotifyCall> start_notify_session_callbacks_; | 113 std::vector<PendingStartNotifyCall> start_notify_session_callbacks_; |
| 114 // Flag indicates if GATT event registration is in progress. | 114 // Flag indicates if GATT event registration is in progress. |
| 115 bool start_notifications_in_progress_; | 115 bool start_notifications_in_progress_; |
| 116 base::WeakPtrFactory<BluetoothRemoteGattCharacteristicMac> weak_ptr_factory_; | 116 base::WeakPtrFactory<BluetoothRemoteGattCharacteristicMac> weak_ptr_factory_; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace device | 119 } // namespace device |
| 120 | 120 |
| 121 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 121 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| OLD | NEW |