Darin Petkov | e9d12e0 | 2011-07-27 15:09:37 -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_MODEM_PROXY_INTERFACE_ |
| 6 | #define SHILL_MODEM_PROXY_INTERFACE_ |
| 7 | |
Darin Petkov | ceb6817 | 2011-07-29 14:47:48 -0700 | [diff] [blame] | 8 | #include <dbus-c++/types.h> |
| 9 | |
Darin Petkov | e9d12e0 | 2011-07-27 15:09:37 -0700 | [diff] [blame] | 10 | namespace shill { |
| 11 | |
| 12 | // These are the methods that a ModemManager.Modem proxy must support. The |
| 13 | // interface is provided so that it can be mocked in tests. |
| 14 | class ModemProxyInterface { |
| 15 | public: |
Darin Petkov | ceb6817 | 2011-07-29 14:47:48 -0700 | [diff] [blame] | 16 | typedef DBus::Struct<std::string, std::string, std::string> Info; |
| 17 | |
Darin Petkov | e9d12e0 | 2011-07-27 15:09:37 -0700 | [diff] [blame] | 18 | virtual ~ModemProxyInterface() {} |
| 19 | |
| 20 | virtual void Enable(const bool enable) = 0; |
Darin Petkov | ceb6817 | 2011-07-29 14:47:48 -0700 | [diff] [blame] | 21 | virtual Info GetInfo() = 0; |
Darin Petkov | e9d12e0 | 2011-07-27 15:09:37 -0700 | [diff] [blame] | 22 | }; |
| 23 | |
Darin Petkov | c5f5656 | 2011-08-06 16:40:05 -0700 | [diff] [blame] | 24 | // ModemManager.Modem signal listener to be associated with the proxy. |
| 25 | class ModemProxyListener { |
| 26 | public: |
| 27 | virtual ~ModemProxyListener() {} |
| 28 | |
| 29 | virtual void OnModemStateChanged(uint32 old_state, |
| 30 | uint32 new_state, |
| 31 | uint32 reason) = 0; |
| 32 | }; |
| 33 | |
Darin Petkov | e9d12e0 | 2011-07-27 15:09:37 -0700 | [diff] [blame] | 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_MODEM_PROXY_INTERFACE_ |