profiles_api.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2009-2013 Broadcom Corporation
  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 PROFILES_API_H
  19. #define PROFILES_API_H
  20. #include "bt_target.h"
  21. #include "btm_api.h"
  22. /*****************************************************************************
  23. ** Constants
  24. *****************************************************************************/
  25. #define BT_PASS 0 /* Used for general successful function returns */
  26. /*** Port entity passes back 8 bit errors; will use upper byte offset ***/
  27. #define PORT_ERR_GRP 0x0000 /* base offset for port entity */
  28. #define GAP_ERR_GRP 0x0100 /* base offset for GAP profile */
  29. #define SPP_ERR_GRP 0x0200 /* base offset for serial port profile */
  30. #define HCRP_ERR_GRP 0x0300 /* base offset for HCRP */
  31. #define HCRPM_ERR_GRP 0x0400 /* base offset for HCRPM */
  32. /* #define HSP2_ERR_GRP 0x0F00 */
  33. /* security level definitions (tBT_SECURITY) */
  34. #define BT_USE_DEF_SECURITY 0
  35. #define BT_SEC_MODE_NONE BTM_SEC_MODE_NONE
  36. #define BT_SEC_MODE_SERVICE BTM_SEC_MODE_SERVICE
  37. #define BT_SEC_MODE_LINK BTM_SEC_MODE_LINK
  38. /* security mask definitions (tBT_SECURITY) */
  39. /* The following definitions are OR'd together to form the security requirements */
  40. #define BT_SEC_IN_AUTHORIZE BTM_SEC_IN_AUTHORIZE /* Inbound call requires authorization */
  41. #define BT_SEC_IN_AUTHENTICATE BTM_SEC_IN_AUTHENTICATE /* Inbound call requires authentication */
  42. #define BT_SEC_IN_ENCRYPT BTM_SEC_IN_ENCRYPT /* Inbound call requires encryption */
  43. #define BT_SEC_OUT_AUTHORIZE BTM_SEC_OUT_AUTHORIZE /* Outbound call requires authorization */
  44. #define BT_SEC_OUT_AUTHENTICATE BTM_SEC_OUT_AUTHENTICATE /* Outbound call requires authentication */
  45. #define BT_SEC_OUT_ENCRYPT BTM_SEC_OUT_ENCRYPT /* Outbound call requires encryption */
  46. /*****************************************************************************
  47. ** Type Definitions
  48. *****************************************************************************/
  49. /*
  50. ** Security Definitions
  51. ** This following definitions are used to indicate the security
  52. ** requirements for a service.
  53. */
  54. typedef struct {
  55. UINT8 level;
  56. UINT8 mask;
  57. } tBT_SECURITY;
  58. #endif /* PROFILES_API_H */