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 #ifndef _INTEROP_H_ 20 #define _INTEROP_H_ 21 22 #include <stdbool.h> 23 #include "common/bt_defs.h" 24 #include "common/bt_target.h" 25 26 typedef enum { 27 // Disable secure connections 28 // This is for pre BT 4.1/2 devices that do not handle secure mode 29 // very well. 30 INTEROP_DISABLE_LE_SECURE_CONNECTIONS, 31 32 // Some devices have proven problematic during the pairing process, often 33 // requiring multiple retries to complete pairing. To avoid degrading the user 34 // experience for those devices, automatically re-try pairing if page 35 // timeouts are received during pairing. 36 INTEROP_AUTO_RETRY_PAIRING 37 } interop_feature_t; 38 39 // Check if a given |addr| matches a known interoperability workaround as identified 40 // by the |interop_feature_t| enum. This API is used for simple address based lookups 41 // where more information is not available. No look-ups or random address resolution 42 // is performed on |addr|. 43 bool interop_match(const interop_feature_t feature, const bt_bdaddr_t *addr); 44 45 #endif /*_INTEROP_H_*/ 46