Darin Petkov | bec79a2 | 2011-08-01 14:47:17 -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_CDMA_PROXY_INTERFACE_ |
| 6 | #define SHILL_MODEM_CDMA_PROXY_INTERFACE_ |
| 7 | |
| 8 | #include <base/basictypes.h> |
| 9 | |
| 10 | namespace shill { |
| 11 | |
| 12 | // These are the methods that a ModemManager.Modem.CDMA proxy must support. The |
| 13 | // interface is provided so that it can be mocked in tests. |
| 14 | class ModemCDMAProxyInterface { |
| 15 | public: |
| 16 | virtual ~ModemCDMAProxyInterface() {} |
| 17 | |
| 18 | virtual void GetRegistrationState(uint32 *cdma_1x_state, |
| 19 | uint32 *evdo_state) = 0; |
Darin Petkov | d966195 | 2011-08-03 16:25:42 -0700 | [diff] [blame] | 20 | |
| 21 | virtual uint32 GetSignalQuality() = 0; |
| 22 | }; |
| 23 | |
| 24 | // ModemManager.Modem.CDMA signal listener to be associated with the proxy. |
| 25 | class ModemCDMAProxyListener { |
| 26 | public: |
| 27 | virtual ~ModemCDMAProxyListener() {} |
| 28 | |
Darin Petkov | b27e544 | 2011-08-16 14:36:45 -0700 | [diff] [blame] | 29 | virtual void OnCDMAActivationStateChanged( |
| 30 | uint32 activation_state, |
| 31 | uint32 activation_error, |
| 32 | const DBusPropertiesMap &status_changes) = 0; |
Darin Petkov | d966195 | 2011-08-03 16:25:42 -0700 | [diff] [blame] | 33 | virtual void OnCDMARegistrationStateChanged(uint32 state_1x, |
| 34 | uint32 state_evdo) = 0; |
| 35 | virtual void OnCDMASignalQualityChanged(uint32 strength) = 0; |
Darin Petkov | bec79a2 | 2011-08-01 14:47:17 -0700 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace shill |
| 39 | |
| 40 | #endif // SHILL_MODEM_CDMA_PROXY_INTERFACE_ |