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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h

Issue 1415573014: Reland "Add Linux support for the Bluetooth API" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "dbus/bus.h" 12 #include "dbus/bus.h"
13 #include "dbus/object_path.h" 13 #include "dbus/object_path.h"
14 #include "device/bluetooth/bluetooth_export.h" 14 #include "device/bluetooth/bluetooth_export.h"
15 15
16 namespace bluez { 16 namespace bluez {
17 17
18 // BluetoothGattServiceServiceProvider is used to provide a D-Bus object that 18 // BluetoothGattServiceServiceProvider is used to provide a D-Bus object that
19 // the Bluetooth daemon can communicate with to register GATT service 19 // the Bluetooth daemon can communicate with to register GATT service
20 // hierarchies. 20 // hierarchies.
21 // 21 //
22 // Instantiate with a chosen D-Bus object path (that conforms to the BlueZ GATT 22 // Instantiate with a chosen D-Bus object path (that conforms to the BlueZ GATT
23 // service specification), service UUID, and the list of included services, and 23 // service specification), service UUID, and the list of included services, and
24 // pass the D-Bus object path as the |service_path| argument to the 24 // pass the D-Bus object path as the |service_path| argument to the
25 // chromeos::BluetoothGattManagerClient::RegisterService method. Make sure to 25 // bluez::BluetoothGattManagerClient::RegisterService method. Make sure to
26 // create characteristic and descriptor objects using the appropriate service 26 // create characteristic and descriptor objects using the appropriate service
27 // providers before registering a GATT service with the Bluetooth daemon. 27 // providers before registering a GATT service with the Bluetooth daemon.
28 class DEVICE_BLUETOOTH_EXPORT BluetoothGattServiceServiceProvider { 28 class DEVICE_BLUETOOTH_EXPORT BluetoothGattServiceServiceProvider {
29 public: 29 public:
30 virtual ~BluetoothGattServiceServiceProvider(); 30 virtual ~BluetoothGattServiceServiceProvider();
31 31
32 // Creates the instance where |bus| is the D-Bus bus connection to export the 32 // Creates the instance where |bus| is the D-Bus bus connection to export the
33 // object onto, |object_path| is the object path that it should have, |uuid| 33 // object onto, |object_path| is the object path that it should have, |uuid|
34 // is the 128-bit GATT service UUID, and |includes| are a list of object paths 34 // is the 128-bit GATT service UUID, and |includes| are a list of object paths
35 // belonging to other exported GATT services that are included by the GATT 35 // belonging to other exported GATT services that are included by the GATT
36 // service being created. Make sure that all included services have been 36 // service being created. Make sure that all included services have been
37 // exported before registering a GATT services with the GATT manager. 37 // exported before registering a GATT services with the GATT manager.
38 static BluetoothGattServiceServiceProvider* Create( 38 static BluetoothGattServiceServiceProvider* Create(
39 dbus::Bus* bus, 39 dbus::Bus* bus,
40 const dbus::ObjectPath& object_path, 40 const dbus::ObjectPath& object_path,
41 const std::string& uuid, 41 const std::string& uuid,
42 const std::vector<dbus::ObjectPath>& includes); 42 const std::vector<dbus::ObjectPath>& includes);
43 43
44 protected: 44 protected:
45 BluetoothGattServiceServiceProvider(); 45 BluetoothGattServiceServiceProvider();
46 46
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProvider); 48 DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProvider);
49 }; 49 };
50 50
51 } // namespace bluez 51 } // namespace bluez
52 52
53 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_ 53 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698