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

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

Issue 2241263005: Revert of Implement BluetoothGattNotifySession::Stop on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ReadRemoteCharacteristic(const ValueCallback& callback, 49 void ReadRemoteCharacteristic(const ValueCallback& callback,
50 const ErrorCallback& error_callback) override; 50 const ErrorCallback& error_callback) override;
51 void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value, 51 void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
52 const base::Closure& callback, 52 const base::Closure& callback,
53 const ErrorCallback& error_callback) override; 53 const ErrorCallback& error_callback) override;
54 54
55 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicMac); 55 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicMac);
56 56
57 protected:
58 void SubscribeToNotifications(BluetoothRemoteGattDescriptor* ccc_descriptor,
59 const base::Closure& callback,
60 const ErrorCallback& error_callback) override;
61 void UnsubscribeFromNotifications(
62 BluetoothRemoteGattDescriptor* ccc_descriptor,
63 const base::Closure& callback,
64 const ErrorCallback& error_callback) override;
65
66 private: 57 private:
67 friend class BluetoothRemoteGattServiceMac; 58 friend class BluetoothRemoteGattServiceMac;
68 friend class BluetoothTestMac; 59 friend class BluetoothTestMac;
69 60
70 // Called by the BluetoothRemoteGattServiceMac instance when the 61 // Called by the BluetoothRemoteGattServiceMac instance when the
71 // characteristics value has been read. 62 // characteristics value has been read.
72 void DidUpdateValue(NSError* error); 63 void DidUpdateValue(NSError* error);
73 // Updates value_ and notifies the adapter of the new value. 64 // Updates value_ and notifies the adapter of the new value.
74 void UpdateValueAndNotify(); 65 void UpdateValueAndNotify();
75 // Called by the BluetoothRemoteGattServiceMac instance when the 66 // Called by the BluetoothRemoteGattServiceMac instance when the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 PendingStartNotifyCall; 101 PendingStartNotifyCall;
111 std::vector<PendingStartNotifyCall> start_notify_session_callbacks_; 102 std::vector<PendingStartNotifyCall> start_notify_session_callbacks_;
112 // Flag indicates if GATT event registration is in progress. 103 // Flag indicates if GATT event registration is in progress.
113 bool start_notifications_in_progress_; 104 bool start_notifications_in_progress_;
114 base::WeakPtrFactory<BluetoothRemoteGattCharacteristicMac> weak_ptr_factory_; 105 base::WeakPtrFactory<BluetoothRemoteGattCharacteristicMac> weak_ptr_factory_;
115 }; 106 };
116 107
117 } // namespace device 108 } // namespace device
118 109
119 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ 110 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698