120a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao/* 220a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * Copyright (C) 2016 The Android Open Source Project 320a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * 420a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * Licensed under the Apache License, Version 2.0 (the "License"); 520a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * you may not use this file except in compliance with the License. 620a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * You may obtain a copy of the License at 720a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * 820a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * http://www.apache.org/licenses/LICENSE-2.0 920a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * 1020a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * Unless required by applicable law or agreed to in writing, software 1120a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * distributed under the License is distributed on an "AS IS" BASIS, 1220a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1320a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * See the License for the specific language governing permissions and 1420a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao * limitations under the License. 1520a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao */ 1620a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 1720a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao#ifndef WIFICOND_TEST_MOCK_OFFLOAD_SERVICE_UTILS_H_ 1820a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao#define WIFICOND_TEST_MOCK_OFFLOAD_SERVICE_UTILS_H_ 1920a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 2020a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao#include <gmock/gmock.h> 2120a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao#include <gtest/gtest.h> 2220a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 2316b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao#include <android/hardware/wifi/offload/1.0/IOffload.h> 2420a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao#include "wificond/scanning/offload/offload_callback.h" 2526e97959c7b5bf8a2b259b2aa665ae4a807f3030Sohani Rao#include "wificond/scanning/offload/offload_callback_handlers.h" 2616b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao#include "wificond/scanning/offload/offload_service_utils.h" 2769f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao#include "wificond/scanning/offload_scan_callback_interface_impl.h" 2820a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 2920a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Raonamespace android { 3020a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Raonamespace wificond { 3120a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 3220a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Raoclass MockOffloadServiceUtils : public OffloadServiceUtils { 3320a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao public: 3420a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao MockOffloadServiceUtils(); 3520a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao ~MockOffloadServiceUtils() override = default; 367a3d8ddff0ea3bca99fb3e554651e1541a93121eNingyuan Wang MOCK_CONST_METHOD0(IsOffloadScanSupported, bool()); 3716b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao MOCK_METHOD0(GetOffloadService, 3816b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao sp<android::hardware::wifi::offload::V1_0::IOffload>()); 3916b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao MOCK_METHOD1(GetOffloadCallback, 4016b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao sp<OffloadCallback>(OffloadCallbackHandlers* handlers)); 417739aa7fba23503a5d6646b7b198bef0944ac5d8Sohani Rao MOCK_METHOD1(GetOffloadDeathRecipient, 427739aa7fba23503a5d6646b7b198bef0944ac5d8Sohani Rao android::wificond::OffloadDeathRecipient*( 437739aa7fba23503a5d6646b7b198bef0944ac5d8Sohani Rao OffloadDeathRecipientHandler handler)); 4469f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao MOCK_METHOD1( 4569f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao GetOffloadScanCallbackInterface, 4669f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao std::shared_ptr<OffloadScanCallbackInterfaceImpl>(ScannerImpl* scanner)); 4769f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao MOCK_METHOD2(GetOffloadScanManager, 4869f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao std::shared_ptr<OffloadScanManager>( 4969f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao std::weak_ptr<OffloadServiceUtils> service_utils, 5069f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao std::shared_ptr<OffloadScanCallbackInterfaceImpl> 5169f61f7fd15d44dd32a107d850f05f0eb933ab2cSohani Rao callback_interface)); 5220a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao}; 5320a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 5416b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao} // namespace wificond 5516b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao} // namespace android 5620a82c5f49ca8be325803806e62fcdb6ccc6a6fcSohani Rao 5716b75e6e37fa9567be23e18c8a98e4132fc9d91cSohani Rao#endif // WIFICOND_TEST_MOCK_OFFLOAD_SERVICE_UTILS_H_ 58