1 /*
2  * Copyright 2024 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 <gmock/gmock.h>
19 #include <gtest/gtest.h>
20 
21 #include <cstdint>
22 
23 #include "stack/include/bt_name.h"
24 #include "stack/include/btm_status.h"
25 #include "stack/include/hci_error_code.h"
26 #include "stack/include/rnr_interface.h"
27 #include "types/raw_address.h"
28 
29 namespace bluetooth {
30 namespace testing {
31 namespace stack {
32 namespace rnr {
33 
34 class Mock : public ::bluetooth::stack::rnr::Interface {
35 public:
36   Mock() = default;
37 
38   MOCK_METHOD(bool, BTM_SecAddRmtNameNotifyCallback, (tBTM_RMT_NAME_CALLBACK*));
39   MOCK_METHOD(bool, BTM_SecDeleteRmtNameNotifyCallback, (tBTM_RMT_NAME_CALLBACK*));
40   MOCK_METHOD(bool, BTM_IsRemoteNameKnown, (const RawAddress& bd_addr, tBT_TRANSPORT transport));
41   MOCK_METHOD(tBTM_STATUS, BTM_ReadRemoteDeviceName,
42               (const RawAddress& bd_addr, tBTM_NAME_CMPL_CB* p_callback, tBT_TRANSPORT transport));
43   MOCK_METHOD(tBTM_STATUS, BTM_CancelRemoteDeviceName, ());
44   MOCK_METHOD(void, btm_process_remote_name,
45               (const RawAddress* bd_addr, const BD_NAME bd_name, uint16_t evt_len,
46                tHCI_STATUS hci_status));
47 };
48 
49 void reset_interface();
50 void set_interface(bluetooth::stack::rnr::Interface* interface_);
51 
52 }  // namespace rnr
53 }  // namespace stack
54 }  // namespace testing
55 }  // namespace bluetooth
56