• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2025 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 #include <gmock/gmock.h>
18 #include <gtest/gtest.h>
19 
20 #include "gki.h"
21 #include "nfc_int.h"
22 
23 class MockGkiUtils : public GkiUtilsInterface {
24  public:
25   MOCK_METHOD(void, remove_from_timer_list,
26               (TIMER_LIST_Q * p_timer_listq, TIMER_LIST_ENT* p_tle),
27               (override));
28   MOCK_METHOD(void, stop_timer, (uint8_t tnum), (override));
29   MOCK_METHOD(bool, timer_list_empty, (TIMER_LIST_Q * p_list), (override));
30   MOCK_METHOD(void, start_timer,
31               (uint8_t timer_id, uint32_t ticks, bool periodic), (override));
32   MOCK_METHOD(uint8_t, get_taskid, (), (override));
33   MOCK_METHOD(void*, getbuf, (uint16_t size), (override));
34   MOCK_METHOD(void, send_msg,
35               (uint8_t task_id, uint8_t mailbox_id, void* p_msg), (override));
36   MOCK_METHOD(void, add_to_timer_list,
37               (TIMER_LIST_Q * p_list, TIMER_LIST_ENT* p_tle), (override));
38   MOCK_METHOD(uint16_t, update_timer_list,
39               (TIMER_LIST_Q * p_timer_listq,
40                int32_t num_units_since_last_update),
41               (override));
42   MOCK_METHOD(TIMER_LIST_ENT*, timer_list_first, (TIMER_LIST_Q * p_timer_listq),
43               (override));
44 
45   MOCK_METHOD(void, freebuf, (void* p_buf), (override));
46   MOCK_METHOD(void, enqueue, (BUFFER_Q * p_q, void* p_buf), (override));
47   MOCK_METHOD(void*, dequeue, (BUFFER_Q * p_q), (override));
48   MOCK_METHOD(void*, getpoolbuf, (uint8_t pool_id), (override));
49   MOCK_METHOD(void*, read_mbox, (uint8_t id), (override));
50   MOCK_METHOD(void*, remove_from_queue, (BUFFER_Q * p_q, void* p_buf),
51               (override));
52   MOCK_METHOD(void*, getlast, (BUFFER_Q * p_q), (override));
53 };
54