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_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/macros.h" | 14 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
16 #include "dbus/object_path.h" | 18 #include "dbus/object_path.h" |
17 #include "device/bluetooth/bluetooth_gatt_service.h" | 19 #include "device/bluetooth/bluetooth_gatt_service.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 BluetoothRemoteGattCharacteristicBlueZ* characteristic, | 87 BluetoothRemoteGattCharacteristicBlueZ* characteristic, |
86 BluetoothRemoteGattDescriptorBlueZ* descriptor, | 88 BluetoothRemoteGattDescriptorBlueZ* descriptor, |
87 bool added); | 89 bool added); |
88 | 90 |
89 // 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 |
90 // by BluetoothRemoteGattCharacteristicBlueZ instances to notify service | 92 // by BluetoothRemoteGattCharacteristicBlueZ instances to notify service |
91 // observers. | 93 // observers. |
92 void NotifyDescriptorValueChanged( | 94 void NotifyDescriptorValueChanged( |
93 BluetoothRemoteGattCharacteristicBlueZ* characteristic, | 95 BluetoothRemoteGattCharacteristicBlueZ* characteristic, |
94 BluetoothRemoteGattDescriptorBlueZ* descriptor, | 96 BluetoothRemoteGattDescriptorBlueZ* descriptor, |
95 const std::vector<uint8>& value); | 97 const std::vector<uint8_t>& value); |
96 | 98 |
97 private: | 99 private: |
98 friend class BluetoothDeviceBlueZ; | 100 friend class BluetoothDeviceBlueZ; |
99 | 101 |
100 typedef std::map<dbus::ObjectPath, BluetoothRemoteGattCharacteristicBlueZ*> | 102 typedef std::map<dbus::ObjectPath, BluetoothRemoteGattCharacteristicBlueZ*> |
101 CharacteristicMap; | 103 CharacteristicMap; |
102 | 104 |
103 BluetoothRemoteGattServiceBlueZ(BluetoothAdapterBlueZ* adapter, | 105 BluetoothRemoteGattServiceBlueZ(BluetoothAdapterBlueZ* adapter, |
104 BluetoothDeviceBlueZ* device, | 106 BluetoothDeviceBlueZ* device, |
105 const dbus::ObjectPath& object_path); | 107 const dbus::ObjectPath& object_path); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Note: This should remain the last member so it'll be destroyed and | 142 // Note: This should remain the last member so it'll be destroyed and |
141 // invalidate its weak pointers before any other members are destroyed. | 143 // invalidate its weak pointers before any other members are destroyed. |
142 base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; | 144 base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; |
143 | 145 |
144 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); | 146 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); |
145 }; | 147 }; |
146 | 148 |
147 } // namespace bluez | 149 } // namespace bluez |
148 | 150 |
149 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 151 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
OLD | NEW |