1 /*
2  * Copyright 2020 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 #pragma once
18 
19 #include <cstddef>
20 #include <cstdint>
21 
22 /**
23  * Get how many responses sent
24  *
25  * @return the count of responses.
26  */
27 size_t mock_avdt_msg_send_rsp_get_count(void);
28 
29 /**
30  * Clear all the history of the sent responses.
31  */
32 void mock_avdt_msg_send_rsp_clear_history(void);
33 
34 /**
35  * Get the nth (zero based) response's sig id
36  *
37  * @param nth response recorded since last time clear history
38  * @return the sig id of the response
39  *
40  * @note undefined behavior if nth >= total count
41  */
42 uint8_t mock_avdt_msg_send_rsp_get_sig_id_at(size_t nth);
43 
44 /**
45  * Get how many commands sent
46  *
47  * @return the count of commands.
48  */
49 size_t mock_avdt_msg_send_cmd_get_count(void);
50 
51 /**
52  * Clear all the history of the sent commands.
53  */
54 void mock_avdt_msg_send_cmd_clear_history(void);
55 
56 /**
57  * Get the nth (zero based) commands's sig id
58  *
59  * @param nth command recorded since last time clear history
60  * @return the sig id of the command
61  *
62  * @note undefined behavior if nth >= total count
63  */
64 uint8_t mock_avdt_msg_send_cmd_get_sig_id_at(size_t nth);
65