| 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_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 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 static const char kHeartRateServiceUUID[]; | 82 static const char kHeartRateServiceUUID[]; |
| 83 | 83 |
| 84 // Final object path components and the corresponding UUIDs of the GATT | 84 // Final object path components and the corresponding UUIDs of the GATT |
| 85 // services that we emulate. Service paths are hierarchical to Bluetooth | 85 // services that we emulate. Service paths are hierarchical to Bluetooth |
| 86 // device paths, so if the path component is "service0001", and the device | 86 // device paths, so if the path component is "service0001", and the device |
| 87 // path is "/org/foo/device0", the service path is | 87 // path is "/org/foo/device0", the service path is |
| 88 // "/org/foo/device0/service0001". | 88 // "/org/foo/device0/service0001". |
| 89 static const char kBatteryServicePathComponent[]; | 89 static const char kBatteryServicePathComponent[]; |
| 90 static const char kBatteryServiceUUID[]; | 90 static const char kBatteryServiceUUID[]; |
| 91 | 91 |
| 92 static const char kGenericAccessServiceUUID[]; |
| 93 |
| 92 private: | 94 private: |
| 93 // Property callback passed when we create Properties structures. | 95 // Property callback passed when we create Properties structures. |
| 94 void OnPropertyChanged(const dbus::ObjectPath& object_path, | 96 void OnPropertyChanged(const dbus::ObjectPath& object_path, |
| 95 const std::string& property_name); | 97 const std::string& property_name); |
| 96 | 98 |
| 97 // Notifies observers. | 99 // Notifies observers. |
| 98 void NotifyServiceAdded(const dbus::ObjectPath& object_path); | 100 void NotifyServiceAdded(const dbus::ObjectPath& object_path); |
| 99 void NotifyServiceRemoved(const dbus::ObjectPath& object_path); | 101 void NotifyServiceRemoved(const dbus::ObjectPath& object_path); |
| 100 | 102 |
| 101 // Tells FakeBluetoothGattCharacteristicClient to expose GATT characteristics. | 103 // Tells FakeBluetoothGattCharacteristicClient to expose GATT characteristics. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 119 // Note: This should remain the last member so it'll be destroyed and | 121 // Note: This should remain the last member so it'll be destroyed and |
| 120 // invalidate its weak pointers before any other members are destroyed. | 122 // invalidate its weak pointers before any other members are destroyed. |
| 121 base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_; | 123 base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_; |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceClient); | 125 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceClient); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace bluez | 128 } // namespace bluez |
| 127 | 129 |
| 128 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ | 130 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_SERVICE_CLIENT_H_ |
| OLD | NEW |