interop.h 1.7 KB

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