diff options
Diffstat (limited to 'bta/ar/bta_ar.c')
-rw-r--r-- | bta/ar/bta_ar.c | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/bta/ar/bta_ar.c b/bta/ar/bta_ar.c index b3e897c..89b732a 100644 --- a/bta/ar/bta_ar.c +++ b/bta/ar/bta_ar.c @@ -1,14 +1,26 @@ -/***************************************************************************** -** -** Name: bta_ar.c -** -** Description: This is the implementation for the -** audio/video registration module. -** -** Copyright (c) 2008-2009, Broadcom Corp., All Rights Reserved. -** Widcomm Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2008-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 is the implementation for the audio/video registration module. + * + ******************************************************************************/ #include <string.h> #include "bta_ar_api.h" @@ -24,7 +36,7 @@ tBTA_AR_CB bta_ar_cb; ** ** Function bta_ar_id ** -** Description This function maps sys_id to ar id mask. +** Description This function maps sys_id to ar id mask. ** ** Returns void ** @@ -36,7 +48,7 @@ static UINT8 bta_ar_id(tBTA_SYS_ID sys_id) { mask = BTA_AR_AV_MASK; } - else if (sys_id == BTA_ID_AVK) + else if (sys_id == BTA_ID_AVK) { mask = BTA_AR_AVK_MASK; } @@ -48,7 +60,7 @@ static UINT8 bta_ar_id(tBTA_SYS_ID sys_id) ** ** Function bta_ar_init ** -** Description This function is called to register to AVDTP. +** Description This function is called to register to AVDTP. ** ** Returns void ** @@ -63,7 +75,7 @@ void bta_ar_init(void) ** ** Function bta_ar_reg_avdt ** -** Description This function is called to register to AVDTP. +** Description This function is called to register to AVDTP. ** ** Returns void ** @@ -95,21 +107,21 @@ void bta_ar_reg_avdt(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback, tBTA_SYS_ID sy bta_ar_cb.p_av_conn_cback = p_cback; mask = BTA_AR_AV_MASK; } - else if (sys_id == BTA_ID_AVK) + else if (sys_id == BTA_ID_AVK) { bta_ar_cb.p_avk_conn_cback = p_cback; mask = BTA_AR_AVK_MASK; } #if (BTA_AR_DEBUG == TRUE) - else - { + else + { APPL_TRACE_ERROR1("bta_ar_reg_avdt: the registration is from wrong sys_id:%d", sys_id); } #endif if (mask) { - if (bta_ar_cb.avdt_registered == 0) + if (bta_ar_cb.avdt_registered == 0) { AVDT_Register(p_reg, bta_ar_avdt_cback); } @@ -121,7 +133,7 @@ void bta_ar_reg_avdt(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback, tBTA_SYS_ID sy ** ** Function bta_ar_dereg_avdt ** -** Description This function is called to de-register from AVDTP. +** Description This function is called to de-register from AVDTP. ** ** Returns void ** @@ -135,7 +147,7 @@ void bta_ar_dereg_avdt(tBTA_SYS_ID sys_id) bta_ar_cb.p_av_conn_cback = NULL; mask = BTA_AR_AV_MASK; } - else if (sys_id == BTA_ID_AVK) + else if (sys_id == BTA_ID_AVK) { bta_ar_cb.p_avk_conn_cback = NULL; mask = BTA_AR_AVK_MASK; @@ -170,7 +182,7 @@ void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, BD_ADDR bd_addr) (*bta_ar_cb.p_avk_conn_cback)(0, bd_addr, event, &data); } } - else if (sys_id == BTA_ID_AVK) + else if (sys_id == BTA_ID_AVK) { if (bta_ar_cb.p_av_conn_cback) { @@ -194,7 +206,7 @@ void bta_ar_reg_avct(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask, tBTA_SYS_ID sys_ if (mask) { - if (bta_ar_cb.avct_registered == 0) + if (bta_ar_cb.avct_registered == 0) { AVCT_Register(mtu, mtu_br, sec_mask); } @@ -230,7 +242,7 @@ void bta_ar_dereg_avct(tBTA_SYS_ID sys_id) ** Returns void ** ******************************************************************************/ -void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_name, +void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_name, UINT16 categories, tBTA_SYS_ID sys_id) { UINT8 mask = bta_ar_id (sys_id); |