From 6ef101187774e30ddba6b46bbedef549a42196ad Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Tue, 18 Sep 2012 01:35:44 -0700 Subject: 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 --- btif/co/bta_ag_co.c | 53 ++--- btif/co/bta_av_co.c | 35 +++- btif/co/bta_dm_co.c | 53 ++--- btif/co/bta_fs_co.c | 53 ++--- btif/co/bta_hh_co.c | 51 +---- btif/co/bta_hl_co.c | 35 +++- btif/co/bta_pan_co.c | 53 ++--- btif/co/bta_sys_co.c | 53 ++--- btif/include/btif_api.h | 110 ++-------- btif/include/btif_av.h | 83 ++------ btif/include/btif_av_api.h | 70 ++----- btif/include/btif_av_co.h | 66 ++---- btif/include/btif_common.h | 124 +++++------ btif/include/btif_config.h | 76 +++---- btif/include/btif_config_util.h | 72 +++---- btif/include/btif_dm.h | 83 +++----- btif/include/btif_hh.h | 105 ++++------ btif/include/btif_hl.h | 420 +++++++++++++++++--------------------- btif/include/btif_media.h | 87 +++----- btif/include/btif_pan.h | 66 ++---- btif/include/btif_pan_internal.h | 85 ++++---- btif/include/btif_profile_queue.h | 62 ++---- btif/include/btif_sm.h | 76 ++----- btif/include/btif_sock.h | 65 ++---- btif/include/btif_sock_rfc.h | 68 ++---- btif/include/btif_sock_sdp.h | 65 ++---- btif/include/btif_sock_thread.h | 88 +++----- btif/include/btif_sock_util.h | 74 +++---- btif/include/btif_storage.h | 101 +++------ btif/include/btif_util.h | 76 ++----- btif/include/uinput.h | 63 ++---- btif/src/bluetooth.c | 51 +---- btif/src/btif_av.c | 49 +---- btif/src/btif_config.c | 51 +---- btif/src/btif_config_util.cpp | 54 ++--- btif/src/btif_core.c | 51 +---- btif/src/btif_dm.c | 53 ++--- btif/src/btif_hf.c | 51 +---- btif/src/btif_hh.c | 59 ++---- btif/src/btif_hl.c | 51 +---- btif/src/btif_media_task.c | 49 +---- btif/src/btif_pan.c | 53 ++--- btif/src/btif_profile_queue.c | 49 +---- btif/src/btif_rc.c | 49 +---- btif/src/btif_sm.c | 49 +---- btif/src/btif_sock.c | 53 ++--- btif/src/btif_sock_rfc.c | 53 ++--- btif/src/btif_sock_sdp.c | 51 +---- btif/src/btif_sock_thread.c | 53 ++--- btif/src/btif_sock_util.c | 53 ++--- btif/src/btif_storage.c | 51 +---- btif/src/btif_util.c | 51 +---- 52 files changed, 1088 insertions(+), 2567 deletions(-) mode change 100755 => 100644 btif/co/bta_hh_co.c mode change 100755 => 100644 btif/include/btif_util.h mode change 100755 => 100644 btif/src/btif_core.c mode change 100755 => 100644 btif/src/btif_dm.c mode change 100755 => 100644 btif/src/btif_hh.c mode change 100755 => 100644 btif/src/btif_hl.c mode change 100755 => 100644 btif/src/btif_rc.c mode change 100755 => 100644 btif/src/btif_storage.c mode change 100755 => 100644 btif/src/btif_util.c (limited to 'btif') diff --git a/btif/co/bta_ag_co.c b/btif/co/bta_ag_co.c index 92c96c3..cd969f8 100644 --- a/btif/co/bta_ag_co.c +++ b/btif/co/bta_ag_co.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ #include "gki.h" #include "bta_api.h" #include "bta_sys.h" diff --git a/btif/co/bta_av_co.c b/btif/co/bta_av_co.c index f5c619e..6089532 100644 --- a/btif/co/bta_av_co.c +++ b/btif/co/bta_av_co.c @@ -1,14 +1,27 @@ -/***************************************************************************** - ** - ** Name: bta_av_co.c - ** - ** Description: This is the advanced audio/video call-out function - ** implementation for BTIF. - ** - ** Copyright (c) 2004-2012, Broadcom Corp., All Rights Reserved. - ** Broadcom Bluetooth Core. Proprietary and confidential - ** - *****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2004-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 advanced audio/video call-out function implementation for + * BTIF. + * + ******************************************************************************/ #include "string.h" #include "a2d_api.h" diff --git a/btif/co/bta_dm_co.c b/btif/co/bta_dm_co.c index 7c85476..611af2d 100644 --- a/btif/co/bta_dm_co.c +++ b/btif/co/bta_dm_co.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ #include #include diff --git a/btif/co/bta_fs_co.c b/btif/co/bta_fs_co.c index 8834555..ffc146b 100644 --- a/btif/co/bta_fs_co.c +++ b/btif/co/bta_fs_co.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ #include #include #include diff --git a/btif/co/bta_hh_co.c b/btif/co/bta_hh_co.c old mode 100755 new mode 100644 index a2cbd7b..7cef2b3 --- a/btif/co/bta_hh_co.c +++ b/btif/co/bta_hh_co.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ //#if (defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE)) diff --git a/btif/co/bta_hl_co.c b/btif/co/bta_hl_co.c index 1cfbc81..a7a9061 100644 --- a/btif/co/bta_hl_co.c +++ b/btif/co/bta_hl_co.c @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: bta_hl_co.c -** -** Description: This is the implementation file for the HeaLth device profile -** (HL) subsystem call-out functions. -** -** Copyright (c) 2009, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2009-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 file for the HeaLth device profile (HL) + * subsystem call-out functions. + * + ******************************************************************************/ #include #include diff --git a/btif/co/bta_pan_co.c b/btif/co/bta_pan_co.c index 63f7c6c..e78a5f8 100644 --- a/btif/co/bta_pan_co.c +++ b/btif/co/bta_pan_co.c @@ -1,49 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/co/bta_sys_co.c b/btif/co/bta_sys_co.c index a2d0d44..b7768ad 100644 --- a/btif/co/bta_sys_co.c +++ b/btif/co/bta_sys_co.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ #include "bta_sys.h" #include "bta_sys_ci.h" diff --git a/btif/include/btif_api.h b/btif/include/btif_api.h index 7916b3d..c787bec 100644 --- a/btif/include/btif_api.h +++ b/btif/include/btif_api.h @@ -2,50 +2,21 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ -/***************************************************************************** +/******************************************************************************* * * Filename: btif_api.h * @@ -54,7 +25,7 @@ * require headerfiles as they would be accessed through * callout/callins. * - *****************************************************************************/ + *******************************************************************************/ #ifndef BTIF_API_H #define BTIF_API_H @@ -62,31 +33,9 @@ #include "btif_common.h" #include "btif_dm.h" -/***************************************************************************** -** Constants & Macros -******************************************************************************/ - -/***************************************************************************** -** Type definitions for callback functions -******************************************************************************/ - -/***************************************************************************** -** Type definitions and return values -******************************************************************************/ - -/***************************************************************************** -** Extern variables and functions -******************************************************************************/ - -/***************************************************************************** -** Functions -******************************************************************************/ - - -/***************************************************************************** +/******************************************************************************* ** BTIF CORE API -******************************************************************************/ - +********************************************************************************/ /******************************************************************************* ** @@ -97,7 +46,6 @@ ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_init_bluetooth(void); /******************************************************************************* @@ -109,7 +57,6 @@ bt_status_t btif_init_bluetooth(void); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_enable_bluetooth(void); /******************************************************************************* @@ -123,7 +70,6 @@ bt_status_t btif_enable_bluetooth(void); ** Returns void ** *******************************************************************************/ - bt_status_t btif_disable_bluetooth(void); /******************************************************************************* @@ -137,10 +83,8 @@ bt_status_t btif_disable_bluetooth(void); ** Returns void ** *******************************************************************************/ - bt_status_t btif_shutdown_bluetooth(void); - /******************************************************************************* ** ** Function btif_get_adapter_properties @@ -150,7 +94,6 @@ bt_status_t btif_shutdown_bluetooth(void); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_get_adapter_properties(void); /******************************************************************************* @@ -162,7 +105,6 @@ bt_status_t btif_get_adapter_properties(void); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_get_adapter_property( bt_property_type_t type); /******************************************************************************* @@ -175,7 +117,6 @@ bt_status_t btif_get_adapter_property( bt_property_type_t type); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_set_adapter_property( const bt_property_t *property); /******************************************************************************* @@ -187,11 +128,9 @@ bt_status_t btif_set_adapter_property( const bt_property_t *property); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_get_remote_device_property( bt_bdaddr_t *remote_addr, bt_property_type_t type); - /******************************************************************************* ** ** Function btif_get_remote_device_properties @@ -201,10 +140,8 @@ bt_status_t btif_get_remote_device_property( bt_bdaddr_t *remote_addr, ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_get_remote_device_properties( bt_bdaddr_t *remote_addr); - /******************************************************************************* ** ** Function btif_set_remote_device_property @@ -216,11 +153,9 @@ bt_status_t btif_get_remote_device_properties( bt_bdaddr_t *remote_addr); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_set_remote_device_property( bt_bdaddr_t *remote_addr, const bt_property_t *property); - /******************************************************************************* ** ** Function btif_get_remote_service_record @@ -231,13 +166,13 @@ bt_status_t btif_set_remote_device_property( bt_bdaddr_t *remote_addr, ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_get_remote_service_record( bt_bdaddr_t *remote_addr, bt_uuid_t *uuid); -/***************************************************************************** + +/******************************************************************************* ** BTIF DM API -******************************************************************************/ +********************************************************************************/ /******************************************************************************* ** @@ -249,7 +184,6 @@ bt_status_t btif_get_remote_service_record( bt_bdaddr_t *remote_addr, ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_start_discovery(void); /******************************************************************************* @@ -261,7 +195,6 @@ bt_status_t btif_dm_start_discovery(void); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_cancel_discovery(void); /******************************************************************************* @@ -273,7 +206,6 @@ bt_status_t btif_dm_cancel_discovery(void); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_create_bond(const bt_bdaddr_t *bd_addr); /******************************************************************************* @@ -285,7 +217,6 @@ bt_status_t btif_dm_create_bond(const bt_bdaddr_t *bd_addr); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr); /******************************************************************************* @@ -297,7 +228,6 @@ bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr); /******************************************************************************* @@ -309,7 +239,6 @@ bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_pin_reply( const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code); @@ -322,7 +251,6 @@ bt_status_t btif_dm_pin_reply( const bt_bdaddr_t *bd_addr, uint8_t accept, ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_passkey_reply( const bt_bdaddr_t *bd_addr, uint8_t accept, uint32_t passkey); @@ -335,7 +263,6 @@ bt_status_t btif_dm_passkey_reply( const bt_bdaddr_t *bd_addr, ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_ssp_reply( const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant, uint8_t accept, uint32_t passkey); @@ -349,7 +276,6 @@ bt_status_t btif_dm_ssp_reply( const bt_bdaddr_t *bd_addr, ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_get_adapter_property(bt_property_t *prop); /******************************************************************************* @@ -361,7 +287,6 @@ bt_status_t btif_dm_get_adapter_property(bt_property_t *prop); ** Returns bt_status_t ** *******************************************************************************/ - bt_status_t btif_dm_get_remote_service_record(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid); @@ -401,4 +326,3 @@ bt_status_t btif_dut_mode_configure(uint8_t enable); bt_status_t btif_dut_mode_send(uint16_t opcode, uint8_t *buf, uint8_t len); #endif /* BTIF_API_H */ - diff --git a/btif/include/btif_av.h b/btif/include/btif_av.h index 2c08a99..c6bd20a 100644 --- a/btif/include/btif_av.h +++ b/btif/include/btif_av.h @@ -2,57 +2,28 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ -/***************************************************************************** +/******************************************************************************* * * Filename: btif_av.h * * Description: Main API header file for all BTIF AV functions accessed * from internal stack. * - *****************************************************************************/ + *******************************************************************************/ #ifndef BTIF_AV_H #define BTIF_AV_H @@ -62,14 +33,9 @@ #include "bta_av_api.h" -/***************************************************************************** -** Constants & Macros -******************************************************************************/ - -/***************************************************************************** +/******************************************************************************* ** Type definitions for callback functions -******************************************************************************/ - +********************************************************************************/ typedef enum { /* Reuse BTA_AV_XXX_EVT - No need to redefine them here */ @@ -81,26 +47,10 @@ typedef enum { BTIF_AV_RECONFIGURE_REQ_EVT, } btif_av_sm_event_t; -/***************************************************************************** -** Type definitions and return values -******************************************************************************/ -/***************************************************************************** -** Extern variables and functions -******************************************************************************/ - -/***************************************************************************** -** Functions -******************************************************************************/ - - -/***************************************************************************** -** BTIF CORE API -******************************************************************************/ - -/***************************************************************************** +/******************************************************************************* ** BTIF AV API -******************************************************************************/ +********************************************************************************/ /******************************************************************************* ** @@ -164,4 +114,3 @@ void btif_dispatch_sm_event(btif_av_sm_event_t event, void *p_data, int len); bt_status_t btif_av_init(void); #endif /* BTIF_AV_H */ - diff --git a/btif/include/btif_av_api.h b/btif/include/btif_av_api.h index 4cee7b5..86cd40b 100644 --- a/btif/include/btif_av_api.h +++ b/btif/include/btif_av_api.h @@ -2,58 +2,30 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ /***************************************************************************** ** ** Name: btif_av_api.h ** ** Description: This is the public interface file for the advanced - ** audio/video streaming (AV) subsystem of BTIF, Widcomm's + ** audio/video streaming (AV) subsystem of BTIF, Broadcom's ** Bluetooth application layer for mobile phones. ** *****************************************************************************/ + #ifndef BTIF_AV_API_H #define BTIF_AV_API_H @@ -70,7 +42,7 @@ ** Constants and data types *****************************************************************************/ -/* codec type */ +/* Codec type */ #define BTIF_AV_CODEC_NONE 0xFF #define BTIF_AV_CODEC_SBC A2D_MEDIA_CT_SBC /* SBC media codec type */ @@ -93,7 +65,7 @@ typedef UINT8 tBTIF_AV_CHNL; typedef UINT8 tBTIF_AV_HNDL; -/* operation id list for BTIF_AvRemoteCmd */ +/* Operation id list for BTIF_AvRemoteCmd */ #define BTIF_AV_ID_SELECT 0x00 /* select */ #define BTIF_AV_ID_UP 0x01 /* up */ #define BTIF_AV_ID_DOWN 0x02 /* down */ @@ -155,7 +127,7 @@ typedef UINT8 tBTIF_AV_HNDL; typedef UINT8 tBTIF_AV_RC; -/* state flag for pass through command */ +/* State flag for pass through command */ #define BTIF_AV_STATE_PRESS 0 /* key pressed */ #define BTIF_AV_STATE_RELEASE 1 /* key released */ @@ -163,7 +135,7 @@ typedef UINT8 tBTIF_AV_STATE; typedef UINT8 tBTIF_AV_RC_HNDL; -/* command codes for BTIF_AvVendorCmd */ +/* Command codes for BTIF_AvVendorCmd */ #define BTIF_AV_CMD_CTRL 0 #define BTIF_AV_CMD_STATUS 1 #define BTIF_AV_CMD_SPEC_INQ 2 @@ -199,16 +171,17 @@ typedef UINT8 tBTIF_AV_FEEDING_MODE; #define BTIF_AV_CHANNEL_MODE_DUAL A2D_SBC_IE_CH_MD_DUAL typedef UINT8 tBTIF_AV_CHANNEL_MODE; -/* + +/** * Structure used to configure the AV codec capabilities/config */ typedef struct { tBTIF_AV_CODEC_ID id; /* Codec ID (in terms of BTIF) */ - UINT8 info[AVDT_CODEC_SIZE]; /* Codec info (can be config or capabilities) */ + UINT8 info[AVDT_CODEC_SIZE]; /* Codec info (can be config or capabilities) */ } tBTIF_AV_CODEC_INFO; -/* +/** * Structure used to configure the AV media feeding */ typedef struct @@ -218,10 +191,9 @@ typedef struct UINT8 bit_per_sample; /* Number of bits per sample (8, 16) */ } tBTIF_AV_MEDIA_FEED_CFG_PCM; - typedef union { - tBTIF_AV_MEDIA_FEED_CFG_PCM pcm; /* raw PCM feeding format */ + tBTIF_AV_MEDIA_FEED_CFG_PCM pcm; /* Raw PCM feeding format */ }tBTIF_AV_MEDIA_FEED_CFG; typedef struct diff --git a/btif/include/btif_av_co.h b/btif/include/btif_av_co.h index 9945e8e..20e9a1e 100644 --- a/btif/include/btif_av_co.h +++ b/btif/include/btif_av_co.h @@ -2,62 +2,29 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ - -/***************************************************************************** - * - * Filename: btif_av_co.h - * - * Description: - * - *****************************************************************************/ + ******************************************************************************/ #ifndef BTIF_AV_CO_H #define BTIF_AV_CO_H #include "btif_media.h" +/******************************************************************************* +** Constants & Macros +********************************************************************************/ + enum { BTIF_SV_AV_AA_SBC_INDEX = 0, @@ -66,6 +33,10 @@ enum /******************************************************************************* +** Functions +********************************************************************************/ + +/******************************************************************************* ** ** Function bta_av_co_cp_is_active ** @@ -199,5 +170,4 @@ BOOLEAN bta_av_co_peer_cp_supported(tBTA_AV_HNDL hndl); *******************************************************************************/ BOOLEAN bta_av_co_get_remote_bitpool_pref(UINT8 *min, UINT8 *max); - #endif diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h index 8e5c275..7f3b039 100644 --- a/btif/include/btif_common.h +++ b/btif/include/btif_common.h @@ -1,57 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - -/************************************************************************************ - * - * Filename: btif_common.h - * - * Description: - * - ***********************************************************************************/ + ******************************************************************************/ #ifndef BTIF_COMMON_H #define BTIF_COMMON_H @@ -66,21 +29,22 @@ #include -/************************************************************************************ +/******************************************************************************* ** Constants & Macros -************************************************************************************/ +********************************************************************************/ -#define ASSERTC(cond, msg, val) if (!(cond)) {ALOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);} +#define ASSERTC(cond, msg, val) if (!(cond)) { ALOGE( \ + "### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);} /* Calculate start of event enumeration; id is top 8 bits of event */ #define BTIF_SIG_START(id) ((id) << 8) -/* for upstream the MSB bit is always SET */ +/* For upstream the MSB bit is always SET */ #define BTIF_SIG_CB_BIT (0x8000) #define BTIF_SIG_CB_START(id) (((id) << 8) | BTIF_SIG_CB_BIT) /* BTIF sub-systems */ -#define BTIF_CORE 0 /* core */ +#define BTIF_CORE 0 #define BTIF_DM 1 #define BTIF_HFP 2 #define BTIF_AV 3 @@ -97,8 +61,10 @@ extern bt_callbacks_t *bt_hal_cbacks; ASSERTC(0, "Callback is NULL", 0); \ } -/* btif events for requests that require context switch to btif task - on downstreams path */ +/** + * BTIF events for requests that require context switch to btif task + * on downstreams path + */ enum { BTIF_CORE_API_START = BTIF_SIG_START(BTIF_CORE), @@ -123,12 +89,13 @@ enum BTIF_AV_API_START = BTIF_SIG_START(BTIF_AV), /* add here */ - }; -/* btif events for callbacks that require context switch to btif task - on upstream path - Typically these would be non-BTA events - that are generated by the BTIF layer */ +/** + * BTIF events for callbacks that require context switch to btif task + * on upstream path - Typically these would be non-BTA events + * that are generated by the BTIF layer. + */ enum { BTIF_CORE_CB_START = BTIF_SIG_CB_START(BTIF_CORE), @@ -149,33 +116,38 @@ enum }; /* Macro definitions for BD ADDR persistence */ -/* PROPERTY_BT_BDADDR_PATH - The property key stores the storage location of Bluetooth Device Address -*/ + +/** + * PROPERTY_BT_BDADDR_PATH + * The property key stores the storage location of Bluetooth Device Address + */ #ifndef PROPERTY_BT_BDADDR_PATH #define PROPERTY_BT_BDADDR_PATH "ro.bt.bdaddr_path" #endif -/* PERSIST_BDADDR_PROPERTY - If there is no valid bdaddr available from PROPERTY_BT_BDADDR_PATH, - generating a random BDADDR and keeping it in the PERSIST_BDADDR_DROP. -*/ +/** + * PERSIST_BDADDR_PROPERTY + * If there is no valid bdaddr available from PROPERTY_BT_BDADDR_PATH, + * generating a random BDADDR and keeping it in the PERSIST_BDADDR_DROP. + */ #ifndef PERSIST_BDADDR_PROPERTY #define PERSIST_BDADDR_PROPERTY "persist.service.bdroid.bdaddr" #endif #define FACTORY_BT_BDADDR_STORAGE_LEN 17 -/************************************************************************************ + +/******************************************************************************* ** Type definitions for callback functions -************************************************************************************/ +********************************************************************************/ typedef void (tBTIF_CBACK) (UINT16 event, char *p_param); typedef void (tBTIF_COPY_CBACK) (UINT16 event, char *p_dest, char *p_src); -/************************************************************************************ + +/******************************************************************************* ** Type definitions and return values -************************************************************************************/ +********************************************************************************/ /* this type handles all btif context switches between BTU and HAL */ typedef struct @@ -189,23 +161,23 @@ typedef struct } tBTIF_CONTEXT_SWITCH_CBACK; -/************************************************************************************ +/******************************************************************************* ** Functions -************************************************************************************/ -bt_status_t btif_transfer_context (tBTIF_CBACK *p_cback, UINT16 event, char* p_params, int param_len, tBTIF_COPY_CBACK *p_copy_cback); +********************************************************************************/ + +bt_status_t btif_transfer_context (tBTIF_CBACK *p_cback, UINT16 event, char* p_params, + int param_len, tBTIF_COPY_CBACK *p_copy_cback); tBTA_SERVICE_MASK btif_get_enabled_services_mask(void); bt_status_t btif_enable_service(tBTA_SERVICE_ID service_id); bt_status_t btif_disable_service(tBTA_SERVICE_ID service_id); int btif_is_enabled(void); -/* +/** * BTIF_Events */ - void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd); void btif_disable_bluetooth_evt(void); void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props, bt_property_t *p_props); void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t *remote_addr, uint32_t num_props, bt_property_t *p_props); #endif /* BTIF_COMMON_H */ - diff --git a/btif/include/btif_config.h b/btif/include/btif_config.h index 7188a0f..8fc9eb2 100644 --- a/btif/include/btif_config.h +++ b/btif/include/btif_config.h @@ -1,71 +1,52 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - + ******************************************************************************/ -/************************************************************************************ +/******************************************************************************* * * Filename: btif_config.h * * Description: Bluetooth configuration Interface * - * - ***********************************************************************************/ + *******************************************************************************/ + +#ifndef BTIF_CONFIG_H +#define BTIF_CONFIG_H -#ifndef btif_config_h_ -#define btif_config_h_ #ifdef __cplusplus #include extern "C" { #endif + +/******************************************************************************* +** Constants & Macros +********************************************************************************/ + #define BTIF_CFG_TYPE_INVALID 0 #define BTIF_CFG_TYPE_STR 1 #define BTIF_CFG_TYPE_INT (1 << 1) #define BTIF_CFG_TYPE_BIN (1 << 2) #define BTIF_CFG_TYPE_VOLATILE (1 << 15) + + +/******************************************************************************* +** Functions +********************************************************************************/ + int btif_config_init(); int btif_config_exist(const char* section, const char* key, const char* name); @@ -88,6 +69,7 @@ int btif_config_enum(btif_config_enum_callback cb, void* user_data); int btif_config_save(); void btif_config_flush(); + #ifdef __cplusplus } #endif diff --git a/btif/include/btif_config_util.h b/btif/include/btif_config_util.h index 0612796..3a2f53e 100644 --- a/btif/include/btif_config_util.h +++ b/btif/include/btif_config_util.h @@ -1,50 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ - + ******************************************************************************/ /************************************************************************************ * @@ -52,14 +22,19 @@ * * Description: Bluetooth configuration utility api * - * ***********************************************************************************/ -#ifndef btif_config_util_h_ -#define btif_config_util_h_ +#ifndef BTIF_CONFIG_UTIL_H +#define BTIF_CONFIG_UTIL_H + #ifdef __cplusplus extern "C" { #endif + +/******************************************************************************* +** Constants & Macros +********************************************************************************/ + #define BLUEZ_PATH "/data/misc/bluetoothd/" #define BLUEZ_PATH_BAK "/data/misc/bluetoothd_bak" #define BLUEZ_LINKKEY "linkkeys" @@ -69,10 +44,17 @@ extern "C" { #define BLUEZ_TYPES "types" #define BLUEZ_CONFIG "config" #define BLUEZ_ALIASES "aliases" + + +/******************************************************************************* +** Functions +********************************************************************************/ + int btif_config_save_file(const char* file_name); int btif_config_load_file(const char* file_name); int load_bluez_adapter_info(char* adapter_path, int size); int load_bluez_linkkeys(const char* adapter_path); + #ifdef __cplusplus } #endif diff --git a/btif/include/btif_dm.h b/btif/include/btif_dm.h index 71f2c5e..2d73c45 100644 --- a/btif/include/btif_dm.h +++ b/btif/include/btif_dm.h @@ -1,72 +1,42 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - -/************************************************************************************ - * - * Filename: btif_dm.h - * - * Description: - * - ***********************************************************************************/ + ******************************************************************************/ #ifndef BTIF_DM_H #define BTIF_DM_H -/************************************************************************************ +/******************************************************************************* ** Functions -************************************************************************************/ +********************************************************************************/ -/******************************************************************************* -** -** Description BTIF callback to switch context from bte to btif -** -*******************************************************************************/ +/** + * BTIF callback to switch context from bte to btif + */ void bte_dm_evt(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *p_data); +/** + * Notify BT disable being initiated. DM may chose to abort + * pending commands, like pairing + */ +void btif_dm_on_disable(void); + +/** + * Out-of-band functions + */ #if (BTM_OOB_INCLUDED == TRUE) void btif_dm_set_oob_for_io_req(tBTA_OOB_DATA *p_oob_data); #ifdef BTIF_DM_OOB_TEST @@ -76,7 +46,4 @@ BOOLEAN btif_dm_proc_rmt_oob(BD_ADDR bd_addr, BT_OCTET16 p_c, BT_OCTET16 p_r); #endif /* BTIF_DM_OOB_TEST */ #endif /* BTM_OOB_INCLUDED */ -/* Notify BT disable being initiated. DM may chose to abort pending commands, like pairing*/ -void btif_dm_on_disable(void); - #endif diff --git a/btif/include/btif_hh.h b/btif/include/btif_hh.h index ad438f9..4f31002 100644 --- a/btif/include/btif_hh.h +++ b/btif/include/btif_hh.h @@ -2,57 +2,19 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ - -/***************************************************************************** -** -** Name: btif_hh.h -** -** Description: -** -******************************************************************************/ - + ******************************************************************************/ #ifndef BTIF_HH_H #define BTIF_HH_H @@ -62,6 +24,9 @@ #include #include "bta_hh_api.h" +/******************************************************************************* +** Constants & Macros +********************************************************************************/ #define BTIF_HH_MAX_HID 8 #define BTIF_HH_MAX_ADDED_DEV 32 @@ -71,6 +36,22 @@ #define BTIF_HH_KEYSTATE_MASK_CAPSLOCK 0x02 #define BTIF_HH_KEYSTATE_MASK_SCROLLLOCK 0x04 + +/******************************************************************************* +** Type definitions and return values +********************************************************************************/ + +typedef enum +{ + BTIF_HH_DISABLED = 0, + BTIF_HH_ENABLED, + BTIF_HH_DISABLING, + BTIF_HH_DEV_UNKNOWN, + BTIF_HH_DEV_CONNECTING, + BTIF_HH_DEV_CONNECTED, + BTIF_HH_DEV_DISCONNECTED +} BTIF_HH_STATUS; + typedef struct { bthh_connection_state_t dev_status; @@ -83,7 +64,7 @@ typedef struct BT_HDR *p_buf; } btif_hh_device_t; -//Control block to maintain properties of devices +/* Control block to maintain properties of devices */ typedef struct { UINT8 dev_handle; @@ -91,18 +72,10 @@ typedef struct tBTA_HH_ATTR_MASK attr_mask; } btif_hh_added_device_t; -typedef enum -{ - BTIF_HH_DISABLED = 0, - BTIF_HH_ENABLED, - BTIF_HH_DISABLING, - BTIF_HH_DEV_UNKNOWN, - BTIF_HH_DEV_CONNECTING, - BTIF_HH_DEV_CONNECTED, - BTIF_HH_DEV_DISCONNECTED -} BTIF_HH_STATUS; - -// BTIF-HH control block to maintain added devices and current connected hid device +/** + * BTIF-HH control block to maintain added devices and currently + * connected hid devices + */ typedef struct { BTIF_HH_STATUS status; @@ -112,16 +85,18 @@ typedef struct btif_hh_device_t *p_curr_dev; } btif_hh_cb_t; + +/******************************************************************************* +** Functions +********************************************************************************/ + extern btif_hh_cb_t btif_hh_cb; extern btif_hh_device_t *btif_hh_find_connected_dev_by_handle(UINT8 handle); extern void btif_hh_remove_device(bt_bdaddr_t bd_addr); -BOOLEAN btif_hh_add_added_dev(bt_bdaddr_t bda, tBTA_HH_ATTR_MASK attr_mask); -extern bt_status_t btif_hh_virtual_unpug(bt_bdaddr_t *bd_addr); +extern bt_status_t btif_hh_virtual_unplug(bt_bdaddr_t *bd_addr); extern void btif_hh_disconnect(bt_bdaddr_t *bd_addr); BOOLEAN btif_hh_add_added_dev(bt_bdaddr_t bd_addr, tBTA_HH_ATTR_MASK attr_mask); - #endif - diff --git a/btif/include/btif_hl.h b/btif/include/btif_hl.h index cac6eb2..0573082 100644 --- a/btif/include/btif_hl.h +++ b/btif/include/btif_hl.h @@ -1,65 +1,27 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - -/************************************************************************************ - * - * Filename: btif_hl.h - * - * Description: - * - ***********************************************************************************/ + ******************************************************************************/ #ifndef BTIF_HL_H #define BTIF_HL_H -/************************************************************************************ -** Functions -************************************************************************************/ - +/******************************************************************************* +** Constants & Macros +********************************************************************************/ #define BTIF_HL_DATA_TYPE_NONE 0x0000 #define BTIF_HL_DATA_TYPE_PULSE_OXIMETER 0x1004 /* from BT assigned number */ @@ -72,9 +34,74 @@ #define BTIF_HL_CCH_NUM_FILTER_ELEMS 3 #define BTIF_HL_APPLICATION_NAME_LEN 512 - #define BTIF_HL_NV_MAX_APPS 16 + +/******************************************************************************* +** Type definitions and return values +********************************************************************************/ + +typedef enum +{ + BTIF_HL_SOC_STATE_IDLE, + BTIF_HL_SOC_STATE_W4_ADD, + BTIF_HL_SOC_STATE_W4_CONN, + BTIF_HL_SOC_STATE_W4_READ, + BTIF_HL_SOC_STATE_W4_REL +} btif_hl_soc_state_t; + +typedef enum +{ + BTIF_HL_STATE_DISABLED, + BTIF_HL_STATE_DISABLING, + BTIF_HL_STATE_ENABLED, + BTIF_HL_STATE_ENABLING, +} btif_hl_state_t; + +typedef enum +{ + BTIF_HL_CCH_OP_NONE, + BTIF_HL_CCH_OP_MDEP_FILTERING, + BTIF_HL_CCH_OP_MATCHED_CTRL_PSM, + BTIF_HL_CCH_OP_DCH_OPEN, + BTIF_HL_CCH_OP_DCH_RECONNECT, + BTIF_HL_CCH_OP_DCH_ECHO_TEST +} btif_hl_cch_op_t; + +typedef enum +{ + BTIF_HL_PEND_DCH_OP_NONE, + BTIF_HL_PEND_DCH_OP_DELETE_MDL, + BTIF_HL_PEND_DCH_OP_OPEN, + BTIF_HL_PEND_DCH_OP_RECONNECT +} btif_hl_pend_dch_op_t; + +typedef enum +{ + BTIF_HL_DCH_OP_NONE, + BTIF_HL_DCH_OP_DISC +} btif_hl_dch_op_t; + +typedef enum +{ + BTIF_HL_CHAN_CB_STATE_NONE, + BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING, + BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING, + + BTIF_HL_CHAN_CB_STATE_DISCONNECTING_PENDING, + BTIF_HL_CHAN_CB_STATE_DISCONNECTED_PENDING, + BTIF_HL_CHAN_CB_STATE_DESTROYED_PENDING, +} btif_hl_chan_cb_state_t; + +enum +{ + BTIF_HL_SEND_CONNECTED_CB, + BTIF_HL_SEND_DISCONNECTED_CB, + BTIF_HL_REG_APP, + BTIF_HL_UNREG_APP, + BTIF_HL_UPDATE_MDL, +}; + typedef struct { UINT8 mdep_cfg_idx; @@ -82,7 +109,6 @@ typedef struct tBTA_HL_MDEP_ID peer_mdep_id; } btif_hl_extra_mdl_cfg_t; - typedef struct { tBTA_HL_MDL_CFG base; @@ -91,123 +117,75 @@ typedef struct typedef struct { - btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS]; -}btif_hl_nv_mdl_data_t; - + btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS]; +} btif_hl_nv_mdl_data_t; typedef struct { - tBTA_HL_SUP_FEATURE sup_feature; - tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS]; - char srv_name[BTA_SERVICE_NAME_LEN +1]; - char srv_desp[BTA_SERVICE_DESP_LEN +1]; - char provider_name[BTA_PROVIDER_NAME_LEN +1]; - char application_name[BTIF_HL_APPLICATION_NAME_LEN +1]; -}btif_hl_nv_app_data_t; - + tBTA_HL_SUP_FEATURE sup_feature; + tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS]; + char srv_name[BTA_SERVICE_NAME_LEN +1]; + char srv_desp[BTA_SERVICE_DESP_LEN +1]; + char provider_name[BTA_PROVIDER_NAME_LEN +1]; + char application_name[BTIF_HL_APPLICATION_NAME_LEN +1]; +} btif_hl_nv_app_data_t; typedef struct { BOOLEAN in_use; UINT16 use_freq; -}btif_hl_nv_app_t; +} btif_hl_nv_app_t; typedef struct { btif_hl_nv_app_t app[BTIF_HL_NV_MAX_APPS]; -}btif_hl_nv_app_cb_t; - - +} btif_hl_nv_app_cb_t; typedef struct { UINT8 app_nv_idx; BOOLEAN active; UINT8 app_idx; - btif_hl_nv_app_data_t app_data; -}btif_hl_app_data_t; + btif_hl_nv_app_data_t app_data; +} btif_hl_app_data_t; typedef struct { - BOOLEAN is_app_read; - btif_hl_nv_app_cb_t app_cb; - BUFFER_Q app_queue; -}btif_hl_nv_cb_t; - -typedef enum -{ - BTIF_HL_SOC_STATE_IDLE, - BTIF_HL_SOC_STATE_W4_ADD, - BTIF_HL_SOC_STATE_W4_CONN, - BTIF_HL_SOC_STATE_W4_READ, - BTIF_HL_SOC_STATE_W4_REL -} btif_hl_soc_state_t; + BOOLEAN is_app_read; + btif_hl_nv_app_cb_t app_cb; + BUFFER_Q app_queue; +} btif_hl_nv_cb_t; typedef struct { - int channel_id; - BD_ADDR bd_addr; - UINT8 mdep_cfg_idx; - int max_s; - int socket_id[2]; - UINT8 app_idx; - UINT8 mcl_idx; - UINT8 mdl_idx; - btif_hl_soc_state_t state; + int channel_id; + BD_ADDR bd_addr; + UINT8 mdep_cfg_idx; + int max_s; + int socket_id[2]; + UINT8 app_idx; + UINT8 mcl_idx; + UINT8 mdl_idx; + btif_hl_soc_state_t state; }btif_hl_soc_cb_t; typedef struct { - UINT16 data_type; - UINT16 max_tx_apdu_size; - UINT16 max_rx_apdu_size; + UINT16 data_type; + UINT16 max_tx_apdu_size; + UINT16 max_rx_apdu_size; } btif_hl_data_type_cfg_t; -typedef enum -{ - BTIF_HL_STATE_DISABLED, - BTIF_HL_STATE_DISABLING, - BTIF_HL_STATE_ENABLED, - BTIF_HL_STATE_ENABLING, - -}btif_hl_state_t; - -typedef enum -{ - BTIF_HL_CCH_OP_NONE, - BTIF_HL_CCH_OP_MDEP_FILTERING, - BTIF_HL_CCH_OP_MATCHED_CTRL_PSM, - BTIF_HL_CCH_OP_DCH_OPEN, - BTIF_HL_CCH_OP_DCH_RECONNECT, - BTIF_HL_CCH_OP_DCH_ECHO_TEST -}btif_hl_cch_op_t; - -typedef enum -{ - BTIF_HL_PEND_DCH_OP_NONE, - BTIF_HL_PEND_DCH_OP_DELETE_MDL, - BTIF_HL_PEND_DCH_OP_OPEN, - BTIF_HL_PEND_DCH_OP_RECONNECT -} btif_hl_pend_dch_op_t; - -typedef enum -{ - BTIF_HL_DCH_OP_NONE, - BTIF_HL_DCH_OP_DISC -} btif_hl_dch_op_t; - - typedef struct { UINT16 data_type; tBTA_HL_MDEP_ROLE peer_mdep_role; } btif_hl_filter_elem_t; - typedef struct { - UINT8 num_elems; - btif_hl_filter_elem_t elem[BTIF_HL_CCH_NUM_FILTER_ELEMS]; + UINT8 num_elems; + btif_hl_filter_elem_t elem[BTIF_HL_CCH_NUM_FILTER_ELEMS]; } btif_hl_cch_filter_t; typedef struct @@ -234,112 +212,93 @@ typedef struct BOOLEAN cong; btif_hl_soc_cb_t *p_scb; int channel_id; -}btif_hl_mdl_cb_t; - -typedef enum -{ - BTIF_HL_CHAN_CB_STATE_NONE, - BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING, - BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING, +} btif_hl_mdl_cb_t; - BTIF_HL_CHAN_CB_STATE_DISCONNECTING_PENDING, - BTIF_HL_CHAN_CB_STATE_DISCONNECTED_PENDING, - BTIF_HL_CHAN_CB_STATE_DESTROYED_PENDING, -}btif_hl_chan_cb_state_t; typedef struct { - int channel_id; - int mdep_cfg_idx; - BOOLEAN in_use; - btif_hl_chan_cb_state_t cb_state; - btif_hl_pend_dch_op_t op; - BD_ADDR bd_addr; - BOOLEAN abort_pending; -}btif_hl_pending_chan_cb_t; + int channel_id; + int mdep_cfg_idx; + BOOLEAN in_use; + btif_hl_chan_cb_state_t cb_state; + btif_hl_pend_dch_op_t op; + BD_ADDR bd_addr; + BOOLEAN abort_pending; +} btif_hl_pending_chan_cb_t; typedef struct { - btif_hl_mdl_cb_t mdl[BTA_HL_NUM_MDLS_PER_MCL]; - BOOLEAN in_use; - BOOLEAN is_connected; - UINT16 req_ctrl_psm; - UINT16 ctrl_psm; - UINT16 data_psm; - BD_ADDR bd_addr; - UINT16 cch_mtu; - tBTA_SEC sec_mask; - tBTA_HL_MCL_HANDLE mcl_handle; - btif_hl_pending_chan_cb_t pcb; - BOOLEAN valid_sdp_idx; - UINT8 sdp_idx; - tBTA_HL_SDP sdp; - btif_hl_cch_op_t cch_oper; - BOOLEAN cch_timer_active; - TIMER_LIST_ENT cch_timer; -}btif_hl_mcl_cb_t; + btif_hl_mdl_cb_t mdl[BTA_HL_NUM_MDLS_PER_MCL]; + BOOLEAN in_use; + BOOLEAN is_connected; + UINT16 req_ctrl_psm; + UINT16 ctrl_psm; + UINT16 data_psm; + BD_ADDR bd_addr; + UINT16 cch_mtu; + tBTA_SEC sec_mask; + tBTA_HL_MCL_HANDLE mcl_handle; + btif_hl_pending_chan_cb_t pcb; + BOOLEAN valid_sdp_idx; + UINT8 sdp_idx; + tBTA_HL_SDP sdp; + btif_hl_cch_op_t cch_oper; + BOOLEAN cch_timer_active; + TIMER_LIST_ENT cch_timer; +} btif_hl_mcl_cb_t; typedef struct { - BOOLEAN active; - UINT16 mdl_id; - UINT8 mdep_cfg_idx; - BD_ADDR bd_addr; - int channel_id; + BOOLEAN active; + UINT16 mdl_id; + UINT8 mdep_cfg_idx; + BD_ADDR bd_addr; + int channel_id; } btif_hl_delete_mdl_t; typedef struct { - btif_hl_mcl_cb_t mcb[BTA_HL_NUM_MCLS]; /* application Control Blocks */ - BOOLEAN in_use; /* this CB is in use*/ - BOOLEAN reg_pending; - BOOLEAN is_new_app; - UINT8 app_nv_idx; - UINT8 app_id; - //UINT32 sdp_handle; /* SDP record handle */ - tBTA_HL_SUP_FEATURE sup_feature; - tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS]; - tBTA_HL_SDP_INFO_IND sdp_info_ind; - btif_hl_cch_filter_t filter; - - btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS]; - int mdl_cfg_channel_id[BTA_HL_NUM_MDL_CFGS]; - - btif_hl_delete_mdl_t delete_mdl; - tBTA_HL_DEVICE_TYPE dev_type; - tBTA_HL_APP_HANDLE app_handle; - UINT16 sec_mask; /* Security mask for BTM_SetSecurityLevel() */ - char srv_name[BTA_SERVICE_NAME_LEN +1]; /* service name to be used in the SDP; null terminated*/ - char srv_desp[BTA_SERVICE_DESP_LEN +1]; /* service description to be used in the SDP; null terminated */ - char provider_name[BTA_PROVIDER_NAME_LEN +1]; /* provide name to be used in the SDP; null terminated */ - char application_name[BTIF_HL_APPLICATION_NAME_LEN +1]; /* applicaiton name */ - -}btif_hl_app_cb_t; + btif_hl_mcl_cb_t mcb[BTA_HL_NUM_MCLS]; /* application Control Blocks */ + BOOLEAN in_use; /* this CB is in use*/ + BOOLEAN reg_pending; + BOOLEAN is_new_app; + UINT8 app_nv_idx; + UINT8 app_id; + + tBTA_HL_SUP_FEATURE sup_feature; + tBTA_HL_DCH_CFG channel_type[BTA_HL_NUM_MDEPS]; + tBTA_HL_SDP_INFO_IND sdp_info_ind; + btif_hl_cch_filter_t filter; + + btif_hl_mdl_cfg_t mdl_cfg[BTA_HL_NUM_MDL_CFGS]; + int mdl_cfg_channel_id[BTA_HL_NUM_MDL_CFGS]; + + btif_hl_delete_mdl_t delete_mdl; + tBTA_HL_DEVICE_TYPE dev_type; + tBTA_HL_APP_HANDLE app_handle; + UINT16 sec_mask; /* Security mask for BTM_SetSecurityLevel() */ + char srv_name[BTA_SERVICE_NAME_LEN +1]; /* service name to be used in the SDP; null terminated*/ + char srv_desp[BTA_SERVICE_DESP_LEN +1]; /* service description to be used in the SDP; null terminated */ + char provider_name[BTA_PROVIDER_NAME_LEN +1]; /* provide name to be used in the SDP; null terminated */ + char application_name[BTIF_HL_APPLICATION_NAME_LEN +1]; /* applicaiton name */ +} btif_hl_app_cb_t; + typedef struct { - BOOLEAN in_use; - UINT8 app_idx; -}btif_hl_pending_reg_cb_t; + BOOLEAN in_use; + UINT8 app_idx; +} btif_hl_pending_reg_cb_t; /* BTIF-HL control block */ typedef struct { - btif_hl_app_cb_t acb[BTA_HL_NUM_APPS]; /* HL Control Blocks */ - tBTA_HL_CTRL_CBACK *p_ctrl_cback; /* pointer to control callback function */ - UINT8 next_app_id; - UINT16 next_channel_id; - btif_hl_state_t state; - btif_hl_nv_cb_t ncb; + btif_hl_app_cb_t acb[BTA_HL_NUM_APPS]; /* HL Control Blocks */ + tBTA_HL_CTRL_CBACK *p_ctrl_cback; /* pointer to control callback function */ + UINT8 next_app_id; + UINT16 next_channel_id; + btif_hl_state_t state; + btif_hl_nv_cb_t ncb; } btif_hl_cb_t; - -enum -{ - BTIF_HL_SEND_CONNECTED_CB, - BTIF_HL_SEND_DISCONNECTED_CB, - BTIF_HL_REG_APP, - BTIF_HL_UNREG_APP, - BTIF_HL_UPDATE_MDL, -}; typedef UINT8 btif_hl_evt_t; typedef struct @@ -350,29 +309,29 @@ typedef struct int channel_id; btif_hl_chan_cb_state_t cb_state; int fd; -}btif_hl_send_chan_state_cb_t; +} btif_hl_send_chan_state_cb_t; typedef struct { UINT8 app_idx; -}btif_hl_reg_t; +} btif_hl_reg_t; + typedef btif_hl_reg_t btif_hl_unreg_t; typedef btif_hl_reg_t btif_hl_update_mdl_t; typedef union { btif_hl_send_chan_state_cb_t chan_cb; - btif_hl_reg_t reg; - btif_hl_unreg_t unreg; - btif_hl_update_mdl_t update_mdl; -}btif_hl_evt_cb_t; + btif_hl_reg_t reg; + btif_hl_unreg_t unreg; + btif_hl_update_mdl_t update_mdl; +} btif_hl_evt_cb_t; - -extern btif_hl_cb_t btif_hl_cb; -extern btif_hl_cb_t *p_btif_hl_cb; -extern btif_hl_nv_cb_t *p_ncb; +/******************************************************************************* +** Functions +********************************************************************************/ #define BTIF_HL_GET_CB_PTR() &(btif_hl_cb) #define BTIF_HL_GET_APP_CB_PTR(app_idx) &(btif_hl_cb.acb[(app_idx)]) @@ -381,6 +340,11 @@ extern btif_hl_nv_cb_t *p_ncb; #define BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx) &(btif_hl_cb.acb[app_idx].mcb[mcl_idx].pcb) #define BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx) &(btif_hl_cb.acb[(app_idx)].mdl_cfg[(item_idx)]) #define BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx, item_idx) &(btif_hl_cb.acb[(app_idx)].mdl_cfg_channel_id[(item_idx)]) + +extern btif_hl_cb_t btif_hl_cb; +extern btif_hl_cb_t *p_btif_hl_cb; +extern btif_hl_nv_cb_t *p_ncb; + extern BOOLEAN btif_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx); extern BOOLEAN btif_hl_find_app_idx(UINT8 app_id, UINT8 *p_app_idx); extern BOOLEAN btif_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx); diff --git a/btif/include/btif_media.h b/btif/include/btif_media.h index 9eda863..ce7c0a1 100644 --- a/btif/include/btif_media.h +++ b/btif/include/btif_media.h @@ -2,57 +2,27 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ -/************************************************************************************ +/******************************************************************************* * * Filename: btif_media.h * * Description: This is the audio module for the BTIF system. * - ***********************************************************************************/ - + *******************************************************************************/ #ifndef BTIF_MEDIA_H #define BTIF_MEDIA_H @@ -63,15 +33,15 @@ #include "btif_av_api.h" #include "audio_a2dp_hw.h" -/***************************************************************************** +/******************************************************************************* ** Constants - *****************************************************************************/ + *******************************************************************************/ /* Generic part */ #define BTIF_SUCCESS 0 -/* -* AV (Audio Video source) Errors +/** + * AV (Audio Video source) Errors */ #define BTIF_ERROR_SRV_AV_NOT_ENABLED 700 /* AV is not enabled */ #define BTIF_ERROR_SRV_AV_FEEDING_NOT_SUPPORTED 701 /* Requested Feeding not supported */ @@ -80,14 +50,14 @@ #define BTIF_ERROR_SRV_AV_NOT_STARTED 704 /* AV is not started */ #define BTIF_ERROR_SRV_AV_CP_NOT_SUPPORTED 705 /* Content protection is not supported by all headsets */ -/* transcoding definition for TxTranscoding and RxTranscoding */ +/* Transcoding definition for TxTranscoding and RxTranscoding */ #define BTIF_MEDIA_TRSCD_OFF 0 #define BTIF_MEDIA_TRSCD_PCM_2_SBC 1 /* Tx */ -/***************************************************************************** +/******************************************************************************* ** Data types - *****************************************************************************/ + *******************************************************************************/ typedef int tBTIF_STATUS; @@ -123,13 +93,9 @@ typedef struct #endif -/***************************************************************************** - ** Local data - *****************************************************************************/ - -/***************************************************************************** - ** public functions - *****************************************************************************/ +/******************************************************************************* + ** Public functions + *******************************************************************************/ /******************************************************************************* ** @@ -142,7 +108,6 @@ typedef struct *******************************************************************************/ extern int btif_media_task(void *p); - /******************************************************************************* ** ** Function btif_media_task_enc_init_req @@ -166,6 +131,7 @@ extern BOOLEAN btif_media_task_enc_init_req(tBTIF_MEDIA_INIT_AUDIO * p_msg); #if (BTA_AV_INCLUDED == TRUE) extern BOOLEAN btif_media_task_enc_update_req(tBTIF_MEDIA_UPDATE_AUDIO * p_msg); #endif + /******************************************************************************* ** ** Function btif_media_task_start_aa_req @@ -235,7 +201,6 @@ extern BOOLEAN btif_media_av_writebuf(UINT8 *p_media, UINT32 media_len, UINT32 timestamp, UINT16 seq_num); #if (BTA_AV_INCLUDED == TRUE) - /******************************************************************************* ** ** Function btif_media_task_audio_feeding_init_req @@ -249,7 +214,6 @@ extern BOOLEAN btif_media_av_writebuf(UINT8 *p_media, UINT32 media_len, extern BOOLEAN btif_media_task_audio_feeding_init_req(tBTIF_MEDIA_INIT_AUDIO_FEEDING *p_msg); #endif - /******************************************************************************* ** ** Function dump_codec_info @@ -261,8 +225,8 @@ extern BOOLEAN btif_media_task_audio_feeding_init_req(tBTIF_MEDIA_INIT_AUDIO_FEE *******************************************************************************/ extern void dump_codec_info(unsigned char *p_codec); -/* - * local adaptation helper functions between btif and media task +/** + * Local adaptation helper functions between btif and media task */ int btif_a2dp_start_media_task(void); @@ -280,4 +244,3 @@ void btif_a2dp_on_suspended(tBTA_AV_SUSPEND *p_av); void btif_a2dp_set_tx_flush(BOOLEAN enable); #endif - diff --git a/btif/include/btif_pan.h b/btif/include/btif_pan.h index 47635d7..d9ecb2e 100644 --- a/btif/include/btif_pan.h +++ b/btif/include/btif_pan.h @@ -1,64 +1,36 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ - -/************************************************************************************ +/******************************************************************************* * * Filename: btif_pan.h * * Description: Bluetooth pan Interface * - * - ***********************************************************************************/ + *******************************************************************************/ + +#ifndef BTIF_PAN_H +#define BTIF_PAN_H -#ifndef btif_pan_h_ -#define btif_pan_h_ #include + btpan_interface_t *btif_pan_interface(); void btif_pan_init(); void btif_pan_cleanup(); + #endif diff --git a/btif/include/btif_pan_internal.h b/btif/include/btif_pan_internal.h index fdd9da3..d697ac8 100644 --- a/btif/include/btif_pan_internal.h +++ b/btif/include/btif_pan_internal.h @@ -1,65 +1,39 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ - -/************************************************************************************ +/******************************************************************************* * * Filename: btif_pan_internal.h * * Description: Bluetooth pan internal * - * - ***********************************************************************************/ + *******************************************************************************/ + +#ifndef BTIF_PAN_INTERNAL_H +#define BTIF_PAN_INTERNAL_H -#ifndef btif_pan_internal_h_ -#define btif_pan_internal_h_ #include "btif_pan.h" #include "bt_types.h" +/******************************************************************************* +** Constants & Macros +********************************************************************************/ + #define PAN_NAP_SERVICE_NAME "Android Network Access Point" #define PANU_SERVICE_NAME "Android Network User" #define TAP_IF_NAME "bt-pan" @@ -74,12 +48,19 @@ #ifndef PAN_ROLE_INACTIVE #define PAN_ROLE_INACTIVE 0 #endif + + +/******************************************************************************* +** Type definitions and return values +********************************************************************************/ + typedef struct eth_hdr { unsigned char h_dest[ETH_ADDR_LEN]; unsigned char h_src[ETH_ADDR_LEN]; short h_proto; } tETH_HDR; + typedef struct { int handle; @@ -100,6 +81,12 @@ typedef struct int open_count; btpan_conn_t conns[MAX_PAN_CONNS]; } btpan_cb_t; + + +/******************************************************************************* +** Functions +********************************************************************************/ + extern btpan_cb_t btpan_cb; btpan_conn_t *btpan_new_conn(int handle, const BD_ADDR addr, int local_role, int peer_role); btpan_conn_t *btpan_find_conn_addr(const BD_ADDR addr); @@ -111,6 +98,7 @@ void destroy_tap_read_thread(void); int btpan_tap_close(int tap_fd); int btpan_tap_send(int tap_fd, const BD_ADDR src, const BD_ADDR dst, UINT16 protocol, const char* buff, UINT16 size, BOOLEAN ext, BOOLEAN forward); + static inline int is_empty_eth_addr(const BD_ADDR addr) { int i; @@ -119,11 +107,12 @@ static inline int is_empty_eth_addr(const BD_ADDR addr) return 0; return 1; } + static inline int is_valid_bt_eth_addr(const BD_ADDR addr) { if(is_empty_eth_addr(addr)) return 0; - return addr[0] & 1 ? 0 : 1; //cannot be multicasting address + return addr[0] & 1 ? 0 : 1; /* Cannot be multicasting address */ } #endif diff --git a/btif/include/btif_profile_queue.h b/btif/include/btif_profile_queue.h index 8f5f013..931f457 100644 --- a/btif/include/btif_profile_queue.h +++ b/btif/include/btif_profile_queue.h @@ -1,67 +1,37 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ -/************************************************************************************ +/******************************************************************************* * * Filename: btif_profile_queue.h * * Description: Bluetooth remote device connection queuing * - ***********************************************************************************/ -#ifndef BTIF_QUEUE_H -#define BTIF_QUEUE_H + *******************************************************************************/ + +#ifndef BTIF_PROFILE_QUEUE_H +#define BTIF_PROFILE_QUEUE_H typedef bt_status_t (btif_connect_cb_t) (bt_bdaddr_t *bda); bt_status_t btif_queue_connect(uint16_t uuid, const bt_bdaddr_t *bda, btif_connect_cb_t *connect_cb); - void btif_queue_advance(); - void btif_queue_release(); #endif diff --git a/btif/include/btif_sm.h b/btif/include/btif_sm.h index fb8ddc7..baad0d9 100644 --- a/btif/include/btif_sm.h +++ b/btif/include/btif_sm.h @@ -2,48 +2,19 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ /***************************************************************************** * @@ -60,6 +31,11 @@ ** Constants & Macros ******************************************************************************/ +/* Generic Enter/Exit state machine events */ +#define BTIF_SM_ENTER_EVT 0xFFFF +#define BTIF_SM_EXIT_EVT 0xFFFE + + /***************************************************************************** ** Type definitions and return values ******************************************************************************/ @@ -68,28 +44,14 @@ typedef UINT32 btif_sm_event_t; typedef void* btif_sm_handle_t; typedef BOOLEAN(*btif_sm_handler_t)(btif_sm_event_t event, void *data); -/* Generic Enter/Exit state machine events */ -#define BTIF_SM_ENTER_EVT 0xFFFF -#define BTIF_SM_EXIT_EVT 0xFFFE - -/***************************************************************************** -** Extern variables and functions -******************************************************************************/ /***************************************************************************** ** Functions +** +** NOTE: THESE APIs SHOULD BE INVOKED ONLY IN THE BTIF CONTEXT +** ******************************************************************************/ -/* - * - * ######################################################################## - * - * NOTE: THESE APIs SHOULD BE INVOKED ONLY IN THE BTIF CONTEXT - * - * ####################################################################### - * - */ - /***************************************************************************** ** ** Function btif_sm_init @@ -154,5 +116,3 @@ bt_status_t btif_sm_dispatch(btif_sm_handle_t handle, btif_sm_event_t event, bt_status_t btif_sm_change_state(btif_sm_handle_t handle, btif_sm_state_t state); #endif /* BTIF_SM_H */ - - diff --git a/btif/include/btif_sock.h b/btif/include/btif_sock.h index a307255..ad2c71d 100644 --- a/btif/include/btif_sock.h +++ b/btif/include/btif_sock.h @@ -1,65 +1,36 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - + ******************************************************************************/ -/************************************************************************************ +/******************************************************************************* * * Filename: btif_sock.h * * Description: Bluetooth socket Interface * - * - ***********************************************************************************/ + *******************************************************************************/ + +#ifndef BTIF_SOCK_H +#define BTIF_SOCK_H -#ifndef btif_sock_h_ -#define btif_sock_h_ #include bt_status_t btif_sock_init(); btsock_interface_t *btif_sock_get_interface(); void btif_sock_cleanup(); + #endif diff --git a/btif/include/btif_sock_rfc.h b/btif/include/btif_sock_rfc.h index 2415513..b36ec1f 100644 --- a/btif/include/btif_sock_rfc.h +++ b/btif/include/btif_sock_rfc.h @@ -1,64 +1,38 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ -/************************************************************************************ +/******************************************************************************* * * Filename: btif_sock.h * * Description: Bluetooth socket Interface * - * - ***********************************************************************************/ + *******************************************************************************/ + +#ifndef BTIF_SOCK_RFC_H +#define BTIF_SOCK_RFC_H -#ifndef btif_sock_rfc_h_ -#define btif_sock_rfc_h_ bt_status_t btsock_rfc_init(int handle); bt_status_t btsock_rfc_cleanup(); -bt_status_t btsock_rfc_listen(const char* name, const uint8_t* uuid, int channel, int* sock_fd, int flags); -bt_status_t btsock_rfc_connect(const bt_bdaddr_t *bd_addr, const uint8_t* uuid, int channel, int* sock_fd, int flags); +bt_status_t btsock_rfc_listen(const char* name, const uint8_t* uuid, int channel, + int* sock_fd, int flags); +bt_status_t btsock_rfc_connect(const bt_bdaddr_t *bd_addr, const uint8_t* uuid, + int channel, int* sock_fd, int flags); void btsock_rfc_signaled(int fd, int flags, uint32_t user_id); + #endif diff --git a/btif/include/btif_sock_sdp.h b/btif/include/btif_sock_sdp.h index 012e1a9..5ca9959 100644 --- a/btif/include/btif_sock_sdp.h +++ b/btif/include/btif_sock_sdp.h @@ -1,68 +1,33 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ -/************************************************************************************ - * - * Filename: btif_sock.h - * - * Description: Bluetooth socket Interface - * - * - ***********************************************************************************/ +#ifndef BTIF_SOCK_SDP_H +#define BTIF_SOCK_SDP_H -#ifndef btif_sock_sdp_h_ -#define btif_sock_sdp_h_ static inline BOOLEAN is_uuid_empty(const uint8_t* uuid) { static uint8_t empty_uuid[16]; return memcmp(uuid, empty_uuid, sizeof(empty_uuid)) == 0; } + int add_rfc_sdp_rec(const char* name, const uint8_t* uuid, int scn); void del_rfc_sdp_rec(int handle); BOOLEAN is_reserved_rfc_channel(int channel); int get_reserved_rfc_channel(const uint8_t* uuid); + #endif diff --git a/btif/include/btif_sock_thread.h b/btif/include/btif_sock_thread.h index 0f5212f..9b12f56 100644 --- a/btif/include/btif_sock_thread.h +++ b/btif/include/btif_sock_thread.h @@ -1,73 +1,49 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - -/************************************************************************************ - * - * Filename: btif_sock_thread.h - * - * Description: - * - ***********************************************************************************/ + ******************************************************************************/ #ifndef BTIF_SOCK_THREAD_H #define BTIF_SOCK_THREAD_H + #include -#define SOCK_THREAD_FD_RD 1 //bt socket read signal -#define SOCK_THREAD_FD_WR (1 << 1) //bt socket write signal -#define SOCK_THREAD_FD_EXCEPTION (1 << 2) //bt socket exception singal -#define SOCK_THREAD_ADD_FD_SYNC (1 << 3) //add bt socket fd in current socket poll thread context immediately +/******************************************************************************* +** Constants & Macros +********************************************************************************/ + +#define SOCK_THREAD_FD_RD 1 /* BT socket read signal */ +#define SOCK_THREAD_FD_WR (1 << 1) /* BT socket write signal */ +#define SOCK_THREAD_FD_EXCEPTION (1 << 2) /* BT socket exception singal */ +#define SOCK_THREAD_ADD_FD_SYNC (1 << 3) /* Add BT socket fd in current socket + poll thread context immediately */ + +/******************************************************************************* +** Functions +********************************************************************************/ + +typedef void (*btsock_signaled_cb)(int fd, int type, int flags, uint32_t user_id); +typedef void (*btsock_cmd_cb)(int cmd_fd, int type, int size, uint32_t user_id); + int btsock_thread_init(); int btsock_thread_add_fd(int handle, int fd, int type, int flags, uint32_t user_id); int btsock_thread_wakeup(int handle); -int btsock_thread_post_cmd(int handle, int cmd_type, const unsigned char* cmd_data, int data_size, uint32_t user_id); -typedef void (*btsock_signaled_cb)(int fd, int type, int flags, uint32_t user_id); -typedef void (*btsock_cmd_cb)(int cmd_fd, int type, int size, uint32_t user_id); +int btsock_thread_post_cmd(int handle, int cmd_type, const unsigned char* cmd_data, + int data_size, uint32_t user_id); int btsock_thread_create(btsock_signaled_cb callback, btsock_cmd_cb cmd_callback); int btsock_thread_exit(int handle); -#endif +#endif diff --git a/btif/include/btif_sock_util.h b/btif/include/btif_sock_util.h index 7a7cff3..e0f7066 100644 --- a/btif/include/btif_sock_util.h +++ b/btif/include/btif_sock_util.h @@ -1,64 +1,39 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - + ******************************************************************************/ -/************************************************************************************ +/******************************************************************************* * * Filename: btif_sock_util.h * * Description: Bluetooth socket Interface Helper functions * - * - ***********************************************************************************/ + *******************************************************************************/ + +#ifndef BTIF_SOCK_UTIL_H +#define BTIF_SOCK_UTIL_H -#ifndef btif_sock_util_h_ -#define btif_sock_util_h_ #include #include + +/******************************************************************************* +** Functions +********************************************************************************/ + static inline void init_slot_lock( pthread_mutex_t* mutex) { pthread_mutexattr_t attr; @@ -66,21 +41,24 @@ static inline void init_slot_lock( pthread_mutex_t* mutex) pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); pthread_mutex_init(mutex, &attr); } + static inline void lock_slot(pthread_mutex_t* mutex) { if(mutex->value) pthread_mutex_lock(mutex); else ALOGE("mutex: %p is not initialized", mutex); } + static inline void unlock_slot(pthread_mutex_t* mutex) { if(mutex->value) pthread_mutex_unlock(mutex); else ALOGE("mutex: %p is not initialized", mutex); } + void dump_bin(const char* title, const char* data, int size); -int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd); +int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd); int sock_send_all(int sock_fd, const uint8_t* buf, int len); int sock_recv_all(int sock_fd, uint8_t* buf, int len); diff --git a/btif/include/btif_storage.h b/btif/include/btif_storage.h index f4b2ca3..87dec3b 100644 --- a/btif/include/btif_storage.h +++ b/btif/include/btif_storage.h @@ -1,57 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - -/************************************************************************************ - * - * Filename: btif_storage.h - * - * Description: - * - ***********************************************************************************/ + ******************************************************************************/ #ifndef BTIF_STORAGE_H #define BTIF_STORAGE_H @@ -61,23 +24,17 @@ #include -/************************************************************************************ +/******************************************************************************* ** Constants & Macros -************************************************************************************/ +********************************************************************************/ #define BTIF_STORAGE_FILL_PROPERTY(p_prop, t, l, p_v) \ (p_prop)->type = t;(p_prop)->len = l; (p_prop)->val = (p_v); -/************************************************************************************ -** Type definitions for callback functions -************************************************************************************/ - -/************************************************************************************ -** Type definitions and return values -************************************************************************************/ -/************************************************************************************ +/******************************************************************************* ** Functions -************************************************************************************/ +********************************************************************************/ + /******************************************************************************* ** ** Function btif_storage_get_adapter_property @@ -92,6 +49,7 @@ ** *******************************************************************************/ bt_status_t btif_storage_get_adapter_property(bt_property_t *property); + /******************************************************************************* ** ** Function btif_storage_set_adapter_property @@ -104,6 +62,7 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t *property); ** *******************************************************************************/ bt_status_t btif_storage_set_adapter_property(bt_property_t *property); + /******************************************************************************* ** ** Function btif_storage_get_remote_device_property @@ -119,6 +78,7 @@ bt_status_t btif_storage_set_adapter_property(bt_property_t *property); *******************************************************************************/ bt_status_t btif_storage_get_remote_device_property(bt_bdaddr_t *remote_bd_addr, bt_property_t *property); + /******************************************************************************* ** ** Function btif_storage_set_remote_device_property @@ -132,6 +92,7 @@ bt_status_t btif_storage_get_remote_device_property(bt_bdaddr_t *remote_bd_addr, *******************************************************************************/ bt_status_t btif_storage_set_remote_device_property(bt_bdaddr_t *remote_bd_addr, bt_property_t *property); + /******************************************************************************* ** ** Function btif_storage_add_remote_device @@ -147,6 +108,7 @@ bt_status_t btif_storage_set_remote_device_property(bt_bdaddr_t *remote_bd_addr, bt_status_t btif_storage_add_remote_device(bt_bdaddr_t *remote_bdaddr, uint32_t num_properties, bt_property_t *properties); + /******************************************************************************* ** ** Function btif_storage_add_bonded_device @@ -162,6 +124,7 @@ bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr, LINK_KEY link_key, uint8_t key_type, uint8_t pin_length); + /******************************************************************************* ** ** Function btif_storage_remove_bonded_device @@ -173,6 +136,7 @@ bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr, ** *******************************************************************************/ bt_status_t btif_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr); + /******************************************************************************* ** ** Function btif_storage_remove_bonded_device @@ -184,6 +148,7 @@ bt_status_t btif_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr); ** *******************************************************************************/ bt_status_t btif_storage_load_bonded_devices(void); + /******************************************************************************* ** ** Function btif_storage_read_hl_apps_cb @@ -207,6 +172,7 @@ bt_status_t btif_storage_read_hl_apps_cb(char *value, int value_size); ** *******************************************************************************/ bt_status_t btif_storage_write_hl_apps_cb(char *value, int value_size); + /******************************************************************************* ** ** Function btif_storage_read_hl_apps_cb @@ -218,6 +184,7 @@ bt_status_t btif_storage_write_hl_apps_cb(char *value, int value_size); ** *******************************************************************************/ bt_status_t btif_storage_read_hl_app_data(UINT8 app_idx, char *value, int value_size); + /******************************************************************************* ** ** Function btif_storage_write_hl_app_data @@ -229,6 +196,7 @@ bt_status_t btif_storage_read_hl_app_data(UINT8 app_idx, char *value, int value_ ** *******************************************************************************/ bt_status_t btif_storage_write_hl_app_data(UINT8 app_idx, char *value, int value_size); + /******************************************************************************* ** ** Function btif_storage_read_hl_mdl_data @@ -240,6 +208,7 @@ bt_status_t btif_storage_write_hl_app_data(UINT8 app_idx, char *value, int value ** *******************************************************************************/ bt_status_t btif_storage_read_hl_mdl_data(UINT8 app_idx, char *value, int value_size); + /******************************************************************************* ** ** Function btif_storage_write_hl_mdl_data @@ -262,19 +231,19 @@ bt_status_t btif_storage_write_hl_mdl_data(UINT8 app_idx, char *value, int value ** BT_STATUS_FAIL otherwise ** *******************************************************************************/ - bt_status_t btif_storage_add_hid_device_info(bt_bdaddr_t *remote_bd_addr, UINT16 attr_mask, UINT8 sub_class, UINT8 app_id, UINT16 vendor_id, UINT16 product_id, UINT16 version, - UINT8 ctry_code, UINT16 dl_len, UINT8 *dsc_list); + UINT8 ctry_code, UINT16 dl_len, + UINT8 *dsc_list); /******************************************************************************* ** ** Function btif_storage_load_bonded_hid_info ** -** Description BTIF storage API - Loads hid info for all the bonded devices from NVRAM -** and adds those devices to the BTA_HH. +** Description BTIF storage API - Loads hid info for all the bonded devices +** from NVRAM and adds those devices to the BTA_HH. ** ** Returns BT_STATUS_SUCCESS if successful, BT_STATUS_FAIL otherwise ** @@ -291,7 +260,6 @@ bt_status_t btif_storage_load_bonded_hid_info(void); ** BT_STATUS_FAIL otherwise ** *******************************************************************************/ - bt_status_t btif_storage_remove_hid_info(bt_bdaddr_t *remote_bd_addr); /******************************************************************************* @@ -316,7 +284,6 @@ bt_status_t btif_storage_load_autopair_device_list(); ** FALSE otherwise ** *******************************************************************************/ - BOOLEAN btif_storage_is_device_autopair_blacklisted(bt_bdaddr_t *remote_dev_addr); /******************************************************************************* @@ -329,7 +296,6 @@ BOOLEAN btif_storage_is_device_autopair_blacklisted(bt_bdaddr_t *remote_dev_add ** BT_STATUS_FAIL otherwise ** *******************************************************************************/ - bt_status_t btif_storage_add_device_to_autopair_blacklist(bt_bdaddr_t *remote_dev_addr); /******************************************************************************* @@ -344,7 +310,4 @@ bt_status_t btif_storage_add_device_to_autopair_blacklist(bt_bdaddr_t *remote_de *******************************************************************************/ BOOLEAN btif_storage_is_fixed_pin_zeros_keyboard(bt_bdaddr_t *remote_dev_addr); - - #endif /* BTIF_STORAGE_H */ - diff --git a/btif/include/btif_util.h b/btif/include/btif_util.h old mode 100755 new mode 100644 index cfa7945..09dae6e --- a/btif/include/btif_util.h +++ b/btif/include/btif_util.h @@ -1,57 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ - -/************************************************************************************ - * - * Filename: btif_util.h - * - * Description: - * - ***********************************************************************************/ + ******************************************************************************/ #ifndef BTIF_UTIL_H #define BTIF_UTIL_H @@ -63,26 +26,23 @@ #include "data_types.h" #include "bt_types.h" -/************************************************************************************ +/******************************************************************************* ** Constants & Macros -************************************************************************************/ +********************************************************************************/ #define CASE_RETURN_STR(const) case const: return #const; -/************************************************************************************ + +/******************************************************************************* ** Type definitions for callback functions -************************************************************************************/ +********************************************************************************/ typedef char bdstr_t[18]; -/************************************************************************************ -** Type definitions and return values -************************************************************************************/ - -/************************************************************************************ +/******************************************************************************* ** Functions -************************************************************************************/ +********************************************************************************/ const char* dump_bt_status(bt_status_t status); const char* dump_dm_search_event(UINT16 event); diff --git a/btif/include/uinput.h b/btif/include/uinput.h index 303f4f3..5925703 100644 --- a/btif/include/uinput.h +++ b/btif/include/uinput.h @@ -1,50 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ -/* TBD: tmp code here */ + ******************************************************************************/ #ifndef __UINPUT_H #define __UINPUT_H @@ -57,6 +27,10 @@ extern "C" { #include #include +/******************************************************************************* +** Constants & Macros +********************************************************************************/ + /* Events */ #define EV_SYN 0x00 @@ -580,6 +554,11 @@ extern "C" { #define UINPUT_MAX_NAME_SIZE 80 + +/******************************************************************************* +** Type definitions and return values +********************************************************************************/ + struct uinput_id { uint16_t bustype; uint16_t vendor; diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c index 0b9d542..18e706f 100644 --- a/btif/src/bluetooth.c +++ b/btif/src/bluetooth.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index b35497a..a2de03e 100644 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -2,48 +2,19 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ /***************************************************************************** diff --git a/btif/src/btif_config.c b/btif/src/btif_config.c index 2470110..7e486b4 100644 --- a/btif/src/btif_config.c +++ b/btif/src/btif_config.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_config_util.cpp b/btif/src/btif_config_util.cpp index 0d32da1..19fa30b 100644 --- a/btif/src/btif_config_util.cpp +++ b/btif/src/btif_config_util.cpp @@ -1,49 +1,21 @@ -/************************************************************************************ +/****************************************************************************** * - * Copyright (C) 2009-2011 Broadcom Corporation + * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - ************************************************************************************/ + ******************************************************************************/ + #include #include #include diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c old mode 100755 new mode 100644 index 555326a..29e493d --- a/btif/src/btif_core.c +++ b/btif/src/btif_core.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c old mode 100755 new mode 100644 index b5cac5d..7ab03b4 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * @@ -392,7 +363,7 @@ int remove_hid_bond(bt_bdaddr_t *bd_addr) */ bdstr_t bdstr; BTIF_TRACE_DEBUG2("%s---Removing HID bond--%s", __FUNCTION__,bd2str((bt_bdaddr_t *)bd_addr, &bdstr)); - return btif_hh_virtual_unpug(bd_addr); + return btif_hh_virtual_unplug(bd_addr); } /******************************************************************************* ** diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index 0c0ed59..8e605d5 100644 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c old mode 100755 new mode 100644 index 9a599dd..5d44ee0 --- a/btif/src/btif_hh.c +++ b/btif/src/btif_hh.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * @@ -551,7 +522,7 @@ BOOLEAN btif_hh_copy_hid_info(tBTA_HH_DEV_DSCP_INFO* dest , tBTA_HH_DEV_DSCP_INF /******************************************************************************* ** -** Function btif_btif_hh_virtual_unpug +** Function btif_hh_virtual_unplug ** ** Description Virtual unplug initiated from the BTIF thread context ** Special handling for HID mouse- @@ -560,7 +531,7 @@ BOOLEAN btif_hh_copy_hid_info(tBTA_HH_DEV_DSCP_INFO* dest , tBTA_HH_DEV_DSCP_INF ** *******************************************************************************/ -bt_status_t btif_hh_virtual_unpug(bt_bdaddr_t *bd_addr) +bt_status_t btif_hh_virtual_unplug(bt_bdaddr_t *bd_addr) { BTIF_TRACE_DEBUG1("%s", __FUNCTION__); btif_hh_device_t *p_dev; @@ -659,7 +630,7 @@ bt_status_t btif_hh_connect(bt_bdaddr_t *bd_addr) /******************************************************************************* ** -** Function btif_btif_hh_disconnect +** Function btif_hh_disconnect ** ** Description disconnection initiated from the BTIF thread context ** @@ -1063,7 +1034,7 @@ static void btif_hh_handle_evt(UINT16 event, char *p_param) case BTIF_HH_VUP_REQ_EVT: { BTIF_TRACE_EVENT2("%s: event=%d", __FUNCTION__, event); - ret = btif_hh_virtual_unpug(bd_addr); + ret = btif_hh_virtual_unplug(bd_addr); } break; diff --git a/btif/src/btif_hl.c b/btif/src/btif_hl.c old mode 100755 new mode 100644 index 93f35fe..e6c3fb7 --- a/btif/src/btif_hl.c +++ b/btif/src/btif_hl.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c index d7e372d..1b39137 100644 --- a/btif/src/btif_media_task.c +++ b/btif/src/btif_media_task.c @@ -2,48 +2,19 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ /****************************************************************************** ** diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c index c9cd6a7..2f6c932 100644 --- a/btif/src/btif_pan.c +++ b/btif/src/btif_pan.c @@ -1,49 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_profile_queue.c b/btif/src/btif_profile_queue.c index 4081c6a..4af3b53 100644 --- a/btif/src/btif_profile_queue.c +++ b/btif/src/btif_profile_queue.c @@ -1,47 +1,18 @@ -/******************************************************************************* +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * ******************************************************************************/ diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c old mode 100755 new mode 100644 index 1e8a220..530c7f1 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -2,48 +2,19 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ /***************************************************************************** diff --git a/btif/src/btif_sm.c b/btif/src/btif_sm.c index c260119..cb4e5ad 100644 --- a/btif/src/btif_sm.c +++ b/btif/src/btif_sm.c @@ -2,48 +2,19 @@ * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * 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: * - * Except as expressly set forth in the Authorized License, + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING - * OUT OF USE OR PERFORMANCE OF THE SOFTWARE. - * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM - * OR ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. - * - *****************************************************************************/ + ******************************************************************************/ /***************************************************************************** diff --git a/btif/src/btif_sock.c b/btif/src/btif_sock.c index 553a1bb..a2c799a 100644 --- a/btif/src/btif_sock.c +++ b/btif/src/btif_sock.c @@ -1,49 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ diff --git a/btif/src/btif_sock_rfc.c b/btif/src/btif_sock_rfc.c index 92f59df..b77ce4a 100644 --- a/btif/src/btif_sock_rfc.c +++ b/btif/src/btif_sock_rfc.c @@ -1,49 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c index 5fb6c34..2dfc526 100644 --- a/btif/src/btif_sock_sdp.c +++ b/btif/src/btif_sock_sdp.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_sock_thread.c b/btif/src/btif_sock_thread.c index 173f20f..599195f 100644 --- a/btif/src/btif_sock_thread.c +++ b/btif/src/btif_sock_thread.c @@ -1,49 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_sock_util.c b/btif/src/btif_sock_util.c index 7ca30b6..09df03e 100644 --- a/btif/src/btif_sock_util.c +++ b/btif/src/btif_sock_util.c @@ -1,49 +1,20 @@ -/************************************************************************************ - * - * Copyright (C) 2009-2011 Broadcom Corporation - * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. +/****************************************************************************** * - * Except as expressly set forth in the Authorized License, + * Copyright (C) 2009-2012 Broadcom Corporation * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c old mode 100755 new mode 100644 index d8e96d1..bd0ed28 --- a/btif/src/btif_storage.c +++ b/btif/src/btif_storage.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * diff --git a/btif/src/btif_util.c b/btif/src/btif_util.c old mode 100755 new mode 100644 index fb2e792..da23361 --- a/btif/src/btif_util.c +++ b/btif/src/btif_util.c @@ -1,49 +1,20 @@ -/************************************************************************************ +/****************************************************************************** * * Copyright (C) 2009-2012 Broadcom Corporation * - * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. - * - * Except as expressly set forth in the Authorized License, - * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of - * Broadcom integrated circuit products. + * 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: * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR - * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 * - * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF - * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + * 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. * - ************************************************************************************/ + ******************************************************************************/ /************************************************************************************ * -- cgit v1.1