blob: 8e7a78eb5f8a4196e1418d6c788054d4f650ad43 [file] [log] [blame]
Jason Glasgowef965562012-04-10 16:12:35 -04001// 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
15namespace shill {
16namespace mm1 {
17
18class 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));
46 MOCK_METHOD5(SetAllowedModes, void(const uint32_t &modes,
47 const uint32_t &preferred,
48 Error *error,
49 const ResultCallback &callback,
50 int timeout));
51 MOCK_METHOD4(SetBands, void(const std::vector< uint32_t > &bands,
52 Error *error,
53 const ResultCallback &callback,
54 int timeout));
55 MOCK_METHOD5(Command, void(const std::string &cmd,
56 const uint32_t &user_timeout,
57 Error *error,
58 const StringCallback &callback,
59 int timeout));
60 MOCK_METHOD1(set_state_changed_callback, void(
61 const ModemStateChangedSignalCallback &callback));
62
63 // Inherited properties from ModemProxyInterface.
64 MOCK_METHOD0(Sim, const ::DBus::Path());
65 MOCK_METHOD0(ModemCapabilities, uint32_t());
66 MOCK_METHOD0(CurrentCapabilities, uint32_t());
67 MOCK_METHOD0(MaxBearers, uint32_t());
68 MOCK_METHOD0(MaxActiveBearers, uint32_t());
69 MOCK_METHOD0(Manufacturer, const std::string());
70 MOCK_METHOD0(Model, const std::string());
71 MOCK_METHOD0(Revision, const std::string());
72 MOCK_METHOD0(DeviceIdentifier, const std::string());
73 MOCK_METHOD0(Device, const std::string());
74 MOCK_METHOD0(Driver, const std::string());
75 MOCK_METHOD0(Plugin, const std::string());
76 MOCK_METHOD0(EquipmentIdentifier, const std::string());
77 MOCK_METHOD0(UnlockRequired, uint32_t());
78 typedef std::map< uint32_t, uint32_t > RetryData;
79 MOCK_METHOD0(UnlockRetries, const RetryData());
80 MOCK_METHOD0(State, uint32_t());
81 MOCK_METHOD0(AccessTechnologies, uint32_t());
82 typedef ::DBus::Struct< uint32_t, bool > SignalQualityData;
83 MOCK_METHOD0(SignalQuality, const SignalQualityData());
84 MOCK_METHOD0(OwnNumbers, const std::vector< std::string >());
85 MOCK_METHOD0(SupportedModes, uint32_t());
86 MOCK_METHOD0(AllowedModes, uint32_t());
87 MOCK_METHOD0(PreferredMode, uint32_t());
88 MOCK_METHOD0(SupportedBands, const std::vector< uint32_t >());
89 MOCK_METHOD0(Bands, const std::vector< uint32_t >());
90
91 private:
92 DISALLOW_COPY_AND_ASSIGN(MockModemProxy);
93};
94
95} // namespace mm1
96} // namespace shill
97
98#endif // SHILL_MM1_MOCK_MODEM_PROXY_