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

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

Issue 307453007: device/bluetooth: Implement GATT characteristic properties on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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_characteristic_client.h" 5 #include "chromeos/dbus/bluetooth_gatt_characteristic_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 // static
17 const char BluetoothGattCharacteristicClient::kFlagBroadcast[] = "broadcast";
18 // static
19 const char BluetoothGattCharacteristicClient::kFlagRead[] = "read";
20 // static
21 const char BluetoothGattCharacteristicClient::kFlagWriteWithoutResponse[] =
22 "write-without-response";
23 const char BluetoothGattCharacteristicClient::kFlagWrite[] = "write";
24 // static
25 const char BluetoothGattCharacteristicClient::kFlagNotify[] = "notify";
26 // static
27 const char BluetoothGattCharacteristicClient::kFlagIndicate[] = "indicate";
28 // static
29 const char BluetoothGattCharacteristicClient::kFlagAuthenticatedSignedWrites[] =
30 "authenticated-signed-writes";
31 // static
32 const char BluetoothGattCharacteristicClient::kFlagExtendedProperties[] =
33 "extended-properties";
34 // static
35 const char BluetoothGattCharacteristicClient::kFlagReliableWrite[] =
36 "reliable-write";
37 // static
38 const char BluetoothGattCharacteristicClient::kFlagWritableAuxiliaries[] =
39 "writable-auxiliaries";
40
16 BluetoothGattCharacteristicClient::Properties::Properties( 41 BluetoothGattCharacteristicClient::Properties::Properties(
17 dbus::ObjectProxy* object_proxy, 42 dbus::ObjectProxy* object_proxy,
18 const std::string& interface_name, 43 const std::string& interface_name,
19 const PropertyChangedCallback& callback) 44 const PropertyChangedCallback& callback)
20 : dbus::PropertySet(object_proxy, interface_name, callback) { 45 : dbus::PropertySet(object_proxy, interface_name, callback) {
21 RegisterProperty(bluetooth_gatt_characteristic::kUUIDProperty, &uuid); 46 RegisterProperty(bluetooth_gatt_characteristic::kUUIDProperty, &uuid);
22 RegisterProperty(bluetooth_gatt_characteristic::kServiceProperty, &service); 47 RegisterProperty(bluetooth_gatt_characteristic::kServiceProperty, &service);
23 RegisterProperty(bluetooth_gatt_characteristic::kValueProperty, &value); 48 RegisterProperty(bluetooth_gatt_characteristic::kValueProperty, &value);
24 RegisterProperty(bluetooth_gatt_characteristic::kFlagsProperty, &flags); 49 RegisterProperty(bluetooth_gatt_characteristic::kFlagsProperty, &flags);
25 } 50 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 174
150 BluetoothGattCharacteristicClient::~BluetoothGattCharacteristicClient() { 175 BluetoothGattCharacteristicClient::~BluetoothGattCharacteristicClient() {
151 } 176 }
152 177
153 // static 178 // static
154 BluetoothGattCharacteristicClient* BluetoothGattCharacteristicClient::Create() { 179 BluetoothGattCharacteristicClient* BluetoothGattCharacteristicClient::Create() {
155 return new BluetoothGattCharacteristicClientImpl(); 180 return new BluetoothGattCharacteristicClientImpl();
156 } 181 }
157 182
158 } // namespace chromeos 183 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698