/****************************************************************************** * * Copyright (C) 2003-2012 Broadcom Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************//* ... *//****************************************************************************** * * VRCP internal header file. * ******************************************************************************//* ... */#ifndefAVRC_INT_H#defineAVRC_INT_H#include"avct_defs.h"#include"stack/avrc_api.h"#if(AVRC_INCLUDED==TRUE)/* DEBUG FLAGS * * #define META_DEBUG_ENABLED *//* ... *//******************************************************************************* Constants*****************************************************************************//* ... *//* Number of attributes in AVRC SDP record. */#defineAVRC_NUM_ATTR6/* Number of protocol elements in protocol element list. */#defineAVRC_NUM_PROTO_ELEMS2#ifndefAVRC_MIN_CMD_LEN#defineAVRC_MIN_CMD_LEN20#endif#defineAVRC_UNIT_OPRND_BYTES5#defineAVRC_SUB_OPRND_BYTES4#defineAVRC_SUBRSP_OPRND_BYTES3#defineAVRC_SUB_PAGE_MASK7#defineAVRC_SUB_PAGE_SHIFT4#defineAVRC_SUB_EXT_CODE7#defineAVRC_PASS_OP_ID_MASK0x7F#defineAVRC_PASS_STATE_MASK0x80#defineAVRC_CMD_OPRND_PAD0xFF#defineAVRC_CTYPE_MASK0x0F#defineAVRC_SUBTYPE_MASK0xF8#defineAVRC_SUBTYPE_SHIFT3#defineAVRC_SUBID_MASK0x07#defineAVRC_SUBID_IGNORE0x07#defineAVRC_SINGLE_PARAM_SIZE1#defineAVRC_METADATA_PKT_TYPE_MASK0x03#defineAVRC_PASS_THOUGH_MSG_MASK0x80/* MSB of msg_type indicates the PAS THROUGH msg */#defineAVRC_VENDOR_UNIQUE_MASK0x70/* vendor unique id *//* Company ID is 24-bit integer We can not use the macros in stack/bt_types.h */#defineAVRC_CO_ID_TO_BE_STREAM(p,u32){*(p)++=(UINT8)((u32)>>16);*(p)++=(UINT8)((u32)>>8);*(p)++=(UINT8)(u32);}#defineAVRC_BE_STREAM_TO_CO_ID(u32,p){u32=(((UINT32)(*((p)+2)))+(((UINT32)(*((p)+1)))<<8)+(((UINT32)(*(p)))<<16));(p)+=3;}#defineAVRC_AVC_HDR_SIZE3/* ctype, subunit*, opcode */#defineAVRC_MIN_META_HDR_SIZE4/* pdu id(1), packet type(1), param len(2) */#defineAVRC_MIN_BROWSE_HDR_SIZE3/* pdu id(1), param len(2) */#defineAVRC_VENDOR_HDR_SIZE6/* ctype, subunit*, opcode, CO_ID */#defineAVRC_MSG_VENDOR_OFFSET23#defineAVRC_MIN_VENDOR_SIZE(AVRC_MSG_VENDOR_OFFSET+BT_HDR_SIZE+AVRC_MIN_META_HDR_SIZE)#defineAVRC_PASS_THRU_SIZE8#defineAVRC_MSG_PASS_THRU_OFFSET25#defineAVRC_MIN_PASS_THRU_SIZE(AVRC_MSG_PASS_THRU_OFFSET+BT_HDR_SIZE+4)#defineAVRC_MIN_BROWSE_SIZE(AVCT_BROWSE_OFFSET+BT_HDR_SIZE+AVRC_MIN_BROWSE_HDR_SIZE)#defineAVRC_CTRL_PKT_LEN(pf,pk){pf=(UINT8*)((pk)+1)+(pk)->offset+2;}#defineAVRC_MAX_CTRL_DATA_LEN(AVRC_PACKET_LEN)32 defines/******************************************************************************* Type definitions*****************************************************************************//* ... */#if(AVRC_METADATA_INCLUDED==TRUE)/* type for Metadata fragmentation control block */typedefstruct{BT_HDR*p_fmsg;/* the fragmented message */UINT8frag_pdu;/* the PDU ID for fragmentation */BOOLEANfrag_enabled;/* fragmentation flag */}{...}tAVRC_FRAG_CB;/* type for Metadata re-assembly control block */typedefstruct{BT_HDR*p_rmsg;/* the received message */UINT16rasm_offset;/* re-assembly flag, the offset of the start fragment */UINT8rasm_pdu;/* the PDU ID for re-assembly */}{...}tAVRC_RASM_CB;/* ... */#endiftypedefstruct{tAVRC_CONN_CBccb[AVCT_NUM_CONN];#if(AVRC_METADATA_INCLUDED==TRUE)tAVRC_FRAG_CBfcb[AVCT_NUM_CONN];tAVRC_RASM_CBrcb[AVCT_NUM_CONN];/* ... */#endiftAVRC_FIND_CBACK*p_cback;/* pointer to application callback */tSDP_DISCOVERY_DB*p_db;/* pointer to discovery database */UINT16service_uuid;/* service UUID to search */UINT8trace_level;}{...}tAVRC_CB;#ifdef__cplusplusextern"C"{#endif/******************************************************************************** Main Control Block*******************************************************************************/#ifAVRC_DYNAMIC_MEMORY==FALSEexterntAVRC_CBavrc_cb;#elseexterntAVRC_CB*avrc_cb_ptr;#defineavrc_cb(*avrc_cb_ptr)#endifexternBOOLEANavrc_is_valid_pdu_id(UINT8pdu_id);externBOOLEANavrc_is_valid_player_attrib_value(UINT8attrib,UINT8value);externBT_HDR*avrc_alloc_ctrl_pkt(UINT8pdu);externtAVRC_STSavrc_pars_pass_thru(tAVRC_MSG_PASS*p_msg,UINT16*p_vendor_unique_id);externUINT8avrc_opcode_from_pdu(UINT8pdu);externBOOLEANavrc_is_valid_opcode(UINT8opcode);#ifdef__cplusplus}#endif#endif///AVRC_INCLUDED == TRUE#endif/* AVRC_INT_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.