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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // by BluetoothRemoteGattCharacteristicChromeOS instances to notify service | 74 // by BluetoothRemoteGattCharacteristicChromeOS instances to notify service |
75 // observers when characteristic descriptors get added and removed. If |added| | 75 // observers when characteristic descriptors get added and removed. If |added| |
76 // is true, an "Added" event will be sent. Otherwise, a "Removed" event will | 76 // is true, an "Added" event will be sent. Otherwise, a "Removed" event will |
77 // be sent. | 77 // be sent. |
78 void NotifyDescriptorAddedOrRemoved( | 78 void NotifyDescriptorAddedOrRemoved( |
79 BluetoothRemoteGattCharacteristicChromeOS* characteristic, | 79 BluetoothRemoteGattCharacteristicChromeOS* characteristic, |
80 BluetoothRemoteGattDescriptorChromeOS* descriptor, | 80 BluetoothRemoteGattDescriptorChromeOS* descriptor, |
81 bool added); | 81 bool added); |
82 | 82 |
83 // Notifies its observers that the value of a descriptor has changed. Called | 83 // Notifies its observers that the value of a descriptor has changed. Called |
84 // by BluetoothRemoteGattCharacteristicChromeOS instances to notify service | 84 // by BluetoothRemoteGattDescriptorChromeOS instances to notify service |
85 // observers when the value of one of their descriptors gets updated. | 85 // observers when their cached value gets updated after a read request. |
86 void NotifyDescriptorValueChanged( | 86 void NotifyDescriptorValueChanged( |
87 BluetoothRemoteGattCharacteristicChromeOS* characteristic, | 87 BluetoothRemoteGattCharacteristicChromeOS* characteristic, |
88 BluetoothRemoteGattDescriptorChromeOS* descriptor, | 88 BluetoothRemoteGattDescriptorChromeOS* descriptor, |
89 const std::vector<uint8>& value); | 89 const std::vector<uint8>& value); |
90 | 90 |
91 private: | 91 private: |
92 friend class BluetoothDeviceChromeOS; | 92 friend class BluetoothDeviceChromeOS; |
93 | 93 |
94 BluetoothRemoteGattServiceChromeOS(BluetoothDeviceChromeOS* device, | 94 BluetoothRemoteGattServiceChromeOS(BluetoothDeviceChromeOS* device, |
95 const dbus::ObjectPath& object_path); | 95 const dbus::ObjectPath& object_path); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Note: This should remain the last member so it'll be destroyed and | 129 // Note: This should remain the last member so it'll be destroyed and |
130 // invalidate its weak pointers before any other members are destroyed. | 130 // invalidate its weak pointers before any other members are destroyed. |
131 base::WeakPtrFactory<BluetoothRemoteGattServiceChromeOS> weak_ptr_factory_; | 131 base::WeakPtrFactory<BluetoothRemoteGattServiceChromeOS> weak_ptr_factory_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceChromeOS); | 133 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceChromeOS); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace chromeos | 136 } // namespace chromeos |
137 | 137 |
138 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ | 138 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_CHROMEOS_H_ |
OLD | NEW |