blob: a461d46cf9ecd7e50cc52ce0e41e7123b69e9e48 [file] [log] [blame]
Darin Petkova1e0a1c2011-08-25 15:08:33 -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_GSM_NETWORK_PROXY_INTERFACE_
6#define SHILL_MODEM_GSM_NETWORK_PROXY_INTERFACE_
7
8#include <string>
9
10#include <base/basictypes.h>
Darin Petkov9bac6fe2011-08-26 12:49:05 -070011#include <dbus-c++/types.h>
Darin Petkova1e0a1c2011-08-25 15:08:33 -070012
13namespace shill {
14
15// These are the methods that a ModemManager.Modem.Gsm.Network proxy must
16// support. The interface is provided so that it can be mocked in tests.
17class ModemGSMNetworkProxyInterface {
18 public:
Darin Petkov9bac6fe2011-08-26 12:49:05 -070019 typedef DBus::Struct<uint32, std::string, std::string> RegistrationInfo;
20
Darin Petkova1e0a1c2011-08-25 15:08:33 -070021 virtual ~ModemGSMNetworkProxyInterface() {}
22
23 virtual void Register(const std::string &network_id) = 0;
Darin Petkov9bac6fe2011-08-26 12:49:05 -070024 virtual RegistrationInfo GetRegistrationInfo() = 0;
25
26 // Properties.
27 virtual uint32 AccessTechnology() = 0;
Darin Petkova1e0a1c2011-08-25 15:08:33 -070028};
29
30// ModemManager.Modem.Gsm.Network signal listener to be associated with the
31// proxy.
32class ModemGSMNetworkProxyListener {
33 public:
34 virtual ~ModemGSMNetworkProxyListener() {}
35
36 virtual void OnGSMNetworkModeChanged(uint32 mode) = 0;
37 virtual void OnGSMRegistrationInfoChanged(
38 uint32 status,
39 const std::string &operator_code,
40 const std::string &operator_name) = 0;
41 virtual void OnGSMSignalQualityChanged(uint32 quality) = 0;
42};
43
44} // namespace shill
45
46#endif // SHILL_MODEM_GSM_NETWORK_PROXY_INTERFACE_