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

Side by Side Diff: dbus_control.cc

Issue 6575006: Add initial sketch to shill repository (Closed) Base URL: ssh://git@gitrw.chromium.org/shill.git@master
Patch Set: A few object renames and pointer conversions Created 9 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
« no previous file with comments | « dbus_control.h ('k') | dbus_control_int.h » ('j') | 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 (c) 2011 The Chromium OS 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 <stdio.h>
6 #include <glib.h>
7
8 #include <string>
9
10 #include "shill/shill_event.h"
11 #include "shill/dbus_control.h"
12 #include "shill/dbus_control_int.h"
13
14 namespace shill {
15
16 #define SHILL_INTERFACE "org.chromium.shill."
17 #define SHILL_PATH "/org/chromium/shill/"
18
19 const char ManagerDBusProxy::kInterfaceName[] = SHILL_INTERFACE "Manager";
20 const char ManagerDBusProxy::kPath[] = SHILL_PATH "Manager";
21 const char ServiceDBusProxy::kInterfaceName[] = SHILL_INTERFACE "Service";
22 const char ServiceDBusProxy::kPath[] = SHILL_PATH "Service";
23 const char DeviceDBusProxy::kInterfaceName[] = SHILL_INTERFACE "Device";
24 const char DeviceDBusProxy::kPath[] = SHILL_PATH "Device";
25
26 void DBusProxy::SetProperty(const string& /* key */,
27 const string& /* val */) {
28 // Update property hash table, and output DBus signals, if requested
29 }
30
31 const string *DBusProxy::GetProperty(const string & /* key */) {
32 // FIXME(pstew): Should be doing a hash table lookup
33 return new string("value");
34 }
35
36 void DBusProxy::ClearProperty(const string & /* key */) {
37 // Remove entry from hash table
38 }
39
40
41 ManagerDBusProxy::ManagerDBusProxy(Manager *manager)
42 : interface_(kInterfaceName),
43 path_(kPath),
44 manager_(manager) {}
45
46 void ManagerDBusProxy::UpdateRunning() {}
47
48 ServiceDBusProxy::ServiceDBusProxy(Service *service)
49 : interface_(kInterfaceName),
50 path_(kPath),
51 service_(service) {}
52
53 void ServiceDBusProxy::UpdateConnected() {}
54
55 DeviceDBusProxy::DeviceDBusProxy(Device *device)
56 : interface_(kInterfaceName),
57 path_(kPath),
58 device_(device) {}
59
60 void DeviceDBusProxy::UpdateEnabled() {}
61
62 ManagerProxyInterface *DBusControl::CreateManagerProxy(Manager *manager) {
63 return new ManagerDBusProxy(manager);
64 }
65
66 ServiceProxyInterface *DBusControl::CreateServiceProxy(Service *service) {
67 return new ServiceDBusProxy(service);
68 }
69
70 DeviceProxyInterface *DBusControl::CreateDeviceProxy(Device *device) {
71 return new DeviceDBusProxy(device);
72 }
73
74
75 } // namespace shill
OLDNEW
« no previous file with comments | « dbus_control.h ('k') | dbus_control_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698