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

Unified Diff: dbus_control_int.h

Issue 6575006: Add initial sketch to shill repository (Closed) Base URL: ssh://git@gitrw.chromium.org/shill.git@master
Patch Set: Add device and service mockups Created 9 years, 10 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: dbus_control_int.h
diff --git a/dbus_control_int.h b/dbus_control_int.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e35f9a5b898996117ed295a503205a44d978521
--- /dev/null
+++ b/dbus_control_int.h
@@ -0,0 +1,69 @@
+// 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.
+
+#ifndef SHILL_DBUS_CONTROL_INT_H_
+#define SHILL_DBUS_CONTROL_INT_
+
+#include <string>
+
+namespace shill {
+
+// Superclass for all DBus-backed Proxy objects
+class DBusProxy : public ProxyInterface {
+ public:
+ void SetProperty(const string &key, const string &value);
+ const string *GetProperty(const string &key);
+ void ClearProperty(const string &key);
+
+ protected:
+ string interface_;
+ string path_;
+};
+
+class DBusControl;
+
+// Subclass of DBusProxy for Manager objects
+class DBusManagerProxy : protected DBusProxy, public ManagerProxyInterface {
Chris Masone 2011/03/10 18:44:15 I might name these things differently to make it c
+ public:
+ explicit DBusManagerProxy(Manager *manager);
+ void UpdateRunning();
+
+ private:
+ static const char kInterfaceName[];
+ static const char kPath[];
+ string interface_;
+ string path_;
+ Manager *manager_;
+};
+
+// Subclass of DBusProxy for Service objects
+class DBusServiceProxy : protected DBusProxy, public ServiceProxyInterface {
+ public:
+ explicit DBusServiceProxy(Service *service);
+ void UpdateConnected();
+
+ private:
+ static const char kInterfaceName[];
+ static const char kPath[];
+ string interface_;
+ string path_;
+ Service *service_;
+};
+
+// Subclass of DBusProxy for Device objects
+class DBusDeviceProxy : protected DBusProxy, public DeviceProxyInterface {
+ public:
+ explicit DBusDeviceProxy(Device *device);
+ void UpdateEnabled();
+
+ private:
+ static const char kInterfaceName[];
+ static const char kPath[];
+ string interface_;
+ string path_;
+ Device *device_;
+};
+
+} // namespace shill
+#endif // SHILL_DBUS_CONTROL_INT_

Powered by Google App Engine
This is Rietveld 408576698