interop.h 1.7 KB

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