1326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// 2326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// Copyright (C) 2014 The Android Open Source Project 3326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// 4326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// Licensed under the Apache License, Version 2.0 (the "License"); 5326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// you may not use this file except in compliance with the License. 6326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// You may obtain a copy of the License at 7326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// 8326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// http://www.apache.org/licenses/LICENSE-2.0 9326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// 10326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// Unless required by applicable law or agreed to in writing, software 11326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// distributed under the License is distributed on an "AS IS" BASIS, 12326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// See the License for the specific language governing permissions and 14326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// limitations under the License. 15326b6cfba5ab73c9e41a7585d1bc95871631122aPeter Qiu// 16fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 17fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#ifndef APMANAGER_MOCK_DEVICE_H_ 18fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#define APMANAGER_MOCK_DEVICE_H_ 19fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 20fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#include <string> 21fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 22fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#include <base/macros.h> 23fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#include <gmock/gmock.h> 24fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 25fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#include "apmanager/device.h" 26fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 27fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiunamespace apmanager { 28fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 29fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiuclass MockDevice : public Device { 30fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu public: 31f933540bb968efa2744ee48b40ab713ccd358d51Peter Qiu explicit MockDevice(Manager* manager); 32fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu ~MockDevice() override; 33fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 34fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu MOCK_METHOD1(RegisterInterface, 35fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu void(const WiFiInterface& interface)); 36fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu MOCK_METHOD1(DeregisterInterface, 37fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu void(const WiFiInterface& interface)); 381ff67a70eb6dea94ba8a6a836add9810536bec31Peter Qiu MOCK_METHOD1(ParseWiphyCapability, 39fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu void(const shill::Nl80211Message& msg)); 400ca183b004fbf56973ae82a59d776752ffa17ab0Peter Qiu MOCK_METHOD1(ClaimDevice, bool(bool full_control)); 41fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu MOCK_METHOD0(ReleaseDevice, bool()); 42fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu MOCK_METHOD1(InterfaceExists, bool(const std::string& interface_name)); 438e785b9645b8d6f32f3e2cae8d7e2a7ec3c71e76Peter Qiu MOCK_METHOD2(GetHTCapability, bool(uint16_t channel, std::string* ht_capab)); 44fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 45fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu private: 46fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu DISALLOW_COPY_AND_ASSIGN(MockDevice); 47fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu}; 48fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 49fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu} // namespace apmanager 50fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu 51fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0Peter Qiu#endif // APMANAGER_MOCK_DEVICE_H_ 52