Darin Petkov | a1e0a1c | 2011-08-25 15:08:33 -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_GSM_NETWORK_PROXY_INTERFACE_ |
| 6 | #define SHILL_MODEM_GSM_NETWORK_PROXY_INTERFACE_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
Darin Petkov | 9bac6fe | 2011-08-26 12:49:05 -0700 | [diff] [blame^] | 11 | #include <dbus-c++/types.h> |
Darin Petkov | a1e0a1c | 2011-08-25 15:08:33 -0700 | [diff] [blame] | 12 | |
| 13 | namespace 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. |
| 17 | class ModemGSMNetworkProxyInterface { |
| 18 | public: |
Darin Petkov | 9bac6fe | 2011-08-26 12:49:05 -0700 | [diff] [blame^] | 19 | typedef DBus::Struct<uint32, std::string, std::string> RegistrationInfo; |
| 20 | |
Darin Petkov | a1e0a1c | 2011-08-25 15:08:33 -0700 | [diff] [blame] | 21 | virtual ~ModemGSMNetworkProxyInterface() {} |
| 22 | |
| 23 | virtual void Register(const std::string &network_id) = 0; |
Darin Petkov | 9bac6fe | 2011-08-26 12:49:05 -0700 | [diff] [blame^] | 24 | virtual RegistrationInfo GetRegistrationInfo() = 0; |
| 25 | |
| 26 | // Properties. |
| 27 | virtual uint32 AccessTechnology() = 0; |
Darin Petkov | a1e0a1c | 2011-08-25 15:08:33 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | // ModemManager.Modem.Gsm.Network signal listener to be associated with the |
| 31 | // proxy. |
| 32 | class 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_ |