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

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

Issue 1984493002: Address property removals of GATT service and characteristic interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "device/bluetooth/dbus/bluetooth_gatt_service_client.h" 5 #include "device/bluetooth/dbus/bluetooth_gatt_service_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "dbus/bus.h" 11 #include "dbus/bus.h"
12 #include "dbus/object_manager.h" 12 #include "dbus/object_manager.h"
13 #include "third_party/cros_system_api/dbus/service_constants.h" 13 #include "third_party/cros_system_api/dbus/service_constants.h"
14 14
15 namespace bluez { 15 namespace bluez {
16 16
17 BluetoothGattServiceClient::Properties::Properties( 17 BluetoothGattServiceClient::Properties::Properties(
18 dbus::ObjectProxy* object_proxy, 18 dbus::ObjectProxy* object_proxy,
19 const std::string& interface_name, 19 const std::string& interface_name,
20 const PropertyChangedCallback& callback) 20 const PropertyChangedCallback& callback)
21 : dbus::PropertySet(object_proxy, interface_name, callback) { 21 : dbus::PropertySet(object_proxy, interface_name, callback) {
22 RegisterProperty(bluetooth_gatt_service::kUUIDProperty, &uuid); 22 RegisterProperty(bluetooth_gatt_service::kUUIDProperty, &uuid);
23 RegisterProperty(bluetooth_gatt_service::kIncludesProperty, &includes); 23 RegisterProperty(bluetooth_gatt_service::kIncludesProperty, &includes);
24 RegisterProperty(bluetooth_gatt_service::kDeviceProperty, &device); 24 RegisterProperty(bluetooth_gatt_service::kDeviceProperty, &device);
25 RegisterProperty(bluetooth_gatt_service::kPrimaryProperty, &primary); 25 RegisterProperty(bluetooth_gatt_service::kPrimaryProperty, &primary);
26 RegisterProperty(bluetooth_gatt_service::kCharacteristicsProperty,
27 &characteristics);
28 } 26 }
29 27
30 BluetoothGattServiceClient::Properties::~Properties() {} 28 BluetoothGattServiceClient::Properties::~Properties() {}
31 29
32 // The BluetoothGattServiceClient implementation used in production. 30 // The BluetoothGattServiceClient implementation used in production.
33 class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient, 31 class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient,
34 public dbus::ObjectManager::Interface { 32 public dbus::ObjectManager::Interface {
35 public: 33 public:
36 BluetoothGattServiceClientImpl() 34 BluetoothGattServiceClientImpl()
37 : object_manager_(NULL), weak_ptr_factory_(this) {} 35 : object_manager_(NULL), weak_ptr_factory_(this) {}
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 BluetoothGattServiceClient::BluetoothGattServiceClient() {} 133 BluetoothGattServiceClient::BluetoothGattServiceClient() {}
136 134
137 BluetoothGattServiceClient::~BluetoothGattServiceClient() {} 135 BluetoothGattServiceClient::~BluetoothGattServiceClient() {}
138 136
139 // static 137 // static
140 BluetoothGattServiceClient* BluetoothGattServiceClient::Create() { 138 BluetoothGattServiceClient* BluetoothGattServiceClient::Create() {
141 return new BluetoothGattServiceClientImpl(); 139 return new BluetoothGattServiceClientImpl();
142 } 140 }
143 141
144 } // namespace bluez 142 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698