From: Zach Johnson Date: Fri, 28 Aug 2020 23:08:50 +0000 (-0700) Subject: Remove MCE code that now no longer does anything X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=819fc1d475ee6cf96171fb4a091d7c530cf5e79b;p=android-x86%2Fsystem-bt.git Remove MCE code that now no longer does anything Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working Change-Id: If97d3f702f30d957f75dcda9a792deea4696358a --- diff --git a/bta/Android.bp b/bta/Android.bp index 7894464ba..f7471aad6 100755 --- a/bta/Android.bp +++ b/bta/Android.bp @@ -91,10 +91,6 @@ cc_library_static { "jv/bta_jv_act.cc", "jv/bta_jv_api.cc", "jv/bta_jv_cfg.cc", - "mce/bta_mce_act.cc", - "mce/bta_mce_api.cc", - "mce/bta_mce_cfg.cc", - "mce/bta_mce_main.cc", "pan/bta_pan_act.cc", "pan/bta_pan_api.cc", "pan/bta_pan_ci.cc", diff --git a/bta/BUILD.gn b/bta/BUILD.gn index 0bf654413..6632c24d7 100644 --- a/bta/BUILD.gn +++ b/bta/BUILD.gn @@ -72,10 +72,6 @@ static_library("bta") { "jv/bta_jv_act.cc", "jv/bta_jv_api.cc", "jv/bta_jv_cfg.cc", - "mce/bta_mce_act.cc", - "mce/bta_mce_api.cc", - "mce/bta_mce_cfg.cc", - "mce/bta_mce_main.cc", "pan/bta_pan_act.cc", "pan/bta_pan_api.cc", "pan/bta_pan_ci.cc", @@ -146,4 +142,4 @@ executable("net_test_bta") { "//third_party/googletest:gmock_main", "//third_party/libchrome:base", ] -} \ No newline at end of file +} diff --git a/bta/include/bta_mce_api.h b/bta/include/bta_mce_api.h deleted file mode 100644 index 4c1e85433..000000000 --- a/bta/include/bta_mce_api.h +++ /dev/null @@ -1,90 +0,0 @@ -/****************************************************************************** - * - * Copyright 2014 The Android Open Source Project - * Copyright 2006-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 public interface file the BTA MCE I/F - * - ******************************************************************************/ -#ifndef BTA_MCE_API_H -#define BTA_MCE_API_H - -#include "bt_target.h" -#include "bt_types.h" -#include "bta_api.h" -#include "btm_api.h" - -/***************************************************************************** - * Constants and data types - ****************************************************************************/ -/* status values */ -#define BTA_MCE_SUCCESS 0 /* Successful operation. */ -#define BTA_MCE_FAILURE 1 /* Generic failure. */ -#define BTA_MCE_BUSY 2 /* Temporarily can not handle this request. */ - -typedef uint8_t tBTA_MCE_STATUS; - -/* MCE I/F callback events */ -/* events received by tBTA_MCE_DM_CBACK */ -#define BTA_MCE_ENABLE_EVT 0 /* MCE enabled */ -#define BTA_MCE_MAS_DISCOVERY_COMP_EVT 1 /* SDP MAS discovery complete */ -#define BTA_MCE_MAX_EVT 2 /* max number of MCE events */ - -#define BTA_MCE_MAX_MAS_INSTANCES 12 - -typedef uint16_t tBTA_MCE_EVT; - -typedef struct { - uint8_t scn; - char* p_srv_name; - uint16_t srv_name_len; - uint8_t instance_id; - uint8_t msg_type; -} tBTA_MCE_MAS_INFO; - -/* data associated with BTA_MCE_MAS_DISCOVERY_COMP_EVT */ -typedef struct { - tBTA_MCE_STATUS status; - RawAddress remote_addr; - int num_mas; - tBTA_MCE_MAS_INFO mas[BTA_MCE_MAX_MAS_INSTANCES]; -} tBTA_MCE_MAS_DISCOVERY_COMP; - -/* union of data associated with MCE callback */ -typedef union { - tBTA_MCE_STATUS status; /* BTA_MCE_ENABLE_EVT */ - tBTA_MCE_MAS_DISCOVERY_COMP - mas_disc_comp; /* BTA_MCE_MAS_DISCOVERY_COMP_EVT */ -} tBTA_MCE; - -/* MCE DM Interface callback */ -typedef void(tBTA_MCE_DM_CBACK)(tBTA_MCE_EVT event, tBTA_MCE* p_data, - void* user_data); - -/* MCE configuration structure */ -typedef struct { - uint16_t sdp_db_size; /* The size of p_sdp_db */ - tSDP_DISCOVERY_DB* p_sdp_db; /* The data buffer to keep SDP database */ -} tBTA_MCE_CFG; - -/***************************************************************************** - * External Function Declarations - ****************************************************************************/ - -#endif /* BTA_MCE_API_H */ diff --git a/bta/mce/bta_mce_act.cc b/bta/mce/bta_mce_act.cc deleted file mode 100644 index 5b9775762..000000000 --- a/bta/mce/bta_mce_act.cc +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** - * - * Copyright 2014 The Android Open Source Project - * Copyright 2003-2012 Broadcom Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ******************************************************************************/ - -/****************************************************************************** - * - * This file contains action functions for MCE. - * - ******************************************************************************/ - -#include - -#include -#include "bt_types.h" -#include "bta_mce_api.h" -#include "bta_mce_int.h" -#include "bta_sys.h" -#include "sdp_api.h" - -using bluetooth::Uuid; - -/***************************************************************************** - * Constants - ****************************************************************************/ diff --git a/bta/mce/bta_mce_api.cc b/bta/mce/bta_mce_api.cc deleted file mode 100644 index be3748b68..000000000 --- a/bta/mce/bta_mce_api.cc +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** - * - * Copyright 2014 The Android Open Source Project - * Copyright 2003-2012 Broadcom Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ******************************************************************************/ - -/****************************************************************************** - * - * This is the implementation of the API for MCE subsystem - * - ******************************************************************************/ - -#include - -#include "bt_common.h" -#include "bt_types.h" -#include "bta_api.h" -#include "bta_mce_api.h" -#include "bta_mce_int.h" -#include "bta_sys.h" -#include "port_api.h" -#include "sdp_api.h" - -/***************************************************************************** - * Constants - ****************************************************************************/ diff --git a/bta/mce/bta_mce_cfg.cc b/bta/mce/bta_mce_cfg.cc deleted file mode 100644 index ede80ba67..000000000 --- a/bta/mce/bta_mce_cfg.cc +++ /dev/null @@ -1,45 +0,0 @@ -/****************************************************************************** - * - * Copyright 2014 The Android Open Source Project - * Copyright 2003-2012 Broadcom Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ******************************************************************************/ - -/****************************************************************************** - * - * This file contains compile-time configurable constants for MCE - * - ******************************************************************************/ - -#include "bt_common.h" -#include "bt_types.h" -#include "bta_api.h" -#include "bta_mce_api.h" - -#ifndef BTA_MCE_SDP_DB_SIZE -#define BTA_MCE_SDP_DB_SIZE 4500 -#endif - -static tSDP_DISCOVERY_DB - bta_mce_sdp_db_data[BTA_MCE_SDP_DB_SIZE / sizeof(tSDP_DISCOVERY_DB)]; - -/* MCE configuration structure */ -const tBTA_MCE_CFG bta_mce_cfg = { - (BTA_MCE_SDP_DB_SIZE / sizeof(tSDP_DISCOVERY_DB)) * - sizeof(tSDP_DISCOVERY_DB), - bta_mce_sdp_db_data /* The data buffer to keep SDP database */ -}; - -const tBTA_MCE_CFG* p_bta_mce_cfg = &bta_mce_cfg; diff --git a/bta/mce/bta_mce_int.h b/bta/mce/bta_mce_int.h deleted file mode 100644 index 3336de7be..000000000 --- a/bta/mce/bta_mce_int.h +++ /dev/null @@ -1,83 +0,0 @@ -/****************************************************************************** - * - * Copyright 2014 The Android Open Source Project - * Copyright 2003-2012 Broadcom Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ******************************************************************************/ - -/****************************************************************************** - * - * This is the private interface file for the BTA MCE I/F - * - ******************************************************************************/ -#ifndef BTA_MCE_INT_H -#define BTA_MCE_INT_H - -#include "bta_api.h" -#include "bta_mce_api.h" -#include "bta_sys.h" - -/***************************************************************************** - * Constants - ****************************************************************************/ - -enum { - /* these events are handled by the state machine */ - BTA_MCE_API_ENABLE_EVT = BTA_SYS_EVT_START(BTA_ID_MCE), - BTA_MCE_API_GET_REMOTE_MAS_INSTANCES_EVT, - BTA_MCE_MAX_INT_EVT -}; - -/* data type for BTA_MCE_API_ENABLE_EVT */ -typedef struct { - BT_HDR hdr; - tBTA_MCE_DM_CBACK* p_cback; -} tBTA_MCE_API_ENABLE; - -/* data type for BTA_MCE_API_GET_REMOTE_MAS_INSTANCES_EVT */ -typedef struct { - BT_HDR hdr; - RawAddress bd_addr; -} tBTA_MCE_API_GET_REMOTE_MAS_INSTANCES; - -/* union of all data types */ -typedef union { - /* GKI event buffer header */ - BT_HDR hdr; - tBTA_MCE_API_ENABLE enable; - tBTA_MCE_API_GET_REMOTE_MAS_INSTANCES get_rmt_mas; -} tBTA_MCE_MSG; - -/* MCE control block */ -typedef struct { - uint8_t sdp_active; /* see BTA_MCE_SDP_ACT_* */ - RawAddress remote_addr; - tBTA_MCE_DM_CBACK* p_dm_cback; -} tBTA_MCE_CB; - -enum { - BTA_MCE_SDP_ACT_NONE = 0, - BTA_MCE_SDP_ACT_YES /* waiting for SDP result */ -}; - -/* MCE control block */ -extern tBTA_MCE_CB bta_mce_cb; - -/* config struct */ -extern tBTA_MCE_CFG* p_bta_mce_cfg; - -extern void bta_mce_get_remote_mas_instances(tBTA_MCE_MSG* p_data); - -#endif /* BTA_MCE_INT_H */ diff --git a/bta/mce/bta_mce_main.cc b/bta/mce/bta_mce_main.cc deleted file mode 100644 index ad9d4e63c..000000000 --- a/bta/mce/bta_mce_main.cc +++ /dev/null @@ -1,37 +0,0 @@ -/****************************************************************************** - * - * Copyright 2014 The Android Open Source Project - * Copyright 2003-2012 Broadcom Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ******************************************************************************/ - -/****************************************************************************** - * - * This is the main implementation file for the BTA MCE I/F - * - ******************************************************************************/ - -#include - -#include "bta_api.h" -#include "bta_mce_api.h" -#include "bta_mce_int.h" -#include "bta_sys.h" - -/***************************************************************************** - * Constants and types - ****************************************************************************/ - -tBTA_MCE_CB bta_mce_cb; diff --git a/btif/src/btif_mce.cc b/btif/src/btif_mce.cc index 1a8768b71..54a862e20 100644 --- a/btif/src/btif_mce.cc +++ b/btif/src/btif_mce.cc @@ -36,7 +36,6 @@ #include "bt_types.h" #include "bta_api.h" -#include "bta_mce_api.h" #include "btif_common.h" #include "btif_util.h"