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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus_control.h ('k') | dbus_control_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus_control.cc
diff --git a/dbus_control.cc b/dbus_control.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e2a36bc47ece01f9d5af8063a22a3d5292daf6d6
--- /dev/null
+++ b/dbus_control.cc
@@ -0,0 +1,75 @@
+// Copyright (c) 2011 The Chromium OS 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 <stdio.h>
+#include <glib.h>
+
+#include <string>
+
+#include "shill/shill_event.h"
+#include "shill/dbus_control.h"
+#include "shill/dbus_control_int.h"
+
+namespace shill {
+
+#define SHILL_INTERFACE "org.chromium.shill."
+#define SHILL_PATH "/org/chromium/shill/"
+
+const char ManagerDBusProxy::kInterfaceName[] = SHILL_INTERFACE "Manager";
+const char ManagerDBusProxy::kPath[] = SHILL_PATH "Manager";
+const char ServiceDBusProxy::kInterfaceName[] = SHILL_INTERFACE "Service";
+const char ServiceDBusProxy::kPath[] = SHILL_PATH "Service";
+const char DeviceDBusProxy::kInterfaceName[] = SHILL_INTERFACE "Device";
+const char DeviceDBusProxy::kPath[] = SHILL_PATH "Device";
+
+void DBusProxy::SetProperty(const string& /* key */,
+ const string& /* val */) {
+ // Update property hash table, and output DBus signals, if requested
+}
+
+const string *DBusProxy::GetProperty(const string & /* key */) {
+ // FIXME(pstew): Should be doing a hash table lookup
+ return new string("value");
+}
+
+void DBusProxy::ClearProperty(const string & /* key */) {
+ // Remove entry from hash table
+}
+
+
+ManagerDBusProxy::ManagerDBusProxy(Manager *manager)
+ : interface_(kInterfaceName),
+ path_(kPath),
+ manager_(manager) {}
+
+void ManagerDBusProxy::UpdateRunning() {}
+
+ServiceDBusProxy::ServiceDBusProxy(Service *service)
+ : interface_(kInterfaceName),
+ path_(kPath),
+ service_(service) {}
+
+void ServiceDBusProxy::UpdateConnected() {}
+
+DeviceDBusProxy::DeviceDBusProxy(Device *device)
+ : interface_(kInterfaceName),
+ path_(kPath),
+ device_(device) {}
+
+void DeviceDBusProxy::UpdateEnabled() {}
+
+ManagerProxyInterface *DBusControl::CreateManagerProxy(Manager *manager) {
+ return new ManagerDBusProxy(manager);
+}
+
+ServiceProxyInterface *DBusControl::CreateServiceProxy(Service *service) {
+ return new ServiceDBusProxy(service);
+}
+
+DeviceProxyInterface *DBusControl::CreateDeviceProxy(Device *device) {
+ return new DeviceDBusProxy(device);
+}
+
+
+} // namespace shill
« 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