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

Unified Diff: control_interface.h

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 | « SConstruct ('k') | dbus_control.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: control_interface.h
diff --git a/control_interface.h b/control_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..5871f2ea5b68d914aafc1b67cc176dd6fe9fb39f
--- /dev/null
+++ b/control_interface.h
@@ -0,0 +1,59 @@
+// 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_CONTROL_INTERFACE_
+#define SHILL_CONTROL_INTERFACE_
+
+#include <string>
+
+namespace shill {
+
+class Manager;
+class Service;
+class Device;
+
+using std::string;
+
+// This is the Inteface for "partner" objects which are in charge of
+// RPC to the various core classes.
+class ProxyInterface {
+ public:
+ virtual void SetProperty(const string &key, const string &value) = 0;
+ virtual const string *GetProperty(const string &key) = 0;
+ virtual void ClearProperty(const string &key) = 0;
+ virtual ~ProxyInterface() {}
+};
+
+// These are the functions that a Manager proxy must support
+class ManagerProxyInterface {
+ public:
+ virtual void UpdateRunning() = 0;
+ virtual ~ManagerProxyInterface() {}
+};
+
+// These are the functions that a Manager proxy must support
+class ServiceProxyInterface {
+ public:
+ virtual void UpdateConnected() = 0;
+ virtual ~ServiceProxyInterface() {}
+};
+
+// These are the functions that a Manager proxy must support
+class DeviceProxyInterface {
+ public:
+ virtual void UpdateEnabled() = 0;
+ virtual ~DeviceProxyInterface() {}
+};
+
+// This is the Interface for an object factory that creates proxy objects
+class ControlInterface {
+ public:
+ virtual ManagerProxyInterface *CreateManagerProxy(Manager *manager) = 0;
+ virtual ServiceProxyInterface *CreateServiceProxy(Service *service) = 0;
+ virtual DeviceProxyInterface *CreateDeviceProxy(Device *device) = 0;
+ virtual ~ControlInterface() {}
+};
+
+} // namespace shill
+#endif // SHILL_CONTROL_INTERFACE_
« no previous file with comments | « SConstruct ('k') | dbus_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698