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& device_path, | 50 void SendValueChanged(const dbus::ObjectPath& characteristic_path, |
51 const dbus::ObjectPath& characteristic_path, | 51 const std::vector<uint8_t>& value); |
52 const std::vector<uint8_t>& value, | |
53 bool indicate); | |
54 | 52 |
55 protected: | 53 protected: |
56 BluetoothGattApplicationServiceProvider(); | 54 BluetoothGattApplicationServiceProvider(); |
57 | 55 |
58 // List of GATT Service service providers managed by this object manager. | 56 // List of GATT Service service providers managed by this object manager. |
59 std::vector<std::unique_ptr<BluetoothGattServiceServiceProvider>> | 57 std::vector<std::unique_ptr<BluetoothGattServiceServiceProvider>> |
60 service_providers_; | 58 service_providers_; |
61 // List of GATT Characteristic service providers managed by this object | 59 // List of GATT Characteristic service providers managed by this object |
62 // manager. | 60 // manager. |
63 std::vector<std::unique_ptr<BluetoothGattCharacteristicServiceProvider>> | 61 std::vector<std::unique_ptr<BluetoothGattCharacteristicServiceProvider>> |
64 characteristic_providers_; | 62 characteristic_providers_; |
65 // List of GATT Descriptor service providers managed by this object manager. | 63 // List of GATT Descriptor service providers managed by this object manager. |
66 std::vector<std::unique_ptr<BluetoothGattDescriptorServiceProvider>> | 64 std::vector<std::unique_ptr<BluetoothGattDescriptorServiceProvider>> |
67 descriptor_providers_; | 65 descriptor_providers_; |
68 | 66 |
69 private: | 67 private: |
70 DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProvider); | 68 DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProvider); |
71 }; | 69 }; |
72 | 70 |
73 } // namespace bluez | 71 } // namespace bluez |
74 | 72 |
75 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ | 73 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_ |
OLD | NEW |