OSDN Git Service

Remove MCE code that now no longer does anything
authorZach Johnson <zachoverflow@google.com>
Fri, 28 Aug 2020 23:08:50 +0000 (16:08 -0700)
committerZach Johnson <zachoverflow@google.com>
Fri, 28 Aug 2020 23:12:09 +0000 (16:12 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If97d3f702f30d957f75dcda9a792deea4696358a

bta/Android.bp
bta/BUILD.gn
bta/include/bta_mce_api.h [deleted file]
bta/mce/bta_mce_act.cc [deleted file]
bta/mce/bta_mce_api.cc [deleted file]
bta/mce/bta_mce_cfg.cc [deleted file]
bta/mce/bta_mce_int.h [deleted file]
bta/mce/bta_mce_main.cc [deleted file]
btif/src/btif_mce.cc

index 7894464..f7471aa 100755 (executable)
@@ -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",
index 0bf6544..6632c24 100644 (file)
@@ -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 (file)
index 4c1e854..0000000
+++ /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 (file)
index 5b97757..0000000
+++ /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 <hardware/bluetooth.h>
-
-#include <string.h>
-#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 (file)
index be3748b..0000000
+++ /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 <string.h>
-
-#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 (file)
index ede80ba..0000000
+++ /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 (file)
index 3336de7..0000000
+++ /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 (file)
index ad9d4e6..0000000
+++ /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 <stddef.h>
-
-#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;
index 1a8768b..54a862e 100644 (file)
@@ -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"