1 //
2 // Copyright (C) 2012 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef SHILL_CELLULAR_MOCK_MM1_MODEM_PROXY_H_
18 #define SHILL_CELLULAR_MOCK_MM1_MODEM_PROXY_H_
19 
20 #include <string>
21 #include <vector>
22 
23 #include <base/macros.h>
24 #include <gmock/gmock.h>
25 
26 #include "shill/cellular/mm1_modem_proxy_interface.h"
27 
28 namespace shill {
29 namespace mm1 {
30 
31 class MockModemProxy : public ModemProxyInterface {
32  public:
33   MockModemProxy();
34   ~MockModemProxy() override;
35 
36   // Inherited methods from ModemProxyInterface.
37   MOCK_METHOD4(Enable, void(bool enable,
38                             Error* error,
39                             const ResultCallback& callback,
40                             int timeout));
41   MOCK_METHOD4(CreateBearer, void(const KeyValueStore& properties,
42                                   Error* error,
43                                   const RpcIdentifierCallback& callback,
44                                   int timeout));
45   MOCK_METHOD4(DeleteBearer, void(const std::string& bearer,
46                                   Error* error,
47                                   const ResultCallback& callback,
48                                   int timeout));
49   MOCK_METHOD3(Reset, void(Error* error,
50                            const ResultCallback& callback,
51                            int timeout));
52   MOCK_METHOD4(FactoryReset, void(const std::string& code,
53                                   Error* error,
54                                   const ResultCallback& callback,
55                                   int timeout));
56   MOCK_METHOD4(SetCurrentCapabilities, void(uint32_t capabilities,
57                                             Error* error,
58                                             const ResultCallback& callback,
59                                             int timeout));
60   MOCK_METHOD5(SetCurrentModes,
61                void(uint32_t allowed_modes,
62                     uint32_t preferred_mode,
63                     Error* error,
64                     const ResultCallback& callback,
65                     int timeout));
66   MOCK_METHOD4(SetCurrentBands, void(const std::vector<uint32_t>& bands,
67                                      Error* error,
68                                      const ResultCallback& callback,
69                                      int timeout));
70   MOCK_METHOD5(Command, void(const std::string& cmd,
71                              uint32_t user_timeout,
72                              Error* error,
73                              const StringCallback& callback,
74                              int timeout));
75   MOCK_METHOD4(SetPowerState, void(uint32_t power_state,
76                                    Error* error,
77                                    const ResultCallback& callback,
78                                    int timeout));
79   MOCK_METHOD1(set_state_changed_callback, void(
80       const ModemStateChangedSignalCallback& callback));
81 
82  private:
83   DISALLOW_COPY_AND_ASSIGN(MockModemProxy);
84 };
85 
86 }  // namespace mm1
87 }  // namespace shill
88 
89 #endif  // SHILL_CELLULAR_MOCK_MM1_MODEM_PROXY_H_
90