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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc
diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f0846a880a137cde2ff91a4f097e5ca99211e1e9
--- /dev/null
+++ b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc
@@ -0,0 +1,71 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h"
+
+#include "third_party/cros_system_api/dbus/service_constants.h"
+
+namespace chromeos {
+
+FakeBluetoothGattDescriptorClient::Properties::Properties(
+ const PropertyChangedCallback& callback)
+ : BluetoothGattDescriptorClient::Properties(
+ NULL,
+ bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface,
+ callback) {
+}
+
+FakeBluetoothGattDescriptorClient::Properties::~Properties() {
+}
+
+void FakeBluetoothGattDescriptorClient::Properties::Get(
+ dbus::PropertyBase* property,
+ dbus::PropertySet::GetCallback callback) {
+ VLOG(1) << "Get " << property->name();
+ callback.Run(false);
+}
+
+void FakeBluetoothGattDescriptorClient::Properties::GetAll() {
+ VLOG(1) << "GetAll";
+}
+
+void FakeBluetoothGattDescriptorClient::Properties::Set(
+ dbus::PropertyBase* property,
+ dbus::PropertySet::SetCallback callback) {
+ VLOG(1) << "Get " << property->name();
+ callback.Run(false);
+
+ // TODO(armansito): Setting the "Value" property should be allowed based
+ // on permissions.
+}
+
+FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() {
+}
+
+FakeBluetoothGattDescriptorClient::~FakeBluetoothGattDescriptorClient() {
+}
+
+void FakeBluetoothGattDescriptorClient::Init(dbus::Bus* bus) {
+}
+
+void FakeBluetoothGattDescriptorClient::AddObserver(Observer* observer) {
+ observers_.AddObserver(observer);
+}
+
+void FakeBluetoothGattDescriptorClient::RemoveObserver(Observer* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+std::vector<dbus::ObjectPath>
+FakeBluetoothGattDescriptorClient::GetDescriptors() {
+ return std::vector<dbus::ObjectPath>();
+}
+
+FakeBluetoothGattDescriptorClient::Properties*
+FakeBluetoothGattDescriptorClient::GetProperties(
+ const dbus::ObjectPath& object_path) {
+ return NULL;
+}
+
+} // namespace chromeos
« 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