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

Side by Side Diff: device/bluetooth/bluetooth_local_gatt_characteristic_bluez.cc

Issue 1872943002: Add support for local services/characteristics/descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
ortuno 2016/04/14 17:42:35 It's 2016!
rkc 2016/04/14 19:27:27 That is true. A whole two years after 2014. Gosh,
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "device/bluetooth/bluetooth_local_gatt_characteristic_bluez.h"
6
7 #include "base/logging.h"
8 #include "device/bluetooth/bluetooth_adapter_bluez.h"
9 #include "device/bluetooth/bluetooth_gatt_descriptor_bluez.h"
10 #include "device/bluetooth/bluetooth_local_gatt_service_bluez.h"
11 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
12 #include "third_party/cros_system_api/dbus/service_constants.h"
13
14 namespace bluez {
15
16 BluetoothLocalGattCharacteristicBlueZ::BluetoothLocalGattCharacteristicBlueZ(
17 BluetoothLocalGattServiceBlueZ* service,
18 const dbus::ObjectPath& object_path)
19 : BluetoothGattCharacteristicBlueZ(service, object_path),
20 weak_ptr_factory_(this) {
21 VLOG(1) << "Creating local GATT characteristic with identifier: "
22 << GetIdentifier() << ", UUID: " << GetUUID().canonical_value();
23 }
24
25 BluetoothLocalGattCharacteristicBlueZ::
26 ~BluetoothLocalGattCharacteristicBlueZ() {}
27
28 device::BluetoothUUID BluetoothLocalGattCharacteristicBlueZ::GetUUID() const {
29 NOTIMPLEMENTED();
30 return device::BluetoothUUID();
31 }
32
33 bool BluetoothLocalGattCharacteristicBlueZ::IsLocal() const {
34 return true;
35 }
36
37 const std::vector<uint8_t>& BluetoothLocalGattCharacteristicBlueZ::GetValue()
38 const {
39 NOTIMPLEMENTED();
40 static std::vector<uint8_t> temp;
ortuno 2016/04/14 17:42:35 I thought we tried to avoid static because of the
rkc 2016/04/14 19:27:27 This class is not being constructed, let alone des
ortuno 2016/04/14 21:17:38 I'm thinking of this part of the style guide: http
rkc 2016/04/14 21:59:38 This doesn't really violate the spirit of the rule
41 return temp;
42 }
43
44 bool BluetoothLocalGattCharacteristicBlueZ::AddDescriptor(
45 device::BluetoothGattDescriptor* descriptor) {
46 NOTIMPLEMENTED();
47 return false;
48 }
49
50 device::BluetoothGattCharacteristic::Properties
51 BluetoothLocalGattCharacteristicBlueZ::GetProperties() const {
52 NOTIMPLEMENTED();
53 return PROPERTY_NONE;
54 }
55
56 bool BluetoothLocalGattCharacteristicBlueZ::IsNotifying() const {
57 NOTIMPLEMENTED();
58 return false;
59 }
60
61 bool BluetoothLocalGattCharacteristicBlueZ::UpdateValue(
62 const std::vector<uint8_t>& value) {
63 NOTIMPLEMENTED();
64 return false;
65 }
66
67 void BluetoothLocalGattCharacteristicBlueZ::StartNotifySession(
68 const NotifySessionCallback& callback,
69 const ErrorCallback& error_callback) {
70 // Doesn't apply for a local characteristic.
ortuno 2016/04/14 17:42:35 Please choose a pattern a follow it throughout: 1
rkc 2016/04/14 19:27:27 I didn't change the code in the remote service Reg
ortuno 2016/04/14 21:17:38 nit: I understand the argument about the refactori
rkc 2016/04/14 21:59:38 Once I start implementing this class, I will have
71 NOTIMPLEMENTED();
72 }
73
74 void BluetoothLocalGattCharacteristicBlueZ::ReadRemoteCharacteristic(
75 const ValueCallback& callback,
76 const ErrorCallback& error_callback) {
77 // Doesn't apply for a local characteristic.
78 NOTIMPLEMENTED();
79 }
80
81 void BluetoothLocalGattCharacteristicBlueZ::WriteRemoteCharacteristic(
82 const std::vector<uint8_t>& new_value,
83 const base::Closure& callback,
84 const ErrorCallback& error_callback) {
85 // Doesn't apply for a local characteristic.
86 NOTIMPLEMENTED();
87 }
88
89 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698