xref: /btstack/test/hfp/mock.h (revision 588df5e92a704fcda32bcab28d7af75cf1192e2a)
1dc5611fdSMilanka Ringwald /*
2dc5611fdSMilanka Ringwald  * Copyright (C) 2014 BlueKitchen GmbH
3dc5611fdSMilanka Ringwald  *
4dc5611fdSMilanka Ringwald  * Redistribution and use in source and binary forms, with or without
5dc5611fdSMilanka Ringwald  * modification, are permitted provided that the following conditions
6dc5611fdSMilanka Ringwald  * are met:
7dc5611fdSMilanka Ringwald  *
8dc5611fdSMilanka Ringwald  * 1. Redistributions of source code must retain the above copyright
9dc5611fdSMilanka Ringwald  *    notice, this list of conditions and the following disclaimer.
10dc5611fdSMilanka Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11dc5611fdSMilanka Ringwald  *    notice, this list of conditions and the following disclaimer in the
12dc5611fdSMilanka Ringwald  *    documentation and/or other materials provided with the distribution.
13dc5611fdSMilanka Ringwald  * 3. Neither the name of the copyright holders nor the names of
14dc5611fdSMilanka Ringwald  *    contributors may be used to endorse or promote products derived
15dc5611fdSMilanka Ringwald  *    from this software without specific prior written permission.
16dc5611fdSMilanka Ringwald  * 4. Any redistribution, use, or modification is done solely for
17dc5611fdSMilanka Ringwald  *    personal benefit and not for any commercial purpose or for
18dc5611fdSMilanka Ringwald  *    monetary gain.
19dc5611fdSMilanka Ringwald  *
20dc5611fdSMilanka Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21dc5611fdSMilanka Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22dc5611fdSMilanka Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23dc5611fdSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24dc5611fdSMilanka Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25dc5611fdSMilanka Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26dc5611fdSMilanka Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27dc5611fdSMilanka Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28dc5611fdSMilanka Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29dc5611fdSMilanka Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30dc5611fdSMilanka Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31dc5611fdSMilanka Ringwald  * SUCH DAMAGE.
32dc5611fdSMilanka Ringwald  *
33dc5611fdSMilanka Ringwald  * Please inquire about commercial licensing options at
34dc5611fdSMilanka Ringwald  * [email protected]
35dc5611fdSMilanka Ringwald  *
36dc5611fdSMilanka Ringwald  */
37dc5611fdSMilanka Ringwald 
38dc5611fdSMilanka Ringwald // *****************************************************************************
39dc5611fdSMilanka Ringwald //
40dc5611fdSMilanka Ringwald // HFP BTstack Mocks
41dc5611fdSMilanka Ringwald //
42dc5611fdSMilanka Ringwald // *****************************************************************************
43dc5611fdSMilanka Ringwald 
44dc5611fdSMilanka Ringwald #include <stdint.h>
45dc5611fdSMilanka Ringwald #include <stdio.h>
46dc5611fdSMilanka Ringwald #include <stdlib.h>
47dc5611fdSMilanka Ringwald #include <string.h>
48dc5611fdSMilanka Ringwald 
49*588df5e9SMatthias Ringwald #if defined __cplusplus
50*588df5e9SMatthias Ringwald extern "C" {
51*588df5e9SMatthias Ringwald #endif
52*588df5e9SMatthias Ringwald 
53dc5611fdSMilanka Ringwald // HFP Mock API
54dc5611fdSMilanka Ringwald uint8_t * get_rfcomm_payload();
55dc5611fdSMilanka Ringwald uint16_t get_rfcomm_payload_len();
56656f7353SMilanka Ringwald 
57c3a23b29SMilanka Ringwald void inject_hfp_command_to_ag(uint8_t * data, int len);
58c3a23b29SMilanka Ringwald void inject_hfp_command_to_hf(uint8_t * data, int len);
59d5deed03SMilanka Ringwald 
60d5deed03SMilanka Ringwald int has_more_hfp_commands(int start_command_offset, int end_command_offset);
61d5deed03SMilanka Ringwald char * get_next_hfp_command(int start_command_offset, int end_command_offset);
62*588df5e9SMatthias Ringwald 
63*588df5e9SMatthias Ringwald #if defined __cplusplus
64*588df5e9SMatthias Ringwald }
65*588df5e9SMatthias Ringwald #endif
66