Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [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_WIMAX_DEVICE_PROXY_INTERFACE_ |
| 6 | #define SHILL_WIMAX_DEVICE_PROXY_INTERFACE_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | |
| 12 | #include "shill/callbacks.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | class Error; |
Darin Petkov | 25665aa | 2012-05-21 14:08:12 +0200 | [diff] [blame] | 17 | class KeyValueStore; |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 18 | |
| 19 | // These are the methods that a WiMaxManager.Device proxy must support. The |
| 20 | // interface is provided so that it can be mocked in tests. |
| 21 | class WiMaxDeviceProxyInterface { |
| 22 | public: |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 23 | typedef base::Callback<void(const RpcIdentifiers &)> NetworksChangedCallback; |
| 24 | |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 25 | virtual ~WiMaxDeviceProxyInterface() {} |
| 26 | |
| 27 | virtual void Enable(Error *error, |
| 28 | const ResultCallback &callback, |
| 29 | int timeout) = 0; |
| 30 | virtual void Disable(Error *error, |
| 31 | const ResultCallback &callback, |
| 32 | int timeout) = 0; |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 33 | virtual void ScanNetworks(Error *error, |
| 34 | const ResultCallback &callback, |
| 35 | int timeout) = 0; |
Darin Petkov | 25665aa | 2012-05-21 14:08:12 +0200 | [diff] [blame] | 36 | virtual void Connect(const RpcIdentifier &network, |
| 37 | const KeyValueStore ¶meters, |
Ben Chan | 4e5c131 | 2012-05-18 18:45:38 -0700 | [diff] [blame] | 38 | Error *error, |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 39 | const ResultCallback &callback, |
| 40 | int timeout) = 0; |
| 41 | virtual void Disconnect(Error *error, |
| 42 | const ResultCallback &callback, |
| 43 | int timeout) = 0; |
| 44 | |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 45 | virtual void set_networks_changed_callback( |
| 46 | const NetworksChangedCallback &callback) = 0; |
| 47 | |
Darin Petkov | 096b347 | 2012-05-15 10:26:22 +0200 | [diff] [blame] | 48 | // Properties. |
| 49 | virtual uint8 Index(Error *error) = 0; |
| 50 | virtual std::string Name(Error *error) = 0; |
| 51 | }; |
| 52 | |
| 53 | } // namespace shill |
| 54 | |
| 55 | #endif // SHILL_WIMAX_DEVICE_PROXY_INTERFACE_H_ |