1// 2// Copyright (C) 2013 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_WIFI_MOCK_SCAN_SESSION_H_ 18#define SHILL_WIFI_MOCK_SCAN_SESSION_H_ 19 20#include "shill/wifi/scan_session.h" 21 22#include <set> 23 24#include <gmock/gmock.h> 25 26#include "shill/wifi/wifi_provider.h" 27 28namespace shill { 29 30class ByteString; 31class EventDispatcher; 32class Metrics; 33class NetlinkManager; 34 35class MockScanSession : public ScanSession { 36 public: 37 MockScanSession(NetlinkManager* netlink_manager, 38 EventDispatcher* dispatcher, 39 const WiFiProvider::FrequencyCountList& previous_frequencies, 40 const std::set<uint16_t>& available_frequencies, 41 uint32_t ifindex, 42 const FractionList& fractions, 43 int min_frequencies, 44 int max_frequencies, 45 OnScanFailed on_scan_failed, 46 Metrics* metrics); 47 ~MockScanSession() override; 48 49 MOCK_CONST_METHOD0(HasMoreFrequencies, bool()); 50 MOCK_METHOD1(AddSsid, void(const ByteString& ssid)); 51 MOCK_METHOD0(InitiateScan, void()); 52 53 private: 54 DISALLOW_COPY_AND_ASSIGN(MockScanSession); 55}; 56 57} // namespace shill 58 59#endif // SHILL_WIFI_MOCK_SCAN_SESSION_H_ 60