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

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

Powered by Google App Engine
This is Rietveld 408576698