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

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

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 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h" 5 #include "chromeos/dbus/bluetooth_gatt_descriptor_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "dbus/bus.h" 10 #include "dbus/bus.h"
11 #include "dbus/object_manager.h" 11 #include "dbus/object_manager.h"
12 #include "third_party/cros_system_api/dbus/service_constants.h" 12 #include "third_party/cros_system_api/dbus/service_constants.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 namespace {
17
18 // TODO(armansito): Move this constant to cros_system_api.
19 const char kValueProperty[] = "Value";
20
21 } // namespace
22
16 // static 23 // static
17 const char BluetoothGattDescriptorClient::kNoResponseError[] = 24 const char BluetoothGattDescriptorClient::kNoResponseError[] =
18 "org.chromium.Error.NoResponse"; 25 "org.chromium.Error.NoResponse";
19 // static 26 // static
20 const char BluetoothGattDescriptorClient::kUnknownDescriptorError[] = 27 const char BluetoothGattDescriptorClient::kUnknownDescriptorError[] =
21 "org.chromium.Error.UnknownDescriptor"; 28 "org.chromium.Error.UnknownDescriptor";
22 29
23 BluetoothGattDescriptorClient::Properties::Properties( 30 BluetoothGattDescriptorClient::Properties::Properties(
24 dbus::ObjectProxy* object_proxy, 31 dbus::ObjectProxy* object_proxy,
25 const std::string& interface_name, 32 const std::string& interface_name,
26 const PropertyChangedCallback&callback) 33 const PropertyChangedCallback&callback)
27 : dbus::PropertySet(object_proxy, interface_name, callback) { 34 : dbus::PropertySet(object_proxy, interface_name, callback) {
28 RegisterProperty(bluetooth_gatt_descriptor::kUUIDProperty, &uuid); 35 RegisterProperty(bluetooth_gatt_descriptor::kUUIDProperty, &uuid);
29 RegisterProperty(bluetooth_gatt_descriptor::kCharacteristicProperty, 36 RegisterProperty(bluetooth_gatt_descriptor::kCharacteristicProperty,
30 &characteristic); 37 &characteristic);
38 RegisterProperty(kValueProperty, &value);
31 } 39 }
32 40
33 BluetoothGattDescriptorClient::Properties::~Properties() { 41 BluetoothGattDescriptorClient::Properties::~Properties() {
34 } 42 }
35 43
36 // The BluetoothGattDescriptorClient implementation used in production. 44 // The BluetoothGattDescriptorClient implementation used in production.
37 class BluetoothGattDescriptorClientImpl 45 class BluetoothGattDescriptorClientImpl
38 : public BluetoothGattDescriptorClient, 46 : public BluetoothGattDescriptorClient,
39 public dbus::ObjectManager::Interface { 47 public dbus::ObjectManager::Interface {
40 public: 48 public:
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 257
250 BluetoothGattDescriptorClient::~BluetoothGattDescriptorClient() { 258 BluetoothGattDescriptorClient::~BluetoothGattDescriptorClient() {
251 } 259 }
252 260
253 // static 261 // static
254 BluetoothGattDescriptorClient* BluetoothGattDescriptorClient::Create() { 262 BluetoothGattDescriptorClient* BluetoothGattDescriptorClient::Create() {
255 return new BluetoothGattDescriptorClientImpl(); 263 return new BluetoothGattDescriptorClientImpl();
256 } 264 }
257 265
258 } // namespace chromeos 266 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/bluetooth_gatt_descriptor_client.h ('k') | chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698