mukesh agrawal | 9da0777 | 2013-05-15 14:15:17 -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 | |
| 5 | #ifndef SHILL_MOCK_PPP_DEVICE_H_ |
| 6 | #define SHILL_MOCK_PPP_DEVICE_H_ |
| 7 | |
| 8 | #include <gmock/gmock.h> |
| 9 | |
| 10 | #include "shill/ppp_device.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class MockPPPDevice : public PPPDevice { |
| 15 | public: |
| 16 | MockPPPDevice(ControlInterface *control, |
| 17 | EventDispatcher *dispatcher, |
| 18 | Metrics *metrics, |
| 19 | Manager *manager, |
| 20 | const std::string &link_name, |
| 21 | int interface_index); |
| 22 | virtual ~MockPPPDevice(); |
| 23 | |
| 24 | MOCK_METHOD2(Stop, |
| 25 | void(Error *error, const EnabledStateChangedCallback &callback)); |
| 26 | MOCK_METHOD1(UpdateIPConfig, void(const IPConfig::Properties &properties)); |
| 27 | MOCK_METHOD0(DropConnection, void()); |
mukesh agrawal | f407d59 | 2013-07-31 11:37:57 -0700 | [diff] [blame] | 28 | MOCK_METHOD1(SelectService, void(const ServiceRefPtr &service)); |
mukesh agrawal | 0381f9a | 2013-07-11 16:41:52 -0700 | [diff] [blame] | 29 | MOCK_METHOD1(SetServiceState, void(Service::ConnectState)); |
| 30 | MOCK_METHOD1(SetServiceFailure, void(Service::ConnectFailure)); |
| 31 | MOCK_METHOD1(SetServiceFailureSilent, void(Service::ConnectFailure)); |
mukesh agrawal | 9da0777 | 2013-05-15 14:15:17 -0700 | [diff] [blame] | 32 | MOCK_METHOD1(SetEnabled, void(bool)); |
mukesh agrawal | f407d59 | 2013-07-31 11:37:57 -0700 | [diff] [blame] | 33 | MOCK_METHOD2(UpdateIPConfigFromPPP, void( |
| 34 | const std::map<std::string, std::string> &config, |
| 35 | bool blackhole_ipv6)); |
mukesh agrawal | 9da0777 | 2013-05-15 14:15:17 -0700 | [diff] [blame] | 36 | |
| 37 | private: |
| 38 | DISALLOW_COPY_AND_ASSIGN(MockPPPDevice); |
| 39 | }; |
| 40 | |
| 41 | } // namespace shill |
| 42 | |
| 43 | #endif // SHILL_MOCK_PPP_DEVICE_H_ |