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_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ |
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // is the 128-bit GATT service UUID, and |includes| are a list of object paths | 40 // is the 128-bit GATT service UUID, and |includes| are a list of object paths |
41 // belonging to other exported GATT services that are included by the GATT | 41 // belonging to other exported GATT services that are included by the GATT |
42 // service being created. Make sure that all included services have been | 42 // service being created. Make sure that all included services have been |
43 // exported before registering a GATT services with the GATT manager. | 43 // exported before registering a GATT services with the GATT manager. |
44 static std::unique_ptr<BluetoothGattApplicationServiceProvider> Create( | 44 static std::unique_ptr<BluetoothGattApplicationServiceProvider> Create( |
45 dbus::Bus* bus, | 45 dbus::Bus* bus, |
46 const dbus::ObjectPath& object_path, | 46 const dbus::ObjectPath& object_path, |
47 const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>& | 47 const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>& |
48 services); | 48 services); |
49 | 49 |
50 void SendValueChanged(const dbus::ObjectPath& characteristic_path, | 50 void SendValueChanged(const dbus::ObjectPath& device_path, |
51 const std::vector<uint8_t>& value); | 51 const dbus::ObjectPath& characteristic_path, |
| 52 const std::vector<uint8_t>& value, |
| 53 bool indicate); |
52 | 54 |
53 protected: | 55 protected: |
54 BluetoothGattApplicationServiceProvider(); | 56 BluetoothGattApplicationServiceProvider(); |
55 | 57 |
56 // List of GATT Service service providers managed by this object manager. | 58 // List of GATT Service service providers managed by this object manager. |
57 std::vector<std::unique_ptr<BluetoothGattServiceServiceProvider>> | 59 std::vector<std::unique_ptr<BluetoothGattServiceServiceProvider>> |
58 service_providers_; | 60 service_providers_; |
59 // List of GATT Characteristic service providers managed by this object | 61 // List of GATT Characteristic service providers managed by this object |
60 // manager. | 62 // manager. |
61 std::vector<std::unique_ptr<BluetoothGattCharacteristicServiceProvider>> | 63 std::vector<std::unique_ptr<BluetoothGattCharacteristicServiceProvider>> |
62 characteristic_providers_; | 64 characteristic_providers_; |
63 // List of GATT Descriptor service providers managed by this object manager. | 65 // List of GATT Descriptor service providers managed by this object manager. |
64 std::vector<std::unique_ptr<BluetoothGattDescriptorServiceProvider>> | 66 std::vector<std::unique_ptr<BluetoothGattDescriptorServiceProvider>> |
65 descriptor_providers_; | 67 descriptor_providers_; |
66 | 68 |
67 private: | 69 private: |
68 DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProvider); | 70 DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProvider); |
69 }; | 71 }; |
70 | 72 |
71 } // namespace bluez | 73 } // namespace bluez |
72 | 74 |
73 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ | 75 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ |
OLD | NEW |