From 7debcd9c88324b274b2add7bbd44ca3be8952909 Mon Sep 17 00:00:00 2001 From: wangyongzhong2 Date: Mon, 14 Mar 2022 15:36:53 +0800 Subject: [PATCH] update_03/14 Signed-off-by: wangyongzhong2 --- BUILD.gn | 2 +- LICENSE | 0 README.md | 0 bundle.json | 0 figures/dataclassification.png | Bin figures/dataclassification_zh.png | Bin frameworks/datatransmitmgr/dev_slinfo_adpt.c | 8 ++++---- frameworks/datatransmitmgr/dev_slinfo_list.c | 15 ++++++++------- frameworks/datatransmitmgr/dev_slinfo_mgr.c | 3 ++- interfaces/innerkits/datatransmitmgr/BUILD.gn | 4 ++-- .../datatransmitmgr/include/dev_slinfo_adpt.h | 4 ++-- .../datatransmitmgr/include/dev_slinfo_list.h | 2 +- .../datatransmitmgr/include/dev_slinfo_log.h | 2 +- .../datatransmitmgr/include/dev_slinfo_mgr.h | 2 +- test/unittest/datatransmitmgr/BUILD.gn | 4 ++-- test/unittest/datatransmitmgr/DevSLMgrTest.cpp | 2 +- test/unittest/datatransmitmgr/DevSLMgrTest.h | 2 +- 17 files changed, 26 insertions(+), 24 deletions(-) mode change 100755 => 100644 BUILD.gn mode change 100755 => 100644 LICENSE mode change 100755 => 100644 README.md mode change 100755 => 100644 bundle.json mode change 100755 => 100644 figures/dataclassification.png mode change 100755 => 100644 figures/dataclassification_zh.png diff --git a/BUILD.gn b/BUILD.gn old mode 100755 new mode 100644 index 5082f8b..15dd462 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# Copyright (C) 2021-2022 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 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/bundle.json b/bundle.json old mode 100755 new mode 100644 diff --git a/figures/dataclassification.png b/figures/dataclassification.png old mode 100755 new mode 100644 diff --git a/figures/dataclassification_zh.png b/figures/dataclassification_zh.png old mode 100755 new mode 100644 diff --git a/frameworks/datatransmitmgr/dev_slinfo_adpt.c b/frameworks/datatransmitmgr/dev_slinfo_adpt.c index 58b7226..e332f03 100644 --- a/frameworks/datatransmitmgr/dev_slinfo_adpt.c +++ b/frameworks/datatransmitmgr/dev_slinfo_adpt.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 @@ -131,7 +131,7 @@ void FinishDevslEnv(void) return; } -int32_t GetDeviceSecLevelByUdid(uint8_t *udid, uint32_t udidLen, int32_t *devLevel) +int32_t GetDeviceSecLevelByUdid(const uint8_t *udid, uint32_t udidLen, int32_t *devLevel) { DATA_SEC_LOG_INFO("Enter GetDeviceSecLevelByUdid..."); if (g_deviceSecEnv.requestDeviceSecurityInfo == NULL) { @@ -232,7 +232,7 @@ void OnApiDeviceSecInfoCallback(const DeviceIdentify *identify, struct DeviceSec DATA_SEC_LOG_INFO("OnApiDeviceSecInfoCallback done!"); } -int32_t GetDeviceSecLevelByUdidAsync(uint8_t *udid, uint32_t udidLen) +int32_t GetDeviceSecLevelByUdidAsync(const uint8_t *udid, uint32_t udidLen) { DATA_SEC_LOG_INFO("Enter GetDeviceSecLevelByUdidAsync..."); if (g_deviceSecEnv.requestDeviceSecurityInfoAsync == NULL) { @@ -299,7 +299,7 @@ int32_t GetDataSecLevelByDevSecLevel(int32_t devLevel) } } if (i >= n) { - DATA_SEC_LOG_WARN("GetDataSecLevelBySecLevel, unknow device level tag: %d", devLevel); + DATA_SEC_LOG_WARN("GetDataSecLevelBySecLevel, unknown device level tag: %d", devLevel); } return DATA_SEC_LEVEL0; } diff --git a/frameworks/datatransmitmgr/dev_slinfo_list.c b/frameworks/datatransmitmgr/dev_slinfo_list.c index 832902d..1955a2c 100644 --- a/frameworks/datatransmitmgr/dev_slinfo_list.c +++ b/frameworks/datatransmitmgr/dev_slinfo_list.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 @@ -35,12 +35,13 @@ struct DATASLListParams* InitList(void) return list; } -static void UpdateListNode(struct DATASLListParams *new, struct DATASLListParams *prev, struct DATASLListParams *next) +static void UpdateListNode(struct DATASLListParams *newListNode, + struct DATASLListParams *prevListNode, struct DATASLListParams *nextListNode) { - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; + nextListNode->prev = newListNode; + newListNode->next = nextListNode; + newListNode->prev = prevListNode; + prevListNode->next = newListNode; } int32_t PushListNode(struct DATASLListParams *list, struct DATASLCallbackParams *callbackParams) @@ -53,7 +54,7 @@ int32_t PushListNode(struct DATASLListParams *list, struct DATASLCallbackParams } UpdateListNode(newList, list->prev, list); - newList->callbackParams = (struct DATASLCallbackParams*)callbackParams; + newList->callbackParams = callbackParams; pthread_mutex_unlock(&gMutex); return DEVSL_SUCCESS; } diff --git a/frameworks/datatransmitmgr/dev_slinfo_mgr.c b/frameworks/datatransmitmgr/dev_slinfo_mgr.c index f55165b..cad4976 100644 --- a/frameworks/datatransmitmgr/dev_slinfo_mgr.c +++ b/frameworks/datatransmitmgr/dev_slinfo_mgr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include "dev_slinfo_list.h" #include "dev_slinfo_adpt.h" #include "dev_slinfo_log.h" diff --git a/interfaces/innerkits/datatransmitmgr/BUILD.gn b/interfaces/innerkits/datatransmitmgr/BUILD.gn index 137b0d3..b3875a4 100644 --- a/interfaces/innerkits/datatransmitmgr/BUILD.gn +++ b/interfaces/innerkits/datatransmitmgr/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Copyright (C) 2022 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 @@ -9,7 +9,7 @@ # 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. +# limitations under the License. import("//build/ohos.gni") diff --git a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_adpt.h b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_adpt.h index b93f9f8..437225c 100644 --- a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_adpt.h +++ b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_adpt.h @@ -54,11 +54,11 @@ int32_t StartDevslEnv(void); void FinishDevslEnv(void); -int32_t GetDeviceSecLevelByUdid(uint8_t *udid, uint32_t udidLen, int32_t *devLevel); +int32_t GetDeviceSecLevelByUdid(const uint8_t *udid, uint32_t udidLen, int32_t *devLevel); int32_t CompareUdid(DEVSLQueryParams *queryParamsL, DEVSLQueryParams *queryParamsR); -int32_t GetDeviceSecLevelByUdidAsync(uint8_t *udid, uint32_t udidLen); +int32_t GetDeviceSecLevelByUdidAsync(const uint8_t *udid, uint32_t udidLen); int32_t GetDataSecLevelByDevSecLevel(int32_t devLevel); diff --git a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_list.h b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_list.h index 11ee1db..d2a76a4 100644 --- a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_list.h +++ b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_list.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 diff --git a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_log.h b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_log.h index 3d3f7a9..e572d9a 100644 --- a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_log.h +++ b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_log.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 diff --git a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_mgr.h b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_mgr.h index ccac98d..10dc2f2 100644 --- a/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_mgr.h +++ b/interfaces/innerkits/datatransmitmgr/include/dev_slinfo_mgr.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 diff --git a/test/unittest/datatransmitmgr/BUILD.gn b/test/unittest/datatransmitmgr/BUILD.gn index 062bc3c..32e47cb 100644 --- a/test/unittest/datatransmitmgr/BUILD.gn +++ b/test/unittest/datatransmitmgr/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Huawei Device Co., Ltd. +# Copyright (C) 2022 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 @@ -9,7 +9,7 @@ # 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. +# limitations under the License. import("//build/test.gni") module_output_path = "dataclassification/datasecuritylevel" diff --git a/test/unittest/datatransmitmgr/DevSLMgrTest.cpp b/test/unittest/datatransmitmgr/DevSLMgrTest.cpp index b3f14b4..5255e41 100644 --- a/test/unittest/datatransmitmgr/DevSLMgrTest.cpp +++ b/test/unittest/datatransmitmgr/DevSLMgrTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 diff --git a/test/unittest/datatransmitmgr/DevSLMgrTest.h b/test/unittest/datatransmitmgr/DevSLMgrTest.h index 45ea602..09baf0b 100644 --- a/test/unittest/datatransmitmgr/DevSLMgrTest.h +++ b/test/unittest/datatransmitmgr/DevSLMgrTest.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Device Co., Ltd. + * Copyright (C) 2022 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 -- Gitee