blob: 6116e1924b9b2c4634c3ba25caeee96775ecb4e1 [file] [log] [blame]
Chris Masoned7732e42011-05-20 11:08:56 -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_ADAPTOR_INTERFACES_
6#define SHILL_ADAPTOR_INTERFACES_
7
8#include <string>
9
Chris Masoned0ceb8c2011-06-02 10:05:39 -070010#include <base/basictypes.h>
11
Chris Masoned7732e42011-05-20 11:08:56 -070012namespace shill {
13
14// These are the functions that a Manager adaptor must support
15class ManagerAdaptorInterface {
16 public:
Chris Masoned7732e42011-05-20 11:08:56 -070017 virtual ~ManagerAdaptorInterface() {}
Chris Masoned0ceb8c2011-06-02 10:05:39 -070018 virtual void UpdateRunning() = 0;
19
20 virtual void EmitBoolChanged(const std::string& name, bool value) = 0;
21 virtual void EmitUintChanged(const std::string& name, uint32 value) = 0;
22 virtual void EmitIntChanged(const std::string& name, int value) = 0;
23 virtual void EmitStringChanged(const std::string& name,
24 const std::string& value) = 0;
25
26 virtual void EmitStateChanged(const std::string& new_state) = 0;
Chris Masoned7732e42011-05-20 11:08:56 -070027};
28
29// These are the functions that a Service adaptor must support
30class ServiceAdaptorInterface {
31 public:
Chris Masoned7732e42011-05-20 11:08:56 -070032 virtual ~ServiceAdaptorInterface() {}
Chris Masoned0ceb8c2011-06-02 10:05:39 -070033 virtual void UpdateConnected() = 0;
34
35 virtual void EmitBoolChanged(const std::string& name, bool value) = 0;
36 virtual void EmitUintChanged(const std::string& name, uint32 value) = 0;
37 virtual void EmitIntChanged(const std::string& name, int value) = 0;
38 virtual void EmitStringChanged(const std::string& name,
39 const std::string& value) = 0;
Chris Masoned7732e42011-05-20 11:08:56 -070040};
41
42// These are the functions that a Device adaptor must support
43class DeviceAdaptorInterface {
44 public:
Chris Masoned7732e42011-05-20 11:08:56 -070045 virtual ~DeviceAdaptorInterface() {}
Chris Masoned0ceb8c2011-06-02 10:05:39 -070046
47 virtual void UpdateEnabled() = 0;
48
49 virtual void EmitBoolChanged(const std::string& name, bool value) = 0;
50 virtual void EmitUintChanged(const std::string& name, uint32 value) = 0;
51 virtual void EmitIntChanged(const std::string& name, int value) = 0;
52 virtual void EmitStringChanged(const std::string& name,
53 const std::string& value) = 0;
Chris Masoned7732e42011-05-20 11:08:56 -070054};
55
56} // namespace shill
57#endif // SHILL_ADAPTOR_INTERFACES_