1 /****************************************************************************** 2 * 3 * Copyright 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 47 * requirements */ 48 /* Inbound call requires authorization */ 49 #define BT_SEC_IN_AUTHORIZE BTM_SEC_IN_AUTHORIZE 50 /* Inbound call requires authentication */ 51 #define BT_SEC_IN_AUTHENTICATE BTM_SEC_IN_AUTHENTICATE 52 /* Inbound call requires encryption */ 53 #define BT_SEC_IN_ENCRYPT BTM_SEC_IN_ENCRYPT 54 /* Outbound call requires authorization */ 55 #define BT_SEC_OUT_AUTHORIZE BTM_SEC_OUT_AUTHORIZE 56 /* Outbound call requires authentication */ 57 #define BT_SEC_OUT_AUTHENTICATE BTM_SEC_OUT_AUTHENTICATE 58 /* Outbound call requires encryption */ 59 #define BT_SEC_OUT_ENCRYPT BTM_SEC_OUT_ENCRYPT 60 61 /***************************************************************************** 62 * Type Definitions 63 ****************************************************************************/ 64 65 /* 66 * Security Definitions 67 * This following definitions are used to indicate the security 68 * requirements for a service. 69 */ 70 typedef struct { 71 uint8_t level; 72 uint8_t mask; 73 } tBT_SECURITY; 74 75 #endif /* PROFILES_API_H */ 76