Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 1 | // Copyright (c) 2012 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_MM1_MODEM_MODEMCDMA_PROXY_INTERFACE_ |
| 6 | #define SHILL_MM1_MODEM_MODEMCDMA_PROXY_INTERFACE_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 12 | #include "shill/callbacks.h" |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 13 | |
| 14 | namespace shill { |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 15 | class Error; |
| 16 | |
| 17 | namespace mm1 { |
| 18 | |
| 19 | // These are the methods that a |
| 20 | // org.freedesktop.ModemManager1.Modem.ModemCdma proxy must support. |
| 21 | // The interface is provided so that it can be mocked in tests. All |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 22 | // calls are made asynchronously. Call completion is signalled via |
| 23 | // the callbacks passed to the methods. |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 24 | class ModemModemCdmaProxyInterface { |
| 25 | public: |
| 26 | virtual ~ModemModemCdmaProxyInterface() {} |
| 27 | |
| 28 | virtual void Activate(const std::string &carrier, |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 29 | Error *error, |
| 30 | const ResultCallback &callback, |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 31 | int timeout) = 0; |
| 32 | virtual void ActivateManual( |
| 33 | const DBusPropertiesMap &properties, |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 34 | Error *error, |
| 35 | const ResultCallback &callback, |
| 36 | int timeout) = 0; |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 37 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 38 | virtual void set_activation_state_callback( |
| 39 | const ActivationStateSignalCallback &callback) = 0; |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 40 | |
| 41 | // Properties. |
| 42 | virtual std::string Meid() = 0; |
| 43 | virtual std::string Esn() = 0; |
| 44 | virtual uint32_t Sid() = 0; |
| 45 | virtual uint32_t Nid() = 0; |
| 46 | virtual uint32_t Cdma1xRegistrationState() = 0; |
| 47 | virtual uint32_t EvdoRegistrationState() = 0; |
| 48 | }; |
| 49 | |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 50 | } // namespace mm1 |
| 51 | } // namespace shill |
| 52 | |
| 53 | #endif // SHILL_MM1_MODEM_MODEMCDMA_PROXY_INTERFACE_ |