Peter Qiu | 326b6cf | 2015-09-02 11:11:42 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2014 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 | // |
Peter Qiu | fb39ba4 | 2014-11-21 09:09:59 -0800 | [diff] [blame] | 16 | |
| 17 | #ifndef APMANAGER_MOCK_MANAGER_H_ |
| 18 | #define APMANAGER_MOCK_MANAGER_H_ |
| 19 | |
| 20 | #include <string> |
| 21 | |
| 22 | #include <base/macros.h> |
| 23 | #include <gmock/gmock.h> |
| 24 | |
| 25 | #include "apmanager/manager.h" |
| 26 | |
| 27 | namespace apmanager { |
| 28 | |
| 29 | class MockManager : public Manager { |
| 30 | public: |
Peter Qiu | f933540 | 2015-11-16 12:09:16 -0800 | [diff] [blame] | 31 | explicit MockManager(ControlInterface* control_interface); |
Peter Qiu | fb39ba4 | 2014-11-21 09:09:59 -0800 | [diff] [blame] | 32 | ~MockManager() override; |
| 33 | |
| 34 | MOCK_METHOD0(Start, void()); |
| 35 | MOCK_METHOD0(Stop, void()); |
Peter Qiu | 7758d8d | 2015-11-23 14:27:33 -0800 | [diff] [blame] | 36 | MOCK_METHOD1(RegisterDevice, void(const scoped_refptr<Device>& device)); |
Peter Qiu | fb39ba4 | 2014-11-21 09:09:59 -0800 | [diff] [blame] | 37 | MOCK_METHOD0(GetAvailableDevice, scoped_refptr<Device>()); |
| 38 | MOCK_METHOD1(GetDeviceFromInterfaceName, |
| 39 | scoped_refptr<Device>(const std::string& interface_name)); |
Peter Qiu | 7e0ffcf | 2014-12-02 12:53:27 -0800 | [diff] [blame] | 40 | MOCK_METHOD1(ClaimInterface, void(const std::string& interface_name)); |
| 41 | MOCK_METHOD1(ReleaseInterface, void(const std::string& interface_name)); |
Peter Qiu | 943cf3a | 2015-02-24 10:59:17 -0800 | [diff] [blame] | 42 | MOCK_METHOD1(RequestDHCPPortAccess, void(const std::string& interface)); |
| 43 | MOCK_METHOD1(ReleaseDHCPPortAccess, void(const std::string& interface)); |
Peter Qiu | cbbefa2 | 2015-10-27 12:05:34 -0700 | [diff] [blame] | 44 | #if defined(__BRILLO__) |
| 45 | MOCK_METHOD1(SetupApModeInterface, bool(std::string* interface_name)); |
| 46 | MOCK_METHOD1(SetupStationModeInterface, bool(std::string* interface_name)); |
| 47 | #endif // __BRILLO__ |
Peter Qiu | fb39ba4 | 2014-11-21 09:09:59 -0800 | [diff] [blame] | 48 | |
| 49 | private: |
| 50 | DISALLOW_COPY_AND_ASSIGN(MockManager); |
| 51 | }; |
| 52 | |
| 53 | } // namespace apmanager |
| 54 | |
| 55 | #endif // APMANAGER_MOCK_MANAGER_H_ |