• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 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 #ifdef __cplusplus
20 #include <cstdint>
21 #include <cstring>
22 #else
23 #include <stdint.h>
24 #include <string.h>
25 #endif
26 
27 // NOTE: Shared with internal_include/bt_target.h
28 /* Maximum device name length used in btm database. */
29 #ifndef BTM_MAX_REM_BD_NAME_LEN
30 #define BTM_MAX_REM_BD_NAME_LEN 248
31 #endif
32 
33 /* Maximum local device name length stored btm database */
34 #ifndef BTM_MAX_LOC_BD_NAME_LEN
35 #define BTM_MAX_LOC_BD_NAME_LEN 248
36 #endif
37 
38 #define BD_NAME_LEN 248
39 typedef uint8_t BD_NAME[BD_NAME_LEN + 1]; /* Device name */
40 
41 /* Device name of peer (may be truncated to save space in BTM database) */
42 typedef uint8_t tBTM_BD_NAME[BTM_MAX_REM_BD_NAME_LEN + 1];
43 
44 typedef uint8_t tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];
45 
46 #ifdef __cplusplus
47 inline constexpr tBTM_BD_NAME kBtmBdNameEmpty = {};
48 #endif
49