summaryrefslogtreecommitdiffstats
path: root/bta/ar/bta_ar.c
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2012-09-18 01:35:44 -0700
committerMatthew Xie <mattx@google.com>2012-09-18 16:26:28 -0700
commit6ef101187774e30ddba6b46bbedef549a42196ad (patch)
treef36eb347f03083671640fbc750171e3b951e0082 /bta/ar/bta_ar.c
parentf80d3d045eab5f002be4b5e8a3d2d376fdf7581a (diff)
downloadexternal_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.zip
external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.tar.gz
external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.tar.bz2
Initual Bluetooth open source release
First release under Apache source license with updated header files and whitespace cleanups. Also fixed file permission to remove executable bit from source files. Change-Id: I7155903edfc2f491c1cbbd0db108f207852caaa0
Diffstat (limited to 'bta/ar/bta_ar.c')
-rw-r--r--bta/ar/bta_ar.c60
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);