blob: 5871f2ea5b68d914aafc1b67cc176dd6fe9fb39f [file] [log] [blame]
Paul Stewart75897df2011-04-27 09:05:53 -07001// 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#ifndef SHILL_CONTROL_INTERFACE_
6#define SHILL_CONTROL_INTERFACE_
7
8#include <string>
9
10namespace shill {
11
12class Manager;
13class Service;
14class Device;
15
16using std::string;
17
18// This is the Inteface for "partner" objects which are in charge of
19// RPC to the various core classes.
20class ProxyInterface {
21 public:
22 virtual void SetProperty(const string &key, const string &value) = 0;
23 virtual const string *GetProperty(const string &key) = 0;
24 virtual void ClearProperty(const string &key) = 0;
25 virtual ~ProxyInterface() {}
26};
27
28// These are the functions that a Manager proxy must support
29class ManagerProxyInterface {
30 public:
31 virtual void UpdateRunning() = 0;
32 virtual ~ManagerProxyInterface() {}
33};
34
35// These are the functions that a Manager proxy must support
36class ServiceProxyInterface {
37 public:
38 virtual void UpdateConnected() = 0;
39 virtual ~ServiceProxyInterface() {}
40};
41
42// These are the functions that a Manager proxy must support
43class DeviceProxyInterface {
44 public:
45 virtual void UpdateEnabled() = 0;
46 virtual ~DeviceProxyInterface() {}
47};
48
49// This is the Interface for an object factory that creates proxy objects
50class ControlInterface {
51 public:
52 virtual ManagerProxyInterface *CreateManagerProxy(Manager *manager) = 0;
53 virtual ServiceProxyInterface *CreateServiceProxy(Service *service) = 0;
54 virtual DeviceProxyInterface *CreateDeviceProxy(Device *device) = 0;
55 virtual ~ControlInterface() {}
56};
57
58} // namespace shill
59#endif // SHILL_CONTROL_INTERFACE_