Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [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_MOCK_MODEM_PROXY_ |
| 6 | #define SHILL_MM1_MOCK_MODEM_PROXY_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | #include <gmock/gmock.h> |
| 12 | |
| 13 | #include "shill/mm1_modem_proxy_interface.h" |
| 14 | |
| 15 | namespace shill { |
| 16 | namespace mm1 { |
| 17 | |
| 18 | class MockModemProxy : public ModemProxyInterface { |
| 19 | public: |
| 20 | MockModemProxy(); |
| 21 | virtual ~MockModemProxy(); |
| 22 | |
| 23 | // Inherited methods from ModemProxyInterface. |
| 24 | MOCK_METHOD4(Enable, void(bool enable, |
| 25 | Error *error, |
| 26 | const ResultCallback &callback, |
| 27 | int timeout)); |
| 28 | MOCK_METHOD3(ListBearers, void(Error *error, |
| 29 | const DBusPathsCallback &callback, |
| 30 | int timeout)); |
| 31 | MOCK_METHOD4(CreateBearer, void(const DBusPropertiesMap &properties, |
| 32 | Error *error, |
| 33 | const DBusPathCallback &callback, |
| 34 | int timeout)); |
| 35 | MOCK_METHOD4(DeleteBearer, void(const ::DBus::Path &bearer, |
| 36 | Error *error, |
| 37 | const ResultCallback &callback, |
| 38 | int timeout)); |
| 39 | MOCK_METHOD3(Reset, void(Error *error, |
| 40 | const ResultCallback &callback, |
| 41 | int timeout)); |
| 42 | MOCK_METHOD4(FactoryReset, void(const std::string &code, |
| 43 | Error *error, |
| 44 | const ResultCallback &callback, |
| 45 | int timeout)); |
Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [diff] [blame] | 46 | MOCK_METHOD5(Command, void(const std::string &cmd, |
| 47 | const uint32_t &user_timeout, |
| 48 | Error *error, |
| 49 | const StringCallback &callback, |
| 50 | int timeout)); |
Arman Uguray | ee464d3 | 2013-02-13 17:14:36 -0800 | [diff] [blame] | 51 | MOCK_METHOD4(SetPowerState, void(const uint32_t &power_state, |
| 52 | Error *error, |
| 53 | const ResultCallback &callback, |
| 54 | int timeout)); |
Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [diff] [blame] | 55 | MOCK_METHOD1(set_state_changed_callback, void( |
| 56 | const ModemStateChangedSignalCallback &callback)); |
| 57 | |
| 58 | // Inherited properties from ModemProxyInterface. |
| 59 | MOCK_METHOD0(Sim, const ::DBus::Path()); |
Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [diff] [blame] | 60 | MOCK_METHOD0(CurrentCapabilities, uint32_t()); |
| 61 | MOCK_METHOD0(MaxBearers, uint32_t()); |
| 62 | MOCK_METHOD0(MaxActiveBearers, uint32_t()); |
| 63 | MOCK_METHOD0(Manufacturer, const std::string()); |
| 64 | MOCK_METHOD0(Model, const std::string()); |
| 65 | MOCK_METHOD0(Revision, const std::string()); |
| 66 | MOCK_METHOD0(DeviceIdentifier, const std::string()); |
| 67 | MOCK_METHOD0(Device, const std::string()); |
Ben Chan | 34e5d68 | 2012-08-24 19:10:49 -0700 | [diff] [blame] | 68 | MOCK_METHOD0(Drivers, const std::vector<std::string>()); |
Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [diff] [blame] | 69 | MOCK_METHOD0(Plugin, const std::string()); |
| 70 | MOCK_METHOD0(EquipmentIdentifier, const std::string()); |
| 71 | MOCK_METHOD0(UnlockRequired, uint32_t()); |
| 72 | typedef std::map< uint32_t, uint32_t > RetryData; |
| 73 | MOCK_METHOD0(UnlockRetries, const RetryData()); |
| 74 | MOCK_METHOD0(State, uint32_t()); |
| 75 | MOCK_METHOD0(AccessTechnologies, uint32_t()); |
| 76 | typedef ::DBus::Struct< uint32_t, bool > SignalQualityData; |
| 77 | MOCK_METHOD0(SignalQuality, const SignalQualityData()); |
| 78 | MOCK_METHOD0(OwnNumbers, const std::vector< std::string >()); |
Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [diff] [blame] | 79 | MOCK_METHOD0(SupportedBands, const std::vector< uint32_t >()); |
Arman Uguray | ee464d3 | 2013-02-13 17:14:36 -0800 | [diff] [blame] | 80 | MOCK_METHOD0(PowerState, uint32_t()); |
Jason Glasgow | ef96556 | 2012-04-10 16:12:35 -0400 | [diff] [blame] | 81 | |
| 82 | private: |
| 83 | DISALLOW_COPY_AND_ASSIGN(MockModemProxy); |
| 84 | }; |
| 85 | |
| 86 | } // namespace mm1 |
| 87 | } // namespace shill |
| 88 | |
| 89 | #endif // SHILL_MM1_MOCK_MODEM_PROXY_ |