Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [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 | |
Ben Chan | 4e5c131 | 2012-05-18 18:45:38 -0700 | [diff] [blame] | 5 | #ifndef SHILL_WIMAX_NETWORK_PROXY_INTERFACE_H_ |
| 6 | #define SHILL_WIMAX_NETWORK_PROXY_INTERFACE_H_ |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
Darin Petkov | 1e52a1b | 2012-05-21 10:35:56 +0200 | [diff] [blame] | 11 | #include <base/callback_forward.h> |
| 12 | |
| 13 | #include "shill/accessor_interface.h" |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 14 | |
| 15 | namespace shill { |
| 16 | |
Darin Petkov | d1cd797 | 2012-05-22 15:26:15 +0200 | [diff] [blame] | 17 | // Generally, a string representation of a Network's Identifier. We may group |
| 18 | // several different network identifiers into a single representative |
| 19 | // WiMaxNetworkId, if necessary. |
| 20 | typedef std::string WiMaxNetworkId; |
| 21 | |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 22 | class Error; |
| 23 | |
| 24 | // These are the methods that a WiMaxManager.Network proxy must support. The |
| 25 | // interface is provided so that it can be mocked in tests. |
| 26 | class WiMaxNetworkProxyInterface { |
| 27 | public: |
Darin Petkov | 1e52a1b | 2012-05-21 10:35:56 +0200 | [diff] [blame] | 28 | typedef base::Callback<void(int)> SignalStrengthChangedCallback; |
| 29 | |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 30 | virtual ~WiMaxNetworkProxyInterface() {} |
| 31 | |
Darin Petkov | 1e52a1b | 2012-05-21 10:35:56 +0200 | [diff] [blame] | 32 | virtual RpcIdentifier path() const = 0; |
| 33 | |
| 34 | virtual void set_signal_strength_changed_callback( |
| 35 | const SignalStrengthChangedCallback &callback) = 0; |
Ben Chan | 4e5c131 | 2012-05-18 18:45:38 -0700 | [diff] [blame] | 36 | |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 37 | // Properties. |
| 38 | virtual uint32 Identifier(Error *error) = 0; |
| 39 | virtual std::string Name(Error *error) = 0; |
| 40 | virtual int Type(Error *error) = 0; |
| 41 | virtual int CINR(Error *error) = 0; |
| 42 | virtual int RSSI(Error *error) = 0; |
Ben Chan | ac6e836 | 2012-05-20 00:39:58 -0700 | [diff] [blame] | 43 | virtual int SignalStrength(Error *error) = 0; |
Darin Petkov | 9893d9c | 2012-05-17 15:27:31 -0700 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | } // namespace shill |
| 47 | |
| 48 | #endif // SHILL_WIMAX_NETWORK_PROXY_INTERFACE_H_ |