Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h

Issue 1914893002: DBus changes for implementing local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_classes
Patch Set: test leak fix Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c0e1cef4eb982c84e8d01434ddef71ff7653ea4
--- /dev/null
+++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider.h
@@ -0,0 +1,65 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_
+#define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_
+
+#include <map>
+#include <vector>
+
+#include "base/macros.h"
+#include "dbus/bus.h"
+#include "dbus/object_path.h"
+#include "device/bluetooth/bluetooth_export.h"
+#include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h"
+#include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h"
+#include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h"
+#include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h"
+
+namespace bluez {
+
+class BluetoothLocalGattServiceBlueZ;
+
+// BluetoothGattApplicationServiceProvider is used to provide a D-Bus object
+// that the Bluetooth daemon can communicate with to register GATT service
+// hierarchies.
+class DEVICE_BLUETOOTH_EXPORT BluetoothGattApplicationServiceProvider {
+ public:
+ virtual ~BluetoothGattApplicationServiceProvider();
+
+ // Creates individual service providers for all the attributes managed by the
+ // object manager interface implemented by this application service provider.
+ static void CreateAttributeServiceProviders(
+ dbus::Bus* bus,
+ const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>&
+ services,
+ std::vector<std::unique_ptr<BluetoothGattServiceServiceProvider>>*
+ service_providers,
+ std::vector<std::unique_ptr<BluetoothGattCharacteristicServiceProvider>>*
+ characteristic_providers,
+ std::vector<std::unique_ptr<BluetoothGattDescriptorServiceProvider>>*
+ descriptor_providers);
+
+ // Creates the instance where |bus| is the D-Bus bus connection to export the
+ // object onto, |object_path| is the object path that it should have, |uuid|
+ // is the 128-bit GATT service UUID, and |includes| are a list of object paths
+ // belonging to other exported GATT services that are included by the GATT
+ // service being created. Make sure that all included services have been
+ // exported before registering a GATT services with the GATT manager.
+ static std::unique_ptr<BluetoothGattApplicationServiceProvider> Create(
+ dbus::Bus* bus,
+ const dbus::ObjectPath& object_path,
+ const std::map<dbus::ObjectPath, BluetoothLocalGattServiceBlueZ*>&
+ services);
+
+ protected:
+ BluetoothGattApplicationServiceProvider();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProvider);
+};
+
+} // namespace bluez
+
+#endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_APPLICATION_SERVICE_PROVIDER_H_
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698