| 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_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 |
| 9 #include <map> | 10 #include <map> |
| 10 #include <string> | 11 #include <string> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 15 #include "dbus/object_path.h" | 16 #include "dbus/object_path.h" |
| 16 #include "device/bluetooth/bluetooth_remote_gatt_service.h" | 17 #include "device/bluetooth/bluetooth_remote_gatt_service.h" |
| 17 #include "device/bluetooth/bluetooth_uuid.h" | 18 #include "device/bluetooth/bluetooth_uuid.h" |
| 18 #include "device/bluetooth/bluez/bluetooth_gatt_service_bluez.h" | 19 #include "device/bluetooth/bluez/bluetooth_gatt_service_bluez.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // this map. See crbug.com/604166. | 105 // this map. See crbug.com/604166. |
| 105 using CharacteristicMap = | 106 using CharacteristicMap = |
| 106 std::map<dbus::ObjectPath, BluetoothRemoteGattCharacteristicBlueZ*>; | 107 std::map<dbus::ObjectPath, BluetoothRemoteGattCharacteristicBlueZ*>; |
| 107 | 108 |
| 108 // Mapping from GATT characteristic object paths to characteristic objects. | 109 // Mapping from GATT characteristic object paths to characteristic objects. |
| 109 // owned by this service. Since the BlueZ implementation uses object | 110 // owned by this service. Since the BlueZ implementation uses object |
| 110 // paths as unique identifiers, we also use this mapping to return | 111 // paths as unique identifiers, we also use this mapping to return |
| 111 // characteristics by identifier. | 112 // characteristics by identifier. |
| 112 CharacteristicMap characteristics_; | 113 CharacteristicMap characteristics_; |
| 113 | 114 |
| 114 // Indicates whether or not the characteristics of this service are known to | |
| 115 // have been discovered. | |
| 116 bool discovery_complete_; | |
| 117 | |
| 118 // Note: This should remain the last member so it'll be destroyed and | 115 // Note: This should remain the last member so it'll be destroyed and |
| 119 // invalidate its weak pointers before any other members are destroyed. | 116 // invalidate its weak pointers before any other members are destroyed. |
| 120 base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; | 117 base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; |
| 121 | 118 |
| 122 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); | 119 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); |
| 123 }; | 120 }; |
| 124 | 121 |
| 125 } // namespace bluez | 122 } // namespace bluez |
| 126 | 123 |
| 127 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ | 124 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_ |
| OLD | NEW |