/****************************************************************************** * * Copyright (C) 2002-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. * ******************************************************************************//* ... *//****************************************************************************** * * This contains constants definitions and other information from the AVDTP * specification. This file is intended for use internal to AVDT only. * ******************************************************************************//* ... */#ifndefAVDT_DEFS_H#defineAVDT_DEFS_H#include"common/bt_target.h"#if(AVDT_INCLUDED==TRUE)/******************************************************************************* constants*****************************************************************************//* ... *//* signalling packet type */#defineAVDT_PKT_TYPE_SINGLE0/* single packet */#defineAVDT_PKT_TYPE_START1/* start packet */#defineAVDT_PKT_TYPE_CONT2/* continue packet */#defineAVDT_PKT_TYPE_END3/* end packet *//* signalling message type */#defineAVDT_MSG_TYPE_CMD0/* command */#defineAVDT_MSG_TYPE_GRJ1/* general reject */#defineAVDT_MSG_TYPE_RSP2/* response accept */#defineAVDT_MSG_TYPE_REJ3/* response reject *//* signalling messages */#defineAVDT_SIG_DISCOVER1/* discover */#defineAVDT_SIG_GETCAP2/* get capabilities */#defineAVDT_SIG_SETCONFIG3/* set configuration */#defineAVDT_SIG_GETCONFIG4/* get configuration */#defineAVDT_SIG_RECONFIG5/* reconfigure */#defineAVDT_SIG_OPEN6/* open */#defineAVDT_SIG_START7/* start */#defineAVDT_SIG_CLOSE8/* close */#defineAVDT_SIG_SUSPEND9/* suspend */#defineAVDT_SIG_ABORT10/* abort */#defineAVDT_SIG_SECURITY11/* security control */#defineAVDT_SIG_GET_ALLCAP12/* get all capabilities */#defineAVDT_SIG_DELAY_RPT13/* delay report *//* maximum signal value */#defineAVDT_SIG_MAXAVDT_SIG_DELAY_RPT/* used for general reject */#defineAVDT_SIG_NONE0/* some maximum and minimum sizes of signalling messages */#defineAVDT_DISCOVER_REQ_MIN1#defineAVDT_DISCOVER_REQ_MAX124/* service category information element field values */#defineAVDT_CAT_TRANS1/* Media Transport */#defineAVDT_CAT_REPORT2/* Reporting */#defineAVDT_CAT_RECOV3/* Recovery */#defineAVDT_CAT_PROTECT4/* Content Protection */#defineAVDT_CAT_HDRCMP5/* Header Compression */#defineAVDT_CAT_MUX6/* Multiplexing */#defineAVDT_CAT_CODEC7/* Media Codec */#defineAVDT_CAT_DELAY_RPT8/* Delay Reporting */#defineAVDT_CAT_MAX_CURAVDT_CAT_DELAY_RPT/* min/max lengths of service category information elements */#defineAVDT_LEN_TRANS_MIN0#defineAVDT_LEN_REPORT_MIN0#defineAVDT_LEN_RECOV_MIN3#defineAVDT_LEN_PROTECT_MIN2#defineAVDT_LEN_HDRCMP_MIN1#defineAVDT_LEN_MUX_MIN3#defineAVDT_LEN_CODEC_MIN2#defineAVDT_LEN_DELAY_RPT_MIN0#defineAVDT_LEN_TRANS_MAX0#defineAVDT_LEN_REPORT_MAX0#defineAVDT_LEN_RECOV_MAX3#defineAVDT_LEN_PROTECT_MAX255#defineAVDT_LEN_HDRCMP_MAX1#defineAVDT_LEN_MUX_MAX7#defineAVDT_LEN_CODEC_MAX255#defineAVDT_LEN_DELAY_RPT_MAX0/* minimum possible size of configuration or capabilities data */#defineAVDT_LEN_CFG_MIN2/* minimum and maximum lengths for different message types */#defineAVDT_LEN_SINGLE1#defineAVDT_LEN_SETCONFIG_MIN2#defineAVDT_LEN_RECONFIG_MIN1#defineAVDT_LEN_MULTI_MIN1#defineAVDT_LEN_SECURITY_MIN1#defineAVDT_LEN_DELAY_RPT3/* header lengths for different packet types */#defineAVDT_LEN_TYPE_SINGLE2/* single packet */#defineAVDT_LEN_TYPE_START3/* start packet */#defineAVDT_LEN_TYPE_CONT1/* continue packet */#defineAVDT_LEN_TYPE_END1/* end packet *//* length of general reject message */#defineAVDT_LEN_GEN_REJ2/* recovery service capabilities information elements */#defineAVDT_RECOV_MRWS_MIN0x01/* min value for maximum recovery window */#defineAVDT_RECOV_MRWS_MAX0x18/* max value for maximum recovery window */#defineAVDT_RECOV_MNMP_MIN0x01/* min value for maximum number of media packets */#defineAVDT_RECOV_MNMP_MAX0x18/* max value for maximum number of media packets *//* SEID value range */#defineAVDT_SEID_MIN0x01#defineAVDT_SEID_MAX0x3E/* first byte of media packet header */#defineAVDT_MEDIA_OCTET10x80/* for adaptation layer header */#defineAVDT_ALH_LCODE_MASK0x03/* coding of length field */#defineAVDT_ALH_LCODE_NONE0x00/* No length field present. Take length from l2cap */#defineAVDT_ALH_LCODE_16BIT0x01/* 16bit length field */#defineAVDT_ALH_LCODE_9BITM00x02/* 9 bit length field, MSB = 0, 8 LSBs in 1 octet following */#defineAVDT_ALH_LCODE_9BITM10x03/* 9 bit length field, MSB = 1, 8 LSBs in 1 octet following */#defineAVDT_ALH_FRAG_MASK0x04/* set this for continuation packet *//******************************************************************************* message parsing and building macros*****************************************************************************//* ... */#defineAVDT_MSG_PRS_HDR(p,lbl,pkt,msg)\lbl=*(p)>>4;\pkt=(*(p)>>2)&0x03;\msg=*(p)++&0x03;...#defineAVDT_MSG_PRS_DISC(p,seid,in_use,type,tsep)\seid=*(p)>>2;\in_use=(*(p)++>>1)&0x01;\type=*(p)>>4;\tsep=(*(p)++>>3)&0x01;...#defineAVDT_MSG_PRS_SIG(p,sig)\sig=*(p)++&0x3F;...#defineAVDT_MSG_PRS_SEID(p,seid)\seid=*(p)++>>2;...#defineAVDT_MSG_PRS_PKT_TYPE(p,pkt)\pkt=(*(p)>>2)&0x03;...#defineAVDT_MSG_PRS_OCTET1(p,o_v,o_p,o_x,o_cc)\o_v=*(p)>>6;\o_p=(*(p)>>5)&0x01;\o_x=(*(p)>>4)&0x01;\o_cc=*(p)++&0x0F;...#defineAVDT_MSG_PRS_RPT_OCTET1(p,o_v,o_p,o_cc)\o_v=*(p)>>6;\o_p=(*(p)>>5)&0x01;\o_cc=*(p)++&0x1F;...#defineAVDT_MSG_PRS_M_PT(p,m_pt,marker)\marker=*(p)>>7;\m_pt=*(p)++&0x7F;...#defineAVDT_MSG_BLD_HDR(p,lbl,pkt,msg)\*(p)++=(UINT8)((lbl)<<4)|((pkt)<<2)|(msg);...#defineAVDT_MSG_BLD_DISC(p,seid,in_use,type,tsep)\*(p)++=(UINT8)(((seid)<<2)|((in_use)<<1));\*(p)++=(UINT8)(((type)<<4)|((tsep)<<3));...#defineAVDT_MSG_BLD_SIG(p,sig)\*(p)++=(UINT8)(sig);...#defineAVDT_MSG_BLD_SEID(p,seid)\*(p)++=(UINT8)((seid)<<2);...#defineAVDT_MSG_BLD_ERR(p,err)\*(p)++=(UINT8)(err);...#defineAVDT_MSG_BLD_PARAM(p,param)\*(p)++=(UINT8)(param);...#defineAVDT_MSG_BLD_NOSP(p,nosp)\*(p)++=(UINT8)(nosp);...90 defines/* ... */#endif///AVRC_INCLUDED == TRUE/* ... */#endif/* AVDT_DEFS_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.