diff --git a/BUILD.gn b/BUILD.gn old mode 100755 new mode 100644 index 5082f8b4f480fbf282e190706d2a27d3e84ffb47..15dd462f68ba0fb6643c72352089146cb6cc1d3d --- 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 58b7226dab887c22fcf8acfb1eb85569fca39c91..e332f03b8fa1824421068424cc805e5102035d9e 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 832902dae1fb7b89d4f26e60957b91c0d3bd0c15..1955a2ceb03adaf87ac7e871963d1320bcb8e164 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 f55165b4398226dd85103ebc86ea030aa5621dbc..cad497643b462e4283f932aa62e941844fd780f3 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 137b0d3323af050a4cc8115e1c3bf578b270968d..b3875a469a0a8ca11fbe29a915efe70e591dd364 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 b93f9f8ce07e193b11367ed62ef7b832a6fdd156..437225c3a6138a72fae2209e02d4c4b362f1a451 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 11ee1db4c27adbfb196b33413dff1b6e218d2c0b..d2a76a435803d527edd8472a9cb1e5bde1980ce5 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 3d3f7a9ea964489e9674fdc2b96294a598a4486a..e572d9af354d92643f85f235a508b5f51564e2f2 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 ccac98d821164d8d30e0bde6ec3178e606ee912d..10dc2f28bc3869a93b8767ec7f1d68d459b7cd80 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 062bc3cfd149cfe66926de79d25c1d5597645ad1..32e47cb29377d3b4c3c78b59006563e83cbba0bc 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 b3f14b4fc061ecb98a35998af2ad46db9053f20a..5255e4165eb8b599d965e292b144ac7594869682 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 45ea6022b4f2b2d6ae7264a7836d766e3499f8cb..09baf0b8131e54141fcc5fe23b36a247f5e5c090 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