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