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

Side by Side Diff: chromeos/dbus/bluetooth_gatt_descriptor_client.h

Issue 788193004: chromeos/dbus: Update Bluetooth GATT API clients to upstream definition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase & tbr Created 5 years, 10 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_DESCRIPTOR_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
6 #define CHROMEOS_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ 6 #define CHROMEOS_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "chromeos/chromeos_export.h" 13 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client.h" 14 #include "chromeos/dbus/dbus_client.h"
14 #include "dbus/object_path.h" 15 #include "dbus/object_path.h"
15 #include "dbus/property.h" 16 #include "dbus/property.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 // BluetoothGattDescriptorClient is used to communicate with remote GATT 20 // BluetoothGattDescriptorClient is used to communicate with remote GATT
20 // characteristic descriptor objects exposed by the Bluetooth daemon. 21 // characteristic descriptor objects exposed by the Bluetooth daemon.
21 class CHROMEOS_EXPORT BluetoothGattDescriptorClient : public DBusClient { 22 class CHROMEOS_EXPORT BluetoothGattDescriptorClient : public DBusClient {
22 public: 23 public:
23 // Structure of properties associated with GATT descriptors. 24 // Structure of properties associated with GATT descriptors.
24 struct Properties : public dbus::PropertySet { 25 struct Properties : public dbus::PropertySet {
25 // The 128-bit characteristic descriptor UUID. [read-only] 26 // The 128-bit characteristic descriptor UUID. [read-only]
26 dbus::Property<std::string> uuid; 27 dbus::Property<std::string> uuid;
27 28
28 // Object path of the GATT characteristic the descriptor belongs to. 29 // Object path of the GATT characteristic the descriptor belongs to.
29 // [read-only] 30 // [read-only]
30 dbus::Property<dbus::ObjectPath> characteristic; 31 dbus::Property<dbus::ObjectPath> characteristic;
31 32
33 // The cached value of the descriptor. This property gets updated only after
34 // a successful read request. [read-only]
35 dbus::Property<std::vector<uint8_t>> value;
36
32 Properties(dbus::ObjectProxy* object_proxy, 37 Properties(dbus::ObjectProxy* object_proxy,
33 const std::string& interface_name, 38 const std::string& interface_name,
34 const PropertyChangedCallback& callback); 39 const PropertyChangedCallback& callback);
35 ~Properties() override; 40 ~Properties() override;
36 }; 41 };
37 42
38 // Interface for observing changes from a remote GATT characteristic 43 // Interface for observing changes from a remote GATT characteristic
39 // descriptor. 44 // descriptor.
40 class Observer { 45 class Observer {
41 public: 46 public:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 protected: 106 protected:
102 BluetoothGattDescriptorClient(); 107 BluetoothGattDescriptorClient();
103 108
104 private: 109 private:
105 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorClient); 110 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorClient);
106 }; 111 };
107 112
108 } // namespace chromeos 113 } // namespace chromeos
109 114
110 #endif // CHROMEOS_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_ 115 #endif // CHROMEOS_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/bluetooth_gatt_characteristic_client.cc ('k') | chromeos/dbus/bluetooth_gatt_descriptor_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698