blob: 7a333a9e10a14c6562de72e291777f2e2dda1c9c [file] [log] [blame]
Darin Petkovbec79a22011-08-01 14:47:17 -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_MODEM_CDMA_PROXY_INTERFACE_
6#define SHILL_MODEM_CDMA_PROXY_INTERFACE_
7
Darin Petkovc408e692011-08-17 13:47:15 -07008#include <string>
9
Darin Petkovbec79a22011-08-01 14:47:17 -070010#include <base/basictypes.h>
11
12namespace shill {
13
14// These are the methods that a ModemManager.Modem.CDMA proxy must support. The
15// interface is provided so that it can be mocked in tests.
16class ModemCDMAProxyInterface {
17 public:
18 virtual ~ModemCDMAProxyInterface() {}
19
Darin Petkovc408e692011-08-17 13:47:15 -070020 virtual uint32 Activate(const std::string &carrier) = 0;
Darin Petkovbec79a22011-08-01 14:47:17 -070021 virtual void GetRegistrationState(uint32 *cdma_1x_state,
22 uint32 *evdo_state) = 0;
Darin Petkovd9661952011-08-03 16:25:42 -070023 virtual uint32 GetSignalQuality() = 0;
24};
25
26// ModemManager.Modem.CDMA signal listener to be associated with the proxy.
27class ModemCDMAProxyListener {
28 public:
29 virtual ~ModemCDMAProxyListener() {}
30
Darin Petkovb27e5442011-08-16 14:36:45 -070031 virtual void OnCDMAActivationStateChanged(
32 uint32 activation_state,
33 uint32 activation_error,
34 const DBusPropertiesMap &status_changes) = 0;
Darin Petkovd9661952011-08-03 16:25:42 -070035 virtual void OnCDMARegistrationStateChanged(uint32 state_1x,
36 uint32 state_evdo) = 0;
37 virtual void OnCDMASignalQualityChanged(uint32 strength) = 0;
Darin Petkovbec79a22011-08-01 14:47:17 -070038};
39
40} // namespace shill
41
42#endif // SHILL_MODEM_CDMA_PROXY_INTERFACE_