| 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_REMOTE_GATT_SERVICE_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // by BluetoothRemoteGattCharacteristicChromeOS instances to notify service | 82 // by BluetoothRemoteGattCharacteristicChromeOS instances to notify service |
| 83 // observers when characteristic descriptors get added and removed. If |added| | 83 // observers when characteristic descriptors get added and removed. If |added| |
| 84 // is true, an "Added" event will be sent. Otherwise, a "Removed" event will | 84 // is true, an "Added" event will be sent. Otherwise, a "Removed" event will |
| 85 // be sent. | 85 // be sent. |
| 86 void NotifyDescriptorAddedOrRemoved( | 86 void NotifyDescriptorAddedOrRemoved( |
| 87 BluetoothRemoteGattCharacteristicChromeOS* characteristic, | 87 BluetoothRemoteGattCharacteristicChromeOS* characteristic, |
| 88 BluetoothRemoteGattDescriptorChromeOS* descriptor, | 88 BluetoothRemoteGattDescriptorChromeOS* descriptor, |
| 89 bool added); | 89 bool added); |
| 90 | 90 |
| 91 // Notifies its observers that the value of a descriptor has changed. Called | 91 // Notifies its observers that the value of a descriptor has changed. Called |
| 92 // by BluetoothRemoteGattCharacteristicChromeOS instances to notify service | 92 // by BluetoothRemoteGattDescriptorChromeOS instances to notify service |
| 93 // observers when the value of one of their descriptors gets updated. | 93 // observers when their cached value gets updated after a read request. |
| 94 void NotifyDescriptorValueChanged( | 94 void NotifyDescriptorValueChanged( |
| 95 BluetoothRemoteGattCharacteristicChromeOS* characteristic, | 95 BluetoothRemoteGattCharacteristicChromeOS* characteristic, |
| 96 BluetoothRemoteGattDescriptorChromeOS* descriptor, | 96 BluetoothRemoteGattDescriptorChromeOS* descriptor, |
| 97 const std::vector<uint8>& value); | 97 const std::vector<uint8>& value); |
| 98 | 98 |
| 99 private: | 99 private: |
| 100 friend class BluetoothDeviceChromeOS; | 100 friend class BluetoothDeviceChromeOS; |
| 101 | 101 |
| 102 BluetoothRemoteGattServiceChromeOS(BluetoothDeviceChromeOS* device, | 102 BluetoothRemoteGattServiceChromeOS(BluetoothDeviceChromeOS* device, |
| 103 const dbus::ObjectPath& object_path); | 103 const dbus::ObjectPath& object_path); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 134 // Note: This should remain the last member so it'll be destroyed and | 134 // Note: This should remain the last member so it'll be destroyed and |
| 135 // invalidate its weak pointers before any other members are destroyed. | 135 // invalidate its weak pointers before any other members are destroyed. |
| 136 base::WeakPtrFactory<BluetoothRemoteGattServiceChromeOS> weak_ptr_factory_; | 136 base::WeakPtrFactory<BluetoothRemoteGattServiceChromeOS> weak_ptr_factory_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceChromeOS); | 138 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceChromeOS); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace chromeos | 141 } // namespace chromeos |
| 142 | 142 |
| 143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ | 143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ |
| OLD | NEW |