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

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

Issue 206443009: chromeos/dbus: Add fake D-Bus clients for GATT client-mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h"
6
7 #include "third_party/cros_system_api/dbus/service_constants.h"
8
9 namespace chromeos {
10
11 FakeBluetoothGattDescriptorClient::Properties::Properties(
12 const PropertyChangedCallback& callback)
13 : BluetoothGattDescriptorClient::Properties(
14 NULL,
15 bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface,
16 callback) {
17 }
18
19 FakeBluetoothGattDescriptorClient::Properties::~Properties() {
20 }
21
22 void FakeBluetoothGattDescriptorClient::Properties::Get(
23 dbus::PropertyBase* property,
24 dbus::PropertySet::GetCallback callback) {
25 VLOG(1) << "Get " << property->name();
26 callback.Run(false);
27 }
28
29 void FakeBluetoothGattDescriptorClient::Properties::GetAll() {
30 VLOG(1) << "GetAll";
31 }
32
33 void FakeBluetoothGattDescriptorClient::Properties::Set(
34 dbus::PropertyBase* property,
35 dbus::PropertySet::SetCallback callback) {
36 VLOG(1) << "Get " << property->name();
37 callback.Run(false);
38
39 // TODO(armansito): Setting the "Value" property should be allowed based
40 // on permissions.
41 }
42
43 FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() {
44 }
45
46 FakeBluetoothGattDescriptorClient::~FakeBluetoothGattDescriptorClient() {
47 }
48
49 void FakeBluetoothGattDescriptorClient::Init(dbus::Bus* bus) {
50 }
51
52 void FakeBluetoothGattDescriptorClient::AddObserver(Observer* observer) {
53 observers_.AddObserver(observer);
54 }
55
56 void FakeBluetoothGattDescriptorClient::RemoveObserver(Observer* observer) {
57 observers_.RemoveObserver(observer);
58 }
59
60 std::vector<dbus::ObjectPath>
61 FakeBluetoothGattDescriptorClient::GetDescriptors() {
62 return std::vector<dbus::ObjectPath>();
63 }
64
65 FakeBluetoothGattDescriptorClient::Properties*
66 FakeBluetoothGattDescriptorClient::GetProperties(
67 const dbus::ObjectPath& object_path) {
68 return NULL;
69 }
70
71 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h ('k') | chromeos/dbus/fake_bluetooth_gatt_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698