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_SIMPLE_PROXY_INTERFACE_ |
| 6 | #define SHILL_MM1_MODEM_SIMPLE_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.Simple proxy must support. The |
| 21 | // interface is provided so that it can be mocked in tests. All calls |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 22 | // are made asynchronously. Call completion is signalled via the callbacks |
| 23 | // passed to the methods. |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 24 | class ModemSimpleProxyInterface { |
| 25 | public: |
| 26 | virtual ~ModemSimpleProxyInterface() {} |
| 27 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 28 | virtual void Connect(const DBusPropertiesMap &properties, |
| 29 | Error *error, |
| 30 | const DBusPathCallback &callback, |
| 31 | int timeout) = 0; |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 32 | virtual void Disconnect(const ::DBus::Path &bearer, |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 33 | Error *error, |
| 34 | const ResultCallback &callback, |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 35 | int timeout) = 0; |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 36 | virtual void GetStatus(Error *error, |
| 37 | const DBusPropertyMapCallback &callback, |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 38 | int timeout) = 0; |
| 39 | }; |
| 40 | |
Jason Glasgow | ee1081c | 2012-03-06 15:14:53 -0500 | [diff] [blame] | 41 | } // namespace mm1 |
| 42 | } // namespace shill |
| 43 | |
| 44 | #endif // SHILL_MM1_MODEM_SIMPLE_PROXY_INTERFACE_ |