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

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

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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 CHROMEOS_DBUS_BLUETOOTH_GATT_SERVICE_CLIENT_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_BLUETOOTH_GATT_SERVICE_CLIENT_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/dbus/dbus_client.h"
13 #include "dbus/object_path.h" 11 #include "dbus/object_path.h"
14 #include "dbus/property.h" 12 #include "dbus/property.h"
13 #include "device/bluetooth/bluetooth_export.h"
14 #include "device/bluetooth/dbus/bluez_dbus_client.h"
15 15
16 namespace chromeos { 16 namespace bluez {
17 17
18 // BluetoothGattServiceClient is used to communicate with remote GATT service 18 // BluetoothGattServiceClient is used to communicate with remote GATT service
19 // objects exposed by the Bluetooth daemon. 19 // objects exposed by the Bluetooth daemon.
20 class CHROMEOS_EXPORT BluetoothGattServiceClient : public DBusClient { 20 class DEVICE_BLUETOOTH_EXPORT BluetoothGattServiceClient
21 : public BluezDBusClient {
21 public: 22 public:
22 // Structure of properties associated with GATT services. 23 // Structure of properties associated with GATT services.
23 struct Properties : public dbus::PropertySet { 24 struct Properties : public dbus::PropertySet {
24 // The 128-bit service UUID. [read-only] 25 // The 128-bit service UUID. [read-only]
25 dbus::Property<std::string> uuid; 26 dbus::Property<std::string> uuid;
26 27
27 // Object path of the Bluetooth device that the GATT service belongs to. 28 // Object path of the Bluetooth device that the GATT service belongs to.
28 dbus::Property<dbus::ObjectPath> device; 29 dbus::Property<dbus::ObjectPath> device;
29 30
30 // Whether or not this service is a primary service. 31 // Whether or not this service is a primary service.
31 dbus::Property<bool> primary; 32 dbus::Property<bool> primary;
32 33
33 // Array of object paths representing the characteristics of this service. 34 // Array of object paths representing the characteristics of this service.
34 // [read-only] 35 // [read-only]
35 dbus::Property<std::vector<dbus::ObjectPath> > characteristics; 36 dbus::Property<std::vector<dbus::ObjectPath>> characteristics;
36 37
37 // Array of object paths representing the included services of this service. 38 // Array of object paths representing the included services of this service.
38 // [read-only] 39 // [read-only]
39 dbus::Property<std::vector<dbus::ObjectPath> > includes; 40 dbus::Property<std::vector<dbus::ObjectPath>> includes;
40 41
41 Properties(dbus::ObjectProxy* object_proxy, 42 Properties(dbus::ObjectProxy* object_proxy,
42 const std::string& interface_name, 43 const std::string& interface_name,
43 const PropertyChangedCallback& callback); 44 const PropertyChangedCallback& callback);
44 ~Properties() override; 45 ~Properties() override;
45 }; 46 };
46 47
47 // Interface for observing changes from a remote GATT service. 48 // Interface for observing changes from a remote GATT service.
48 class Observer { 49 class Observer {
49 public: 50 public:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Creates the instance. 82 // Creates the instance.
82 static BluetoothGattServiceClient* Create(); 83 static BluetoothGattServiceClient* Create();
83 84
84 protected: 85 protected:
85 BluetoothGattServiceClient(); 86 BluetoothGattServiceClient();
86 87
87 private: 88 private:
88 DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceClient); 89 DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceClient);
89 }; 90 };
90 91
91 } // namespace chromeos 92 } // namespace bluez
92 93
93 #endif // CHROMEOS_DBUS_BLUETOOTH_GATT_SERVICE_CLIENT_H_ 94 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluetooth_gatt_manager_client.cc ('k') | device/bluetooth/dbus/bluetooth_gatt_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698