Arman Uguray | 618af2b | 2012-12-11 19:20:42 -0800 | [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_TIME_PROXY_INTERFACE_H_ |
| 6 | #define SHILL_MM1_MODEM_TIME_PROXY_INTERFACE_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | |
| 12 | #include "shill/callbacks.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | class Error; |
| 16 | |
| 17 | namespace mm1 { |
| 18 | |
| 19 | typedef base::Callback<void(const std::string &)> |
| 20 | NetworkTimeChangedSignalCallback; |
| 21 | |
| 22 | // These are the methods that an org.freedesktop.ModemManager1.Modem.Time |
| 23 | // proxy must support. The interface is provided so that it can be mocked |
| 24 | // in tests. All calls are made asynchronously. Call completion is signalled |
| 25 | // via callbacks passed to the methods. |
| 26 | class ModemTimeProxyInterface { |
| 27 | public: |
| 28 | virtual ~ModemTimeProxyInterface() {} |
| 29 | |
| 30 | virtual void GetNetworkTime(Error *error, |
| 31 | const StringCallback &callback, |
| 32 | int timeout) = 0; |
| 33 | |
| 34 | virtual void set_network_time_changed_callback( |
| 35 | const NetworkTimeChangedSignalCallback &callback) = 0; |
| 36 | |
| 37 | // Properties |
| 38 | virtual const DBusPropertiesMap NetworkTimezone() = 0; |
| 39 | }; |
| 40 | |
| 41 | } // namespace mm1 |
| 42 | } // namespace shill |
| 43 | |
| 44 | #endif // SHILL_MM1_MODEM_TIME_PROXY_INTERFACE_H_ |