1 /* 2 * Copyright 2021 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 #pragma once 17 18 #include <cstdint> 19 #include <memory> 20 21 #include "hci/hci_packets.h" 22 #include "module.h" 23 #include "neighbor/inquiry.h" 24 #include "neighbor/scan_parameters.h" 25 #include "os/handler.h" 26 27 #include <gmock/gmock.h> 28 29 // Unit test interfaces 30 namespace bluetooth { 31 namespace neighbor { 32 namespace testing { 33 34 class MockInquiryModule : public InquiryModule { 35 public: 36 MOCK_METHOD(void, RegisterCallbacks, (InquiryCallbacks inquiry_callbacks)); 37 MOCK_METHOD(void, UnregisterCallbacks, ()); 38 MOCK_METHOD(void, StartGeneralInquiry, (InquiryLength inquiry_length, NumResponses num_responses)); 39 MOCK_METHOD(void, StartLimitedInquiry, (InquiryLength inquiry_length, NumResponses num_responses)); 40 MOCK_METHOD(void, StopInquiry, ()); 41 MOCK_METHOD( 42 void, 43 StartGeneralPeriodicInquiry, 44 (InquiryLength inquiry_length, NumResponses num_responses, PeriodLength max_delay, PeriodLength min_delay)); 45 MOCK_METHOD( 46 void, 47 StartLimitedPeriodicInquiry, 48 (InquiryLength inquiry_length, NumResponses num_responses, PeriodLength max_delay, PeriodLength min_delay)); 49 MOCK_METHOD(void, StopPeriodicInquiry, ()); 50 MOCK_METHOD(void, SetScanActivity, (ScanParameters parms)); 51 MOCK_METHOD(void, SetInterlacedScan, ()); 52 MOCK_METHOD(void, SetStandardScan, ()); 53 MOCK_METHOD(void, SetStandardInquiryResultMode, ()); 54 MOCK_METHOD(void, SetInquiryWithRssiResultMode, ()); 55 MOCK_METHOD(void, SetExtendedInquiryResultMode, ()); 56 }; 57 58 } // namespace testing 59 } // namespace neighbor 60 } // namespace bluetooth 61