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

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

Issue 980973003: apmanager: Add dbus implementation to chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change struct into class Created 5 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
« no previous file with comments | « chromeos/dbus/fake_ap_manager_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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_ap_manager_client.h"
6
7 #include "base/message_loop/message_loop.h"
8
9 namespace chromeos {
10
11 namespace {
12 void ObjectPathDBBusMethodCallbackThunk(
13 const ObjectPathDBusMethodCallback& callback) {
14 callback.Run(DBUS_METHOD_CALL_SUCCESS, dbus::ObjectPath());
15 }
16
17 void VoidDBBusMethodCallbackThunk(const VoidDBusMethodCallback& callback) {
18 callback.Run(DBUS_METHOD_CALL_SUCCESS);
19 }
20 } // namespace
21
22 FakeApManagerClient::FakeApManagerClient() {
23 }
24
25 FakeApManagerClient::~FakeApManagerClient() {
26 }
27
28 void FakeApManagerClient::Init(dbus::Bus* bus) {
29 }
30
31 void FakeApManagerClient::AddObserver(Observer* observer) {
32 }
33
34 void FakeApManagerClient::RemoveObserver(Observer* observer) {
35 }
36
37 void FakeApManagerClient::CreateService(
38 const ObjectPathDBusMethodCallback& callback) {
39 base::MessageLoop::current()->PostTask(
40 FROM_HERE, base::Bind(&ObjectPathDBBusMethodCallbackThunk, callback));
41 }
42
43 void FakeApManagerClient::RemoveService(
44 const dbus::ObjectPath& object_path,
45 const VoidDBusMethodCallback& callback) {
46 base::MessageLoop::current()->PostTask(
47 FROM_HERE, base::Bind(&VoidDBBusMethodCallbackThunk, callback));
48 }
49
50 void FakeApManagerClient::StartService(const dbus::ObjectPath& object_path,
51 const VoidDBusMethodCallback& callback) {
52 base::MessageLoop::current()->PostTask(
53 FROM_HERE, base::Bind(&VoidDBBusMethodCallbackThunk, callback));
54 }
55
56 void FakeApManagerClient::StopService(const dbus::ObjectPath& object_path,
57 const VoidDBusMethodCallback& callback) {
58 base::MessageLoop::current()->PostTask(
59 FROM_HERE, base::Bind(&VoidDBBusMethodCallbackThunk, callback));
60 }
61
62 ApManagerClient::ConfigProperties* FakeApManagerClient::GetConfigProperties(
63 const dbus::ObjectPath& object_path) {
64 return nullptr;
65 }
66
67 const ApManagerClient::DeviceProperties*
68 FakeApManagerClient::GetDeviceProperties(const dbus::ObjectPath& object_path) {
69 return nullptr;
70 }
71
72 const ApManagerClient::ServiceProperties*
73 FakeApManagerClient::GetServiceProperties(const dbus::ObjectPath& object_path) {
74 return nullptr;
75 }
76
77 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_ap_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698