diff --git a/core/bus_center/ipc/mini/lnn_bus_center_ipc.c b/core/bus_center/ipc/mini/lnn_bus_center_ipc.c index 5fd99780dcedc027fc49f715d49ed6ea78a0ff6c..c121467662cdde99800de51997d0073e62c64a69 100644 --- a/core/bus_center/ipc/mini/lnn_bus_center_ipc.c +++ b/core/bus_center/ipc/mini/lnn_bus_center_ipc.c @@ -22,7 +22,6 @@ #include "client_bus_center_manager.h" #include "lnn_distributed_net_ledger.h" #include "lnn_heartbeat_ctrl.h" -#include "lnn_ipc_utils.h" #include "lnn_meta_node_ledger.h" #include "lnn_time_sync_manager.h" #include "softbus_errcode.h" diff --git a/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c b/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c index f03ef5221dfa984b62d898893c2bafdf596a09a4..093dd3499089eb47cf135eb11176c1acf9bf7327 100644 --- a/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c +++ b/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c @@ -24,7 +24,6 @@ #include "lnn_connection_addr_utils.h" #include "lnn_distributed_net_ledger.h" #include "lnn_heartbeat_ctrl.h" -#include "lnn_ipc_utils.h" #include "lnn_meta_node_ledger.h" #include "lnn_time_sync_manager.h" #include "softbus_adapter_mem.h" diff --git a/core/bus_center/ipc/standard/src/lnn_bus_center_ipc.cpp b/core/bus_center/ipc/standard/src/lnn_bus_center_ipc.cpp old mode 100755 new mode 100644 index 87f669d18a0e2a36a4ba0f77fb1bee60eeab2235..dee178e0bb213a2b1ff09973ec8ccc143c9c69b9 --- a/core/bus_center/ipc/standard/src/lnn_bus_center_ipc.cpp +++ b/core/bus_center/ipc/standard/src/lnn_bus_center_ipc.cpp @@ -25,7 +25,6 @@ #include "lnn_connection_addr_utils.h" #include "lnn_distributed_net_ledger.h" #include "lnn_heartbeat_ctrl.h" -#include "lnn_ipc_utils.h" #include "lnn_meta_node_ledger.h" #include "lnn_time_sync_manager.h" #include "softbus_def.h" diff --git a/core/bus_center/utils/bus_center_utils.gni b/core/bus_center/utils/bus_center_utils.gni index 31a792f01828b2725fbdf16c9d4779a57fffb701..0623ac81f491ef6397465b1fa81667eee65183cf 100644 --- a/core/bus_center/utils/bus_center_utils.gni +++ b/core/bus_center/utils/bus_center_utils.gni @@ -19,7 +19,6 @@ bus_center_utils_src = [ "$core_bus_center_utils_path/src/lnn_async_callback_utils.c", "$core_bus_center_utils_path/src/lnn_connection_addr_utils.c", "$core_bus_center_utils_path/src/lnn_map.c", - "$dsoftbus_root_path/core/bus_center/utils/src/lnn_ipc_utils.c", ] if (dsoftbus_feature_lnn_net) { bus_center_utils_src += diff --git a/core/bus_center/utils/include/lnn_ipc_utils.h b/core/bus_center/utils/include/lnn_ipc_utils.h deleted file mode 100644 index db38163120a0a18dd265c6ee087b96098e88efde..0000000000000000000000000000000000000000 --- a/core/bus_center/utils/include/lnn_ipc_utils.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * 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. - */ - -#ifndef LNN_IPC_UTILS_H -#define LNN_IPC_UTILS_H - -#include -#include - -#include "softbus_bus_center.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void ConvertVoidToPublishInfo(const void *info, PublishInfo *pubInfo); -void ConvertVoidToSubscribeInfo(const void *info, SubscribeInfo *subInfo); - -#ifdef __cplusplus -} -#endif -#endif /* LNN_IPC_UTILS_H */ \ No newline at end of file diff --git a/core/bus_center/utils/src/lnn_ipc_utils.c b/core/bus_center/utils/src/lnn_ipc_utils.c deleted file mode 100644 index 886856bf45b9063c0c70ff68fa8464632cb2015e..0000000000000000000000000000000000000000 --- a/core/bus_center/utils/src/lnn_ipc_utils.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * 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. - */ - -#include "lnn_ipc_utils.h" - -#include - -void ConvertVoidToPublishInfo(const void *info, PublishInfo *pubInfo) -{ - if (info == NULL || pubInfo == NULL) { - return; - } - char *info1 = (char *)info; - pubInfo->publishId = *(int32_t *)info1; - info1 += sizeof(int32_t); - pubInfo->mode = *(DiscoverMode *)info1; - info1 += sizeof(DiscoverMode); - pubInfo->medium = *(ExchangeMedium *)info1; - info1 += sizeof(ExchangeMedium); - pubInfo->freq = *(ExchangeFreq *)info1; - info1 += sizeof(ExchangeFreq); - pubInfo->capability = (const char *)info1; - info1 += strlen(pubInfo->capability) + 1; - pubInfo->dataLen = *(int32_t *)info1; - info1 += sizeof(int32_t); - if (pubInfo->dataLen > 0) { - pubInfo->capabilityData = (unsigned char *)info1; - info1 += pubInfo->dataLen + 1; - } - pubInfo->ranging = *(bool *)info1; -} - -void ConvertVoidToSubscribeInfo(const void *info, SubscribeInfo *subInfo) -{ - if (info == NULL || subInfo == NULL) { - return; - } - char *info1 = (char *)info; - subInfo->subscribeId = *(int32_t *)info1; - info1 += sizeof(int32_t); - subInfo->mode = *(DiscoverMode *)info1; - info1 += sizeof(DiscoverMode); - subInfo->medium = *(ExchangeMedium *)info1; - info1 += sizeof(ExchangeMedium); - subInfo->freq = *(ExchangeFreq *)info1; - info1 += sizeof(ExchangeFreq); - subInfo->isSameAccount = *(bool *)info1; - info1 += sizeof(bool); - subInfo->isWakeRemote = *(bool *)info1; - info1 += sizeof(bool); - subInfo->capability = (const char *)info1; - info1 += strlen(subInfo->capability) + 1; - subInfo->dataLen = *(int32_t *)info1; - info1 += sizeof(int32_t); - if (subInfo->dataLen > 0) { - subInfo->capabilityData = (unsigned char *)info1; - } -} \ No newline at end of file diff --git a/tests/core/bus_center/lnn/ipc/bus_center_client_proxy_standard_test.cpp b/tests/core/bus_center/lnn/ipc/bus_center_client_proxy_standard_test.cpp index f7180bb3a50cabb4540669e2686f906ea99a11fc..3fdee47a696e1ce3a12bd283a0d2fd88f6d6c4a6 100644 --- a/tests/core/bus_center/lnn/ipc/bus_center_client_proxy_standard_test.cpp +++ b/tests/core/bus_center/lnn/ipc/bus_center_client_proxy_standard_test.cpp @@ -41,7 +41,6 @@ #include "lnn_sync_item_info.h" #include "softbus_bus_center.h" #include "softbus_conn_interface.h" -#include "lnn_ipc_utils.h" #include "lnn_meta_node_ledger.h" #include "lnn_time_sync_manager.h" #include "softbus_def.h" diff --git a/tests/core/bus_center/lnn/ipc/lnn_bus_center_ipc_test.cpp b/tests/core/bus_center/lnn/ipc/lnn_bus_center_ipc_test.cpp index 7a2f9f866bcfad36bd5da09357a779f21293c087..d8f545df69841d30bf9060191cc18bf8ff115b22 100644 --- a/tests/core/bus_center/lnn/ipc/lnn_bus_center_ipc_test.cpp +++ b/tests/core/bus_center/lnn/ipc/lnn_bus_center_ipc_test.cpp @@ -39,7 +39,6 @@ #include "lnn_sync_item_info.h" #include "softbus_bus_center.h" #include "softbus_conn_interface.h" -#include "lnn_ipc_utils.h" #include "lnn_meta_node_ledger.h" #include "lnn_time_sync_manager.h" #include "softbus_def.h"