Chromium Code Reviews| 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 |
|
Sam Leffler
2011/03/11 01:30:42
s/Manager/Service/
|
| +class ServiceProxyInterface { |
| + public: |
| + virtual void UpdateConnected() = 0; |
| + virtual ~ServiceProxyInterface() {} |
| +}; |
| + |
| +// These are the functions that a Manager proxy must support |
|
Sam Leffler
2011/03/11 01:30:42
s/Manager/Device/
|
| +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_ |