1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "internal_include/stack_config.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <cstdarg>
#include <cstring>
#include "hci/include/packet_fragmenter.h"
#include "internal_include/stack_config.h"
static const std::string kSmpOptions("mock smp options");
static const std::string kBroadcastAudioConfigOptions("mock broadcast audio config options");
static bool get_pts_avrcp_test(void) { return false; }
static bool get_pts_secure_only_mode(void) { return false; }
static bool get_pts_conn_updates_disabled(void) { return false; }
static bool get_pts_crosskey_sdp_disable(void) { return false; }
static const std::string* get_pts_smp_options(void) { return &kSmpOptions; }
static int get_pts_smp_failure_case(void) { return 123; }
static bool get_pts_force_eatt_for_notifications(void) { return false; }
static bool get_pts_connect_eatt_unconditionally(void) { return false; }
static bool get_pts_connect_eatt_before_encryption(void) { return false; }
static bool get_pts_unencrypt_broadcast(void) { return false; }
static bool get_pts_eatt_peripheral_collision_support(void) { return false; }
static bool get_pts_use_eatt_for_all_services(void) { return false; }
static bool get_pts_force_le_audio_multiple_contexts_metadata(void) { return false; }
static bool get_pts_l2cap_ecoc_upper_tester(void) { return false; }
static int get_pts_l2cap_ecoc_min_key_size(void) { return -1; }
static int get_pts_l2cap_ecoc_initial_chan_cnt(void) { return -1; }
static bool get_pts_l2cap_ecoc_connect_remaining(void) { return false; }
static int get_pts_l2cap_ecoc_send_num_of_sdu(void) { return -1; }
static bool get_pts_l2cap_ecoc_reconfigure(void) { return false; }
static const std::string* get_pts_broadcast_audio_config_options(void) {
return &kBroadcastAudioConfigOptions;
}
static bool get_pts_le_audio_disable_ases_before_stopping(void) { return false; }
struct config_t;
static config_t* get_all(void) { return nullptr; }
struct packet_fragmenter_t;
const packet_fragmenter_t* packet_fragmenter_get_interface() { return nullptr; }
stack_config_t mock_stack_config{
.get_pts_avrcp_test = get_pts_avrcp_test,
.get_pts_secure_only_mode = get_pts_secure_only_mode,
.get_pts_conn_updates_disabled = get_pts_conn_updates_disabled,
.get_pts_crosskey_sdp_disable = get_pts_crosskey_sdp_disable,
.get_pts_smp_options = get_pts_smp_options,
.get_pts_smp_failure_case = get_pts_smp_failure_case,
.get_pts_force_eatt_for_notifications = get_pts_force_eatt_for_notifications,
.get_pts_connect_eatt_unconditionally = get_pts_connect_eatt_unconditionally,
.get_pts_connect_eatt_before_encryption = get_pts_connect_eatt_before_encryption,
.get_pts_unencrypt_broadcast = get_pts_unencrypt_broadcast,
.get_pts_eatt_peripheral_collision_support = get_pts_eatt_peripheral_collision_support,
.get_pts_use_eatt_for_all_services = get_pts_use_eatt_for_all_services,
.get_pts_force_le_audio_multiple_contexts_metadata =
get_pts_force_le_audio_multiple_contexts_metadata,
.get_pts_l2cap_ecoc_upper_tester = get_pts_l2cap_ecoc_upper_tester,
.get_pts_l2cap_ecoc_min_key_size = get_pts_l2cap_ecoc_min_key_size,
.get_pts_l2cap_ecoc_initial_chan_cnt = get_pts_l2cap_ecoc_initial_chan_cnt,
.get_pts_l2cap_ecoc_connect_remaining = get_pts_l2cap_ecoc_connect_remaining,
.get_pts_l2cap_ecoc_send_num_of_sdu = get_pts_l2cap_ecoc_send_num_of_sdu,
.get_pts_l2cap_ecoc_reconfigure = get_pts_l2cap_ecoc_reconfigure,
.get_pts_broadcast_audio_config_options = get_pts_broadcast_audio_config_options,
.get_pts_le_audio_disable_ases_before_stopping =
get_pts_le_audio_disable_ases_before_stopping,
.get_all = get_all,
};
const stack_config_t* stack_config_get_interface(void) { return &mock_stack_config; }
|