1 /******************************************************************************
2  *
3  *  Copyright (C) 2015 Google, Inc.
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  ******************************************************************************/
18 
19 #pragma once
20 
21 #include <stdbool.h>
22 
23 #include "btcore/include/bdaddr.h"
24 
25 typedef enum {
26   // Disable secure connections
27   // This is for pre BT 4.1/2 devices that do not handle secure mode
28   // very well.
29   INTEROP_DISABLE_LE_SECURE_CONNECTIONS,
30 
31   // Some devices have proven problematic during the pairing process, often
32   // requiring multiple retries to complete pairing. To avoid degrading the user
33   // experience for those devices, automatically re-try pairing if page
34   // timeouts are received during pairing.
35   INTEROP_AUTO_RETRY_PAIRING
36 } interop_feature_t;
37 
38 // Check if a given |addr| matches a known interoperability workaround as identified
39 // by the |interop_feature_t| enum. This API is used for simple address based lookups
40 // where more information is not available. No look-ups or random address resolution
41 // is performed on |addr|.
42 bool interop_match(const interop_feature_t feature, const bt_bdaddr_t *addr);
43