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

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

Issue 1898643002: Refactor device::BluetoothGattXXX classes to split into remote/local. (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 2016 The Chromium Authors. All rights reserved.
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 <string>
8
9 #include "base/callback_forward.h"
10 #include "base/logging.h"
11 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
12 #include "device/bluetooth/bluetooth_gatt_descriptor.h"
13 #include "device/bluetooth/bluetooth_local_gatt_service_bluez.h"
14
15 namespace bluez {
16
17 BluetoothLocalGattCharacteristicBlueZ::BluetoothLocalGattCharacteristicBlueZ(
18 BluetoothLocalGattServiceBlueZ* service,
19 const dbus::ObjectPath& object_path)
20 : BluetoothGattCharacteristicBlueZ(service, object_path),
21 weak_ptr_factory_(this) {
22 VLOG(1) << "Creating local GATT characteristic with identifier: "
23 << GetIdentifier() << ", UUID: " << GetUUID().canonical_value();
24 }
25
26 BluetoothLocalGattCharacteristicBlueZ::
27 ~BluetoothLocalGattCharacteristicBlueZ() {}
28
29 device::BluetoothUUID BluetoothLocalGattCharacteristicBlueZ::GetUUID() const {
30 NOTIMPLEMENTED();
31 return device::BluetoothUUID();
32 }
33
34 bool BluetoothLocalGattCharacteristicBlueZ::IsLocal() const {
35 return true;
36 }
37
38 const std::vector<uint8_t>& BluetoothLocalGattCharacteristicBlueZ::GetValue()
39 const {
40 NOTIMPLEMENTED();
41 static std::vector<uint8_t>* temp = new std::vector<uint8_t>;
42 return *temp;
43 }
44
45 bool BluetoothLocalGattCharacteristicBlueZ::AddDescriptor(
46 device::BluetoothGattDescriptor* descriptor) {
47 NOTIMPLEMENTED();
48 return false;
49 }
50
51 device::BluetoothGattCharacteristic::Properties
52 BluetoothLocalGattCharacteristicBlueZ::GetProperties() const {
53 NOTIMPLEMENTED();
54 return PROPERTY_NONE;
55 }
56
57 bool BluetoothLocalGattCharacteristicBlueZ::IsNotifying() const {
58 NOTIMPLEMENTED();
59 return false;
60 }
61
62 bool BluetoothLocalGattCharacteristicBlueZ::UpdateValue(
63 const std::vector<uint8_t>& value) {
64 NOTIMPLEMENTED();
65 return false;
66 }
67
68 void BluetoothLocalGattCharacteristicBlueZ::StartNotifySession(
69 const NotifySessionCallback& callback,
70 const ErrorCallback& error_callback) {
71 // Doesn't apply for a local characteristic.
72 NOTIMPLEMENTED();
73 }
74
75 void BluetoothLocalGattCharacteristicBlueZ::ReadRemoteCharacteristic(
76 const ValueCallback& callback,
77 const ErrorCallback& error_callback) {
78 // Doesn't apply for a local characteristic.
79 NOTIMPLEMENTED();
80 }
81
82 void BluetoothLocalGattCharacteristicBlueZ::WriteRemoteCharacteristic(
83 const std::vector<uint8_t>& new_value,
84 const base::Closure& callback,
85 const ErrorCallback& error_callback) {
86 // Doesn't apply for a local characteristic.
87 NOTIMPLEMENTED();
88 }
89
90 } // namespace bluez
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_characteristic_bluez.h ('k') | device/bluetooth/bluetooth_local_gatt_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698