blob: 3329b7b5a00c41213d790603aeb36950d65640e7 [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHILL_MODEM_CDMA_PROXY_INTERFACE_
#define SHILL_MODEM_CDMA_PROXY_INTERFACE_
#include <string>
#include <base/basictypes.h>
#include "shill/dbus_properties.h"
namespace shill {
class AsyncCallHandler;
class Error;
// These are the methods that a ModemManager.Modem.CDMA proxy must support.
// The interface is provided so that it can be mocked in tests.
// All calls are made asynchronously. Call completion is signalled through
// the corresponding 'OnXXXCallback' method in the ProxyDelegate interface.
class ModemCDMAProxyInterface {
public:
virtual ~ModemCDMAProxyInterface() {}
virtual void Activate(const std::string &carrier,
AsyncCallHandler *call_handler, int timeout) = 0;
virtual void GetRegistrationState(uint32 *cdma_1x_state,
uint32 *evdo_state) = 0;
virtual uint32 GetSignalQuality() = 0;
// Properties.
virtual const std::string MEID() = 0;
};
// ModemManager.Modem.CDMA signal delegate to be associated with the proxy.
class ModemCDMAProxyDelegate {
public:
virtual ~ModemCDMAProxyDelegate() {}
virtual void OnCDMAActivationStateChanged(
uint32 activation_state,
uint32 activation_error,
const DBusPropertiesMap &status_changes) = 0;
virtual void OnCDMARegistrationStateChanged(uint32 state_1x,
uint32 state_evdo) = 0;
virtual void OnCDMASignalQualityChanged(uint32 strength) = 0;
virtual void OnActivateCallback(uint32 status, const Error &error,
AsyncCallHandler *call_handler) = 0;
};
} // namespace shill
#endif // SHILL_MODEM_CDMA_PROXY_INTERFACE_