Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 1 | // 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 Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 10 | #include <base/basictypes.h> |
| 11 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 12 | namespace shill { |
| 13 | |
| 14 | // These are the functions that a Manager adaptor must support |
| 15 | class ManagerAdaptorInterface { |
| 16 | public: |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 17 | virtual ~ManagerAdaptorInterface() {} |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 18 | 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 Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | // These are the functions that a Service adaptor must support |
| 30 | class ServiceAdaptorInterface { |
| 31 | public: |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 32 | virtual ~ServiceAdaptorInterface() {} |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 33 | 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 Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 40 | }; |
| 41 | |
| 42 | // These are the functions that a Device adaptor must support |
| 43 | class DeviceAdaptorInterface { |
| 44 | public: |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 45 | virtual ~DeviceAdaptorInterface() {} |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 46 | |
| 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 Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | } // namespace shill |
| 57 | #endif // SHILL_ADAPTOR_INTERFACES_ |