diff --git a/common/include/interfaces/access_control_profile.h b/common/include/interfaces/access_control_profile.h index 4edb3da51d8eb28ca8bc09786baa436ebd777590..ff36e7c548a45fa73e4cdf85fd57bc8e77e2f108 100644 --- a/common/include/interfaces/access_control_profile.h +++ b/common/include/interfaces/access_control_profile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -65,7 +65,7 @@ public: void SetExtraData(const std::string& extraData); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int64_t accessControlId_; diff --git a/common/include/interfaces/accessee.h b/common/include/interfaces/accessee.h index 4bbac0bd249322e71f993e0739bc7d0ae59f2145..c7dc39697aac6b1aa352a214fbadc58596e8c7bf 100644 --- a/common/include/interfaces/accessee.h +++ b/common/include/interfaces/accessee.h @@ -63,7 +63,7 @@ public: void SetAccesseeExtraData(const std::string& accesseeExtraData); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int64_t accesseeId_; diff --git a/common/include/interfaces/accesser.h b/common/include/interfaces/accesser.h index b565e43c79c4bbdcb694ae6fd769669fbf9b91e1..bc9d73cb200a57e2406dbc9cf943bf6c331b12fb 100644 --- a/common/include/interfaces/accesser.h +++ b/common/include/interfaces/accesser.h @@ -62,7 +62,7 @@ public: void SetAccesserExtraData(const std::string& accesserExtraData); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int64_t accesserId_; diff --git a/common/include/interfaces/business_event.h b/common/include/interfaces/business_event.h index e15f5be1b34c2ffe4c6969c72c2c0418fe8bb254..74f9dc03bf8b61bb51a190f8e8591b9f2a603a2a 100644 --- a/common/include/interfaces/business_event.h +++ b/common/include/interfaces/business_event.h @@ -38,7 +38,7 @@ public: void SetBusinessValue(const std::string& businessValue); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string businessKey_ = ""; diff --git a/common/include/interfaces/characteristic_profile.h b/common/include/interfaces/characteristic_profile.h index 57523ba011961500fd0dd426517939f3e45b39cd..4c8f9aa321f59be1f26662b7bf528f1c71b02bcf 100644 --- a/common/include/interfaces/characteristic_profile.h +++ b/common/include/interfaces/characteristic_profile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -60,7 +60,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; bool operator!=(const CharacteristicProfile& charProfile) const; - std::string dump() const override; + std::string Dump() const override; private: std::string deviceId_ = ""; diff --git a/common/include/interfaces/characteristic_profile_filter_option.h b/common/include/interfaces/characteristic_profile_filter_option.h index 5a917536ce207e7b6e8d4d27aa6ccf2dca280010..a8b6fef5ba70e02279033f5ef82b112740d7505e 100644 --- a/common/include/interfaces/characteristic_profile_filter_option.h +++ b/common/include/interfaces/characteristic_profile_filter_option.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -60,7 +60,7 @@ public: void SetServiceProfileId(int32_t serviceProfileId); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int32_t userId_ = DEFAULT_USER_ID; diff --git a/common/include/interfaces/device_icon_info.h b/common/include/interfaces/device_icon_info.h index 302f67d604b64e49683a2a069452af0fe991e3b6..bbe3fdd009979b733f9906f8b6509ac8da15c52d 100644 --- a/common/include/interfaces/device_icon_info.h +++ b/common/include/interfaces/device_icon_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -57,7 +57,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; bool operator!=(const DeviceIconInfo& other) const; - std::string dump() const override; + std::string Dump() const override; private: int32_t id_; diff --git a/common/include/interfaces/device_icon_info_filter_options.h b/common/include/interfaces/device_icon_info_filter_options.h index 7f5be3960856db88965a79fcc5171d84b3bf560a..3ddecab28fe997b852fbf95de935de2e5b013142 100644 --- a/common/include/interfaces/device_icon_info_filter_options.h +++ b/common/include/interfaces/device_icon_info_filter_options.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -42,7 +42,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::vector productIds_; diff --git a/common/include/interfaces/device_profile.h b/common/include/interfaces/device_profile.h index 7072a39d84b8e6f53756d99cc4bedb8a9c3801f6..c416b055f32b91dc3175e6adc2e1d9606f2823f8 100644 --- a/common/include/interfaces/device_profile.h +++ b/common/include/interfaces/device_profile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -129,7 +129,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; bool operator!=(const DeviceProfile& deviceProfile) const; - std::string dump() const override; + std::string Dump() const override; std::string AnnoymizeDump() const; const std::string GetBleMac() const; void SetBleMac(const std::string& bleMac); diff --git a/common/include/interfaces/device_profile_filter_options.h b/common/include/interfaces/device_profile_filter_options.h index db28c64ca4a0dc3fce90b923d80fa04b6e8e85c7..59e7d251a0c5ec0a912feb09416165af3c4121f4 100644 --- a/common/include/interfaces/device_profile_filter_options.h +++ b/common/include/interfaces/device_profile_filter_options.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -45,7 +45,7 @@ public: void AddDeviceProfileIds(int32_t deviceProfileId); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int32_t userId_; diff --git a/common/include/interfaces/dp_parcel.h b/common/include/interfaces/dp_parcel.h index 29051289be433aea84870ebd789b160715088dd4..444aace571de476909eb65a4817459a1a92ca19f 100644 --- a/common/include/interfaces/dp_parcel.h +++ b/common/include/interfaces/dp_parcel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -27,7 +27,7 @@ public: virtual ~DpParcel() = default; virtual bool Marshalling(MessageParcel& parcel) const = 0; virtual bool UnMarshalling(MessageParcel& parcel) = 0; - virtual std::string dump() const = 0; + virtual std::string Dump() const = 0; }; } // namespace DistributedDeviceProfile } // namespace OHOS diff --git a/common/include/interfaces/dp_subscribe_info.h b/common/include/interfaces/dp_subscribe_info.h index 2429d26249540ba4050f2bd51b0df482974a3b0a..e0ec4c2810f395d9849a5b933071daf3dfeb3f6b 100644 --- a/common/include/interfaces/dp_subscribe_info.h +++ b/common/include/interfaces/dp_subscribe_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -52,7 +52,7 @@ public: void AddProfileChangeType(ProfileChangeType profileChangeType); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int32_t saId_ = -1; diff --git a/common/include/interfaces/dp_sync_options.h b/common/include/interfaces/dp_sync_options.h index ceaf502c383053970f1be8348a644f762639b808..4366661bf06746837fc5324a897a04261ebcf27b 100644 --- a/common/include/interfaces/dp_sync_options.h +++ b/common/include/interfaces/dp_sync_options.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -37,7 +37,7 @@ public: void SetSyncMode(SyncMode mode); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: SyncMode syncMode_{SyncMode::PUSH_PULL}; diff --git a/common/include/interfaces/local_service_info.h b/common/include/interfaces/local_service_info.h index 26b682c79600d6d302d526db4f25e11a8ff635d9..dd9834036ac2f0fcda989499ba1fd7b1ed29575b 100644 --- a/common/include/interfaces/local_service_info.h +++ b/common/include/interfaces/local_service_info.h @@ -58,7 +58,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string bundleName_ = ""; diff --git a/common/include/interfaces/product_info.h b/common/include/interfaces/product_info.h index 3f32690af61a8aca34f5b0631482a48fd6366cb8..804ec7c574b4f0ada697b174fce6e5d41e2d540b 100644 --- a/common/include/interfaces/product_info.h +++ b/common/include/interfaces/product_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -46,7 +46,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; bool operator!=(const ProductInfo& other) const; - std::string dump() const override; + std::string Dump() const override; private: std::string GetAnonyProductName(const std::string& value) const; diff --git a/common/include/interfaces/query_profile.h b/common/include/interfaces/query_profile.h index b5f75a832e4cabaff0a322cd7563b6da725bff5d..5da6a6ae123a2b277c6e639523fc6916233d78fa 100644 --- a/common/include/interfaces/query_profile.h +++ b/common/include/interfaces/query_profile.h @@ -45,7 +45,7 @@ public: void SetAccesseeTokenId(int64_t accesseeTokenId); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string accesserDeviceId_; diff --git a/common/include/interfaces/service_info_profile.h b/common/include/interfaces/service_info_profile.h index f348a92c0d672083c493f22405c73ed19a68a9ca..4ead1c63987c657c01d19351fffdd7b7cb4a27fa 100644 --- a/common/include/interfaces/service_info_profile.h +++ b/common/include/interfaces/service_info_profile.h @@ -100,7 +100,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string deviceId_ = ""; diff --git a/common/include/interfaces/service_info_unique_key.h b/common/include/interfaces/service_info_unique_key.h index 201fc880838531b5b37a8685be254d0bb33f2d21..afbc1c39de82053931af853959d047522ea8e71d 100644 --- a/common/include/interfaces/service_info_unique_key.h +++ b/common/include/interfaces/service_info_unique_key.h @@ -55,7 +55,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string deviceId_ = ""; diff --git a/common/include/interfaces/service_profile.h b/common/include/interfaces/service_profile.h index b8ff73bd859c32aae8c456ed39ba1ef93718a94d..134222efe96118ef8443827ef5b6ffa793aa59f1 100644 --- a/common/include/interfaces/service_profile.h +++ b/common/include/interfaces/service_profile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -44,7 +44,7 @@ public: bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; bool operator!=(const ServiceProfile& serviceProfile) const; - std::string dump() const override; + std::string Dump() const override; private: std::string deviceId_ = ""; diff --git a/common/include/interfaces/service_profile_filter_opotions.h b/common/include/interfaces/service_profile_filter_opotions.h index 9afaba076ba430c15c07bd5fc5b8a0e34f2812d8..e8de5e3a6f67d21a12ec316873945af0b339ce94 100644 --- a/common/include/interfaces/service_profile_filter_opotions.h +++ b/common/include/interfaces/service_profile_filter_opotions.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -54,7 +54,7 @@ public: bool IsEmpty() const; bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: int32_t userId_ = DEFAULT_USER_ID; diff --git a/common/include/interfaces/trust_device_profile.h b/common/include/interfaces/trust_device_profile.h index 8ced271eb1f9b1e552a5b4b328bc92f60ac55af3..b9f91f4ea7bc21f4239e77dd5ad84d463e75adaf 100644 --- a/common/include/interfaces/trust_device_profile.h +++ b/common/include/interfaces/trust_device_profile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -51,7 +51,7 @@ public: void SetLocalUserId(int32_t localUserId); bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string deviceId_; diff --git a/common/include/interfaces/trusted_device_info.h b/common/include/interfaces/trusted_device_info.h index 820290404a57cfdaba47ba2a0b0b412ef191ee94..a61d87cb02d91d40bb7d1ec6d8babf3b0e30d769 100644 --- a/common/include/interfaces/trusted_device_info.h +++ b/common/include/interfaces/trusted_device_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -48,7 +48,7 @@ public: bool operator<(const TrustedDeviceInfo& trustedDeviceInfo) const; bool Marshalling(MessageParcel& parcel) const override; bool UnMarshalling(MessageParcel& parcel) override; - std::string dump() const override; + std::string Dump() const override; private: std::string networkId_; diff --git a/common/src/interfaces/access_control_profile.cpp b/common/src/interfaces/access_control_profile.cpp index 07fc60a00e264814952b77ae57195b48f85b0899..e21cc50c6de0f141c443c1a370b3fdbfe5c445c9 100644 --- a/common/src/interfaces/access_control_profile.cpp +++ b/common/src/interfaces/access_control_profile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -250,7 +250,7 @@ bool AccessControlProfile::UnMarshalling(MessageParcel& parcel) return true; } -std::string AccessControlProfile::dump() const +std::string AccessControlProfile::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/accessee.cpp b/common/src/interfaces/accessee.cpp index ede7575598937c0bf3245a3d1a4ea370bc167d23..f0cd40c528c5d3e40bb591282e38942cc249d6ac 100644 --- a/common/src/interfaces/accessee.cpp +++ b/common/src/interfaces/accessee.cpp @@ -245,7 +245,7 @@ bool Accessee::UnMarshalling(MessageParcel& parcel) return true; } -std::string Accessee::dump() const +std::string Accessee::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/accesser.cpp b/common/src/interfaces/accesser.cpp index aa7b4faa9b68f746f7ed552fb7d9a7dbc4108464..e7d9c96d570afdd46d05dd22be62f2b26ec32081 100644 --- a/common/src/interfaces/accesser.cpp +++ b/common/src/interfaces/accesser.cpp @@ -243,7 +243,7 @@ bool Accesser::UnMarshalling(MessageParcel& parcel) return true; } -std::string Accesser::dump() const +std::string Accesser::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/business_event.cpp b/common/src/interfaces/business_event.cpp index f2ec12a43e430084ff732909f64a5916a379c913..65f18ae737953f838d9030760b8db68486f99e11 100644 --- a/common/src/interfaces/business_event.cpp +++ b/common/src/interfaces/business_event.cpp @@ -67,7 +67,7 @@ bool BusinessEvent::UnMarshalling(MessageParcel& parcel) return true; } -std::string BusinessEvent::dump() const +std::string BusinessEvent::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/characteristic_profile.cpp b/common/src/interfaces/characteristic_profile.cpp index 13123602bfbec07f2351c45916f6ffaeba2325c2..0dbc5cc0184d4e74abb2fed506e1206eab8430eb 100644 --- a/common/src/interfaces/characteristic_profile.cpp +++ b/common/src/interfaces/characteristic_profile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -119,7 +119,7 @@ bool CharacteristicProfile::operator!=(const CharacteristicProfile& charProfile) } } -std::string CharacteristicProfile::dump() const +std::string CharacteristicProfile::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/characteristic_profile_filter_option.cpp b/common/src/interfaces/characteristic_profile_filter_option.cpp index 6d1e11d189aea610e10382441d3b8c238d02e3b7..3a8e34c2a7bdc444fff8ab9fe08edc8ceb1ff8bd 100644 --- a/common/src/interfaces/characteristic_profile_filter_option.cpp +++ b/common/src/interfaces/characteristic_profile_filter_option.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -136,7 +136,7 @@ bool CharacteristicProfileFilterOption::UnMarshalling(MessageParcel& parcel) return true; } -std::string CharacteristicProfileFilterOption::dump() const +std::string CharacteristicProfileFilterOption::Dump() const { return ""; } diff --git a/common/src/interfaces/device_icon_info.cpp b/common/src/interfaces/device_icon_info.cpp index 8587c3fcec8da6c5ded66991d6f81b0f423a4f64..92fb94bc95ef6689e0054bd2393f5148b88dbaa3 100644 --- a/common/src/interfaces/device_icon_info.cpp +++ b/common/src/interfaces/device_icon_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -171,7 +171,7 @@ bool DeviceIconInfo::operator!=(const DeviceIconInfo& other) const } } -std::string DeviceIconInfo::dump() const +std::string DeviceIconInfo::Dump() const { cJSON* json = cJSON_CreateObject(); if (json == NULL) { diff --git a/common/src/interfaces/device_icon_info_filter_options.cpp b/common/src/interfaces/device_icon_info_filter_options.cpp index 2426a342745f6ea88a4d3e72bd66a097bf8079e2..a1239fd3ec02ec2f8726042c8f56be40e5451c80 100644 --- a/common/src/interfaces/device_icon_info_filter_options.cpp +++ b/common/src/interfaces/device_icon_info_filter_options.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -98,7 +98,7 @@ bool DeviceIconInfoFilterOptions::UnMarshalling(MessageParcel& parcel) return true; } -std::string DeviceIconInfoFilterOptions::dump() const +std::string DeviceIconInfoFilterOptions::Dump() const { cJSON* json = cJSON_CreateObject(); if (json == NULL) { diff --git a/common/src/interfaces/device_profile.cpp b/common/src/interfaces/device_profile.cpp index c2d49df649f4f193d2112facec4816b6bc91505c..83d8d83235390ae4472dfb44d7d08c9783c3a103 100644 --- a/common/src/interfaces/device_profile.cpp +++ b/common/src/interfaces/device_profile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -479,7 +479,7 @@ bool DeviceProfile::operator!=(const DeviceProfile& deviceProfile) const } } -std::string DeviceProfile::dump() const +std::string DeviceProfile::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/device_profile_filter_options.cpp b/common/src/interfaces/device_profile_filter_options.cpp index af1d19991b49c1de3aff43462e61d2c77acaf66f..f87a65f562ac819274e24676022acd15c8fd310f 100644 --- a/common/src/interfaces/device_profile_filter_options.cpp +++ b/common/src/interfaces/device_profile_filter_options.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -110,7 +110,7 @@ bool DeviceProfileFilterOptions::UnMarshalling(MessageParcel& parcel) return true; } -std::string DeviceProfileFilterOptions::dump() const +std::string DeviceProfileFilterOptions::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/dp_subscribe_info.cpp b/common/src/interfaces/dp_subscribe_info.cpp index 78ee3554cc7ab7d3810e34f07277c6d41826e021..b3a231f85b991ac3124c750e0df4c3ffe86326a4 100644 --- a/common/src/interfaces/dp_subscribe_info.cpp +++ b/common/src/interfaces/dp_subscribe_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -163,7 +163,7 @@ bool SubscribeInfo::UnMarshalling(MessageParcel& parcel) return true; } -std::string SubscribeInfo::dump() const +std::string SubscribeInfo::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/dp_sync_options.cpp b/common/src/interfaces/dp_sync_options.cpp index 4d42d9fc9ccddbe153b62fbcdedba2ca01c8aeda..58c2443b200e5c1a8260f507e47b26acb0818cc4 100644 --- a/common/src/interfaces/dp_sync_options.cpp +++ b/common/src/interfaces/dp_sync_options.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -72,7 +72,7 @@ bool DpSyncOptions::UnMarshalling(MessageParcel& parcel) return true; } -std::string DpSyncOptions::dump() const +std::string DpSyncOptions::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/local_service_info.cpp b/common/src/interfaces/local_service_info.cpp index ea1579b9a801d988bf0292c4209e4dd8c55f3bfc..efce67e3dcf83f8889b865fe4648b6ad5aa7ee6a 100644 --- a/common/src/interfaces/local_service_info.cpp +++ b/common/src/interfaces/local_service_info.cpp @@ -127,7 +127,7 @@ bool LocalServiceInfo::UnMarshalling(MessageParcel& parcel) return true; } -std::string LocalServiceInfo::dump() const +std::string LocalServiceInfo::Dump() const { return ""; } diff --git a/common/src/interfaces/product_info.cpp b/common/src/interfaces/product_info.cpp index 324b94e8353a984f596de90288755ffa6a686e92..85f163da7afa63a1dbba7aa8cfd584a5288f941a 100644 --- a/common/src/interfaces/product_info.cpp +++ b/common/src/interfaces/product_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -109,7 +109,7 @@ bool ProductInfo::operator!=(const ProductInfo& other) const } } -std::string ProductInfo::dump() const +std::string ProductInfo::Dump() const { cJSON* json = cJSON_CreateObject(); if (json == NULL) { diff --git a/common/src/interfaces/query_profile.cpp b/common/src/interfaces/query_profile.cpp index 30469e1f58b97da2f191a8aad5fedf30d6de4be1..96205be75118aaf65a58a5a25995a4532eb69f5d 100644 --- a/common/src/interfaces/query_profile.cpp +++ b/common/src/interfaces/query_profile.cpp @@ -142,7 +142,7 @@ bool QueryProfile::UnMarshalling(MessageParcel& parcel) return true; } -std::string QueryProfile::dump() const +std::string QueryProfile::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/service_info_profile.cpp b/common/src/interfaces/service_info_profile.cpp index 9e126f86a19d1eb2db1a96befa55bb04b67bc87b..ed61e12f88d39fe3cb35edfa41b73e88fcb77cac 100644 --- a/common/src/interfaces/service_info_profile.cpp +++ b/common/src/interfaces/service_info_profile.cpp @@ -285,7 +285,7 @@ bool ServiceInfoProfile::UnMarshalling(MessageParcel& parcel) return true; } -std::string ServiceInfoProfile::dump() const +std::string ServiceInfoProfile::Dump() const { return ""; } diff --git a/common/src/interfaces/service_info_unique_key.cpp b/common/src/interfaces/service_info_unique_key.cpp index 9e46fef4218a5f3c97a049b64b781a7cd10bb999..7accdffe412aeac31ca15f72f8bc49a811b0d2b5 100644 --- a/common/src/interfaces/service_info_unique_key.cpp +++ b/common/src/interfaces/service_info_unique_key.cpp @@ -107,7 +107,7 @@ bool ServiceInfoUniqueKey::UnMarshalling(MessageParcel& parcel) return true; } -std::string ServiceInfoUniqueKey::dump() const +std::string ServiceInfoUniqueKey::Dump() const { return ""; } diff --git a/common/src/interfaces/service_profile.cpp b/common/src/interfaces/service_profile.cpp index d4bc2272fac940bd4dc7c8d22790d7e949f0c838..130df2df42c1300e375c1a9238194c94e0a48e17 100644 --- a/common/src/interfaces/service_profile.cpp +++ b/common/src/interfaces/service_profile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -125,7 +125,7 @@ bool ServiceProfile::operator!=(const ServiceProfile& serviceProfile) const } } -std::string ServiceProfile::dump() const +std::string ServiceProfile::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/service_profile_filter_opotions.cpp b/common/src/interfaces/service_profile_filter_opotions.cpp index 3090b4f2ea3df8afde3983641fad5215927aca08..c5b9e8424e829af6a41bd691984d57afa8d769dd 100644 --- a/common/src/interfaces/service_profile_filter_opotions.cpp +++ b/common/src/interfaces/service_profile_filter_opotions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -188,7 +188,7 @@ void ServiceProfileFilterOptions::AddDeviceProfileIds(int32_t deviceProfileId) deviceProfileIds_.emplace_back(deviceProfileId); } -std::string ServiceProfileFilterOptions::dump() const +std::string ServiceProfileFilterOptions::Dump() const { return ""; } diff --git a/common/src/interfaces/trust_device_profile.cpp b/common/src/interfaces/trust_device_profile.cpp index 75521705ff2647bb07bf4125953ff068ed649150..ab21d72d0a510dbfd0d68f9616a9fc8349294c4b 100644 --- a/common/src/interfaces/trust_device_profile.cpp +++ b/common/src/interfaces/trust_device_profile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -118,7 +118,7 @@ bool TrustDeviceProfile::UnMarshalling(MessageParcel& parcel) return true; } -std::string TrustDeviceProfile::dump() const +std::string TrustDeviceProfile::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/src/interfaces/trusted_device_info.cpp b/common/src/interfaces/trusted_device_info.cpp index cb3059f2e9097156fef5502db8edaca5641cd914..e8bd177bc7e2a24e27caee2879d181855592514f 100644 --- a/common/src/interfaces/trusted_device_info.cpp +++ b/common/src/interfaces/trusted_device_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -151,7 +151,7 @@ bool TrustedDeviceInfo::UnMarshalling(MessageParcel& parcel) return true; } -std::string TrustedDeviceInfo::dump() const +std::string TrustedDeviceInfo::Dump() const { cJSON* json = cJSON_CreateObject(); if (!cJSON_IsObject(json)) { diff --git a/common/test/deviceprofileunittest/device_profile_test.cpp b/common/test/deviceprofileunittest/device_profile_test.cpp index f43a9965c7550a561451fe99d76445fe9af0387a..1854699d0061e7337ca67c0c040520a01fd6a96f 100644 --- a/common/test/deviceprofileunittest/device_profile_test.cpp +++ b/common/test/deviceprofileunittest/device_profile_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -63,7 +63,7 @@ HWTEST_F(DeviceProfileTest, UnMarshalling_001, TestSize.Level0) HWTEST_F(DeviceProfileTest, dump_001, TestSize.Level0) { DeviceProfile deviceProfile; - auto result = deviceProfile.dump(); + auto result = deviceProfile.Dump(); EXPECT_NE(0, result.length()); } diff --git a/radar/src/dp_radar_helper.cpp b/radar/src/dp_radar_helper.cpp index cc6e85759a7495aac62719c466fd7eb723f92bfc..dab2fd4ba8b32cc5ab8e0494f879921fa932e939 100644 --- a/radar/src/dp_radar_helper.cpp +++ b/radar/src/dp_radar_helper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -184,7 +184,7 @@ void DpRadarHelper::ReportPutAclProfile(int32_t errCode, const AccessControlProf "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(accessControlProfile.GetAccessee().GetAccesseeDeviceId()), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", accessControlProfile.dump()); + "EXTRA_INFO", accessControlProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -200,7 +200,7 @@ void DpRadarHelper::ReportPutAclProfile(int32_t errCode, const AccessControlProf "PEER_UDID", GetPeerUdid(accessControlProfile.GetAccessee().GetAccesseeDeviceId()), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", accessControlProfile.dump()); + "EXTRA_INFO", accessControlProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -227,7 +227,7 @@ void DpRadarHelper::ReportUpdateAclProfile(int32_t errCode, const AccessControlP "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(accessControlProfile.GetAccessee().GetAccesseeDeviceId()), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", accessControlProfile.dump()); + "EXTRA_INFO", accessControlProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -243,7 +243,7 @@ void DpRadarHelper::ReportUpdateAclProfile(int32_t errCode, const AccessControlP "PEER_UDID", GetPeerUdid(accessControlProfile.GetAccessee().GetAccesseeDeviceId()), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", accessControlProfile.dump()); + "EXTRA_INFO", accessControlProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -271,7 +271,7 @@ void DpRadarHelper::ReportGetTrustProfile(int32_t errCode, const std::string& de "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", trustDeviceProfile.dump()); + "EXTRA_INFO", trustDeviceProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -287,7 +287,7 @@ void DpRadarHelper::ReportGetTrustProfile(int32_t errCode, const std::string& de "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", trustDeviceProfile.dump()); + "EXTRA_INFO", trustDeviceProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -303,7 +303,7 @@ void DpRadarHelper::ReportGetAllTrustProfile(int32_t errCode, std::vector 0 ? (trustDeviceProfiles.size() - 1) : 0; for (size_t i = 0; i < trustDeviceProfiles.size(); i++) { - extraInfo += trustDeviceProfiles[i].dump(); + extraInfo += trustDeviceProfiles[i].Dump(); if (i != size) { extraInfo += ","; } @@ -354,7 +354,7 @@ void DpRadarHelper::ReportGetAclProfile(int32_t errCode, std::vector 0 ? (accessControlProfiles.size() - 1) : 0; for (size_t i = 0; i < accessControlProfiles.size(); i++) { - extraInfo += accessControlProfiles[i].dump(); + extraInfo += accessControlProfiles[i].Dump(); if (i != size) { extraInfo += ","; } @@ -405,7 +405,7 @@ void DpRadarHelper::ReportGetAllAclProfile(int32_t errCode, std::vector 0 ? (accessControlProfiles.size() - 1) : 0; for (size_t i = 0; i < accessControlProfiles.size(); i++) { - extraInfo += accessControlProfiles[i].dump(); + extraInfo += accessControlProfiles[i].Dump(); if (i != size) { extraInfo += ","; } @@ -506,7 +506,7 @@ void DpRadarHelper::ReportPutServiceProfile(int32_t errCode, const ServiceProfil "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(serviceProfile.GetDeviceId()), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", serviceProfile.dump()); + "EXTRA_INFO", serviceProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -522,7 +522,7 @@ void DpRadarHelper::ReportPutServiceProfile(int32_t errCode, const ServiceProfil "PEER_UDID", GetPeerUdid(serviceProfile.GetDeviceId()), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", serviceProfile.dump()); + "EXTRA_INFO", serviceProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -538,7 +538,7 @@ void DpRadarHelper::ReportPutServiceProfileBatch(int32_t errCode, const std::vec std::string extraInfo = ""; size_t size = serviceProfiles.size() > 0 ? (serviceProfiles.size() - 1) : 0; for (size_t i = 0; i < serviceProfiles.size(); i++) { - extraInfo += serviceProfiles[i].dump(); + extraInfo += serviceProfiles[i].Dump(); if (i != size) { extraInfo += ","; } @@ -600,7 +600,7 @@ void DpRadarHelper::ReportPutCharProfile(int32_t errCode, const CharacteristicPr "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(characteristicProfile.GetDeviceId()), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", characteristicProfile.dump()); + "EXTRA_INFO", characteristicProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -616,7 +616,7 @@ void DpRadarHelper::ReportPutCharProfile(int32_t errCode, const CharacteristicPr "PEER_UDID", GetPeerUdid(characteristicProfile.GetDeviceId()), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", characteristicProfile.dump()); + "EXTRA_INFO", characteristicProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -633,7 +633,7 @@ void DpRadarHelper::ReportPutCharProfileBatch(int32_t errCode, std::string extraInfo = ""; size_t size = characteristicProfiles.size() > 0 ? (characteristicProfiles.size() - 1) : 0; for (size_t i = 0; i < characteristicProfiles.size(); i++) { - extraInfo += characteristicProfiles[i].dump(); + extraInfo += characteristicProfiles[i].Dump(); if (i != size) { extraInfo += ","; } @@ -695,7 +695,7 @@ void DpRadarHelper::ReportGetDeviceProfile(int32_t errCode, const std::string& d "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", deviceProfile.dump()); + "EXTRA_INFO", deviceProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -711,7 +711,7 @@ void DpRadarHelper::ReportGetDeviceProfile(int32_t errCode, const std::string& d "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", deviceProfile.dump()); + "EXTRA_INFO", deviceProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -739,7 +739,7 @@ void DpRadarHelper::ReportGetServiceProfile(int32_t errCode, "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", serviceProfile.dump()); + "EXTRA_INFO", serviceProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -755,7 +755,7 @@ void DpRadarHelper::ReportGetServiceProfile(int32_t errCode, "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", serviceProfile.dump()); + "EXTRA_INFO", serviceProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -783,7 +783,7 @@ void DpRadarHelper::ReportGetCharProfile(int32_t errCode, "LOCAL_UDID", GetLocalUdid(), "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", characteristicProfile.dump()); + "EXTRA_INFO", characteristicProfile.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -799,7 +799,7 @@ void DpRadarHelper::ReportGetCharProfile(int32_t errCode, "PEER_UDID", GetPeerUdid(deviceId), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", characteristicProfile.dump()); + "EXTRA_INFO", characteristicProfile.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -907,7 +907,7 @@ void DpRadarHelper::ReportSubscribeDeviceProfile(int32_t errCode, const Subscrib "BIZ_STATE", static_cast(BizState::BIZ_STATE_END), "LOCAL_UDID", GetLocalUdid(), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", subscribeInfo.dump()); + "EXTRA_INFO", subscribeInfo.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -922,7 +922,7 @@ void DpRadarHelper::ReportSubscribeDeviceProfile(int32_t errCode, const Subscrib "LOCAL_UDID", GetLocalUdid(), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", subscribeInfo.dump()); + "EXTRA_INFO", subscribeInfo.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); @@ -948,7 +948,7 @@ void DpRadarHelper::ReportUnSubscribeDeviceProfile(int32_t errCode, const Subscr "BIZ_STATE", static_cast(BizState::BIZ_STATE_END), "LOCAL_UDID", GetLocalUdid(), "TO_CALL_PKG", RDB_NAME, - "EXTRA_INFO", subscribeInfo.dump()); + "EXTRA_INFO", subscribeInfo.Dump()); } else { res = HiSysEventWrite( OHOS::HiviewDFX::HiSysEvent::Domain::DEVICE_PROFILE, @@ -963,7 +963,7 @@ void DpRadarHelper::ReportUnSubscribeDeviceProfile(int32_t errCode, const Subscr "LOCAL_UDID", GetLocalUdid(), "TO_CALL_PKG", RDB_NAME, "ERROR_CODE", errCode, - "EXTRA_INFO", subscribeInfo.dump()); + "EXTRA_INFO", subscribeInfo.Dump()); } if (res != DP_SUCCESS) { HILOGD("failed"); diff --git a/services/core/src/deviceprofilemanager/device_profile_manager.cpp b/services/core/src/deviceprofilemanager/device_profile_manager.cpp index 582906650093ba0ec4a9c57d2be8b9525d1037cd..5044c41fd8aae1bb002886699ae0014e02a0ba5d 100644 --- a/services/core/src/deviceprofilemanager/device_profile_manager.cpp +++ b/services/core/src/deviceprofilemanager/device_profile_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -144,7 +144,7 @@ int32_t DeviceProfileManager::PutDeviceProfile(const DeviceProfile& deviceProfil int32_t DeviceProfileManager::PutServiceProfile(const ServiceProfile& serviceProfile) { - HILOGI("serviceProfile: %{public}s", serviceProfile.dump().c_str()); + HILOGI("serviceProfile: %{public}s", serviceProfile.Dump().c_str()); if (!ProfileUtils::IsSvrProfileValid(serviceProfile)) { HILOGE("the profile is invalid!"); return DP_INVALID_PARAMS; @@ -171,7 +171,7 @@ int32_t DeviceProfileManager::PutServiceProfile(const ServiceProfile& servicePro return DP_KV_DB_PTR_NULL; } if (deviceProfileStore_->PutBatch(entries) != DP_SUCCESS) { - HILOGE("PutServiceProfile fail! serviceProfile: %{public}s", serviceProfile.dump().c_str()); + HILOGE("PutServiceProfile fail! serviceProfile: %{public}s", serviceProfile.Dump().c_str()); return DP_PUT_KV_DB_FAIL; } } @@ -185,7 +185,7 @@ int32_t DeviceProfileManager::PutServiceProfileBatch(const std::vector entries; for (const auto& serviceProfile : serviceProfiles) { if (!ProfileUtils::IsSvrProfileValid(serviceProfile)) { - HILOGE("the profile is invalid! serviceProfile:%{public}s", serviceProfile.dump().c_str()); + HILOGE("the profile is invalid! serviceProfile:%{public}s", serviceProfile.Dump().c_str()); continue; } if (serviceProfile.IsMultiUser()) { @@ -220,7 +220,7 @@ int32_t DeviceProfileManager::PutServiceProfileBatch(const std::vectorPutBatch(entries) != DP_SUCCESS) { - HILOGE("PutCharacteristicProfile fail! charProfile: %{public}s", charProfile.dump().c_str()); + HILOGE("PutCharacteristicProfile fail! charProfile: %{public}s", charProfile.Dump().c_str()); return DP_PUT_KV_DB_FAIL; } } @@ -261,7 +261,7 @@ int32_t DeviceProfileManager::PutCharacteristicProfileBatch(const std::vector entries; for (const auto& charProfile : charProfiles) { if (!ProfileUtils::IsCharProfileValid(charProfile)) { - HILOGE("the profile is invalid! charProfile:%{public}s", charProfile.dump().c_str()); + HILOGE("the profile is invalid! charProfile:%{public}s", charProfile.Dump().c_str()); continue; } if (charProfile.IsMultiUser()) { @@ -751,7 +751,7 @@ void DeviceProfileManager::OnDeviceOnline(const TrustedDeviceInfo& deviceInfo) FixDataOnDeviceOnline(deviceInfo); NotifyNotOHBaseOnline(deviceInfo); if (ContentSensorManagerUtils::GetInstance().IsDeviceE2ESync()) { - HILOGI("need E2ESync, deviceInfo:%{public}s", deviceInfo.dump().c_str()); + HILOGI("need E2ESync, deviceInfo:%{public}s", deviceInfo.Dump().c_str()); E2ESyncDynamicProfile(deviceInfo); StaticProfileManager::GetInstance().E2ESyncStaticProfile(deviceInfo); } @@ -759,7 +759,7 @@ void DeviceProfileManager::OnDeviceOnline(const TrustedDeviceInfo& deviceInfo) void DeviceProfileManager::FixDataOnDeviceOnline(const TrustedDeviceInfo& deviceInfo) { - HILOGI("deviceInfo=%{public}s", deviceInfo.dump().c_str()); + HILOGI("deviceInfo=%{public}s", deviceInfo.Dump().c_str()); if (deviceInfo.GetNetworkId().empty()) { HILOGE("networkId is empty!"); return; @@ -863,7 +863,7 @@ int32_t DeviceProfileManager::GetProfilesByKeyPrefix(const std::string& udid, void DeviceProfileManager::NotifyNotOHBaseOnline(const TrustedDeviceInfo& deviceInfo) { - HILOGI("deviceInfo:%{public}s", deviceInfo.dump().c_str()); + HILOGI("deviceInfo:%{public}s", deviceInfo.Dump().c_str()); if (deviceInfo.GetNetworkId().empty()) { HILOGE("networkId is empty!"); return; @@ -906,7 +906,7 @@ void DeviceProfileManager::NotifyNotOHBaseOnline(const TrustedDeviceInfo& device void DeviceProfileManager::E2ESyncDynamicProfile(const TrustedDeviceInfo& deviceInfo) { - HILOGI("deviceInfo:%{public}s", deviceInfo.dump().c_str()); + HILOGI("deviceInfo:%{public}s", deviceInfo.Dump().c_str()); auto task = [this, deviceInfo]() { HILOGD("networkId:%{public}s", ProfileUtils::GetAnonyString(deviceInfo.GetNetworkId()).c_str()); if (deviceInfo.GetNetworkId().empty()) { diff --git a/services/core/src/deviceprofilemanager/listener/kv_data_change_listener.cpp b/services/core/src/deviceprofilemanager/listener/kv_data_change_listener.cpp index 3b417a2876eaaf92024c2b6e19a478e1aad5410f..5c487ee2107d86dae35b6ff1bdc5c093fe70040e 100644 --- a/services/core/src/deviceprofilemanager/listener/kv_data_change_listener.cpp +++ b/services/core/src/deviceprofilemanager/listener/kv_data_change_listener.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -241,7 +241,7 @@ int32_t KvDataChangeListener::GenerateSwitchNotify(const std::string& udid, cons CharacteristicProfile newSwitchProfile = {udid, serviceName, characteristicProfileKey, characteristicProfileValue}; - HILOGI("Gen SwitchProfile :%{public}s", newSwitchProfile.dump().c_str()); + HILOGI("Gen SwitchProfile :%{public}s", newSwitchProfile.Dump().c_str()); if (ProfileCache::GetInstance().IsCharProfileExist(newSwitchProfile)) { HILOGW("switch is not change"); return DP_SUCCESS; diff --git a/services/core/src/deviceprofilemanager/listener/kv_store_death_recipient.cpp b/services/core/src/deviceprofilemanager/listener/kv_store_death_recipient.cpp index cfda0158e5d814790e71a8d2339e9e281054caa7..55bad641e9f20d72566cf3e2c3c9cab64ea61ea2 100644 --- a/services/core/src/deviceprofilemanager/listener/kv_store_death_recipient.cpp +++ b/services/core/src/deviceprofilemanager/listener/kv_store_death_recipient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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/services/core/src/deviceprofilemanager/static_profile_manager.cpp b/services/core/src/deviceprofilemanager/static_profile_manager.cpp index 489cb57ced354337ae36623198e937892613e824..819997ded808c2c2be8ed0d88378044be1869c01 100644 --- a/services/core/src/deviceprofilemanager/static_profile_manager.cpp +++ b/services/core/src/deviceprofilemanager/static_profile_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -106,7 +106,7 @@ int32_t StaticProfileManager::GetCharacteristicProfile(const std::string& device ProfileUtils::GetAnonyString(deviceId).c_str(), serviceName.c_str(), characteristicKey.c_str()); if (ProfileCache::GetInstance().GetStaticCharacteristicProfile(deviceId, serviceName, characteristicKey, charProfile) == DP_SUCCESS) { - HILOGI("profile: %{public}s!", charProfile.dump().c_str()); + HILOGI("profile: %{public}s!", charProfile.Dump().c_str()); return DP_SUCCESS; } CharacteristicProfile staticCapabilityProfile; @@ -120,7 +120,7 @@ int32_t StaticProfileManager::GetCharacteristicProfile(const std::string& device HILOGE("GetCharacteristicProfile fail, reason: %{public}d!", getResult); return getResult; } - HILOGI("profile : %{public}s", staticCapabilityProfile.dump().c_str()); + HILOGI("profile : %{public}s", staticCapabilityProfile.Dump().c_str()); std::unordered_map staticInfoProfiles; int generateProfileResult = GenerateStaticInfoProfile(staticCapabilityProfile, staticInfoProfiles); if (generateProfileResult != DP_SUCCESS) { @@ -188,7 +188,7 @@ int32_t StaticProfileManager::GenerateStaticInfoProfile(const CharacteristicProf void StaticProfileManager::E2ESyncStaticProfile(const TrustedDeviceInfo& deviceInfo) { - HILOGI("deviceInfo:%{public}s", deviceInfo.dump().c_str()); + HILOGI("deviceInfo:%{public}s", deviceInfo.Dump().c_str()); auto task = [this, deviceInfo]() { HILOGD("networkId:%{public}s", ProfileUtils::GetAnonyString(deviceInfo.GetNetworkId()).c_str()); if (deviceInfo.GetNetworkId().empty()) { diff --git a/services/core/src/deviceprofilemanager/switch_profile_manager.cpp b/services/core/src/deviceprofilemanager/switch_profile_manager.cpp index 338453e03c138cb2b4e4781a57235d67fcd315ce..b7cf010f8984a73cdaad4309cb1e28a329fe177e 100644 --- a/services/core/src/deviceprofilemanager/switch_profile_manager.cpp +++ b/services/core/src/deviceprofilemanager/switch_profile_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -63,7 +63,7 @@ int32_t SwitchProfileManager::ReInit() int32_t SwitchProfileManager::PutCharacteristicProfile(const CharacteristicProfile& charProfile) { - HILOGI("Profile : %{public}s!", charProfile.dump().c_str()); + HILOGI("Profile : %{public}s!", charProfile.Dump().c_str()); int32_t res = DP_SUCCESS; { std::lock_guard lock(switchProfileMutex_); diff --git a/services/core/src/distributed_device_profile_service_new.cpp b/services/core/src/distributed_device_profile_service_new.cpp index aa0a8c7c8ec8ad854b0d8637be1310b020f6a76a..8de791ef1621b05e89c3b6b177af7deb89784c02 100644 --- a/services/core/src/distributed_device_profile_service_new.cpp +++ b/services/core/src/distributed_device_profile_service_new.cpp @@ -761,7 +761,7 @@ int32_t DistributedDeviceProfileServiceNew::PutLocalServiceInfo(const LocalServi HILOGD("CheckCallerPermission success interface PutLocalServiceInfo"); int32_t ret = LocalServiceInfoManager::GetInstance().PutLocalServiceInfo(localServiceInfo); if (ret == DP_SUCCESS && localServiceInfo.GetPinCode() == INVALID_PINCODE) { - HILOGI("NotifyPinCodeInvalid, serviceInfoProfile:%{public}s", localServiceInfo.dump().c_str()); + HILOGI("NotifyPinCodeInvalid, serviceInfoProfile:%{public}s", localServiceInfo.Dump().c_str()); NotifyPinCodeInvalid(localServiceInfo); } return ret; @@ -776,7 +776,7 @@ int32_t DistributedDeviceProfileServiceNew::UpdateLocalServiceInfo(const LocalSe HILOGD("CheckCallerPermission success interface UpdateLocalServiceInfo"); int32_t ret = LocalServiceInfoManager::GetInstance().UpdateLocalServiceInfo(localServiceInfo); if (ret == DP_SUCCESS && localServiceInfo.GetPinCode() == INVALID_PINCODE) { - HILOGI("NotifyPinCodeInvalid, serviceInfoProfile:%{public}s", localServiceInfo.dump().c_str()); + HILOGI("NotifyPinCodeInvalid, serviceInfoProfile:%{public}s", localServiceInfo.Dump().c_str()); NotifyPinCodeInvalid(localServiceInfo); } return ret; @@ -1027,11 +1027,11 @@ int32_t DistributedDeviceProfileServiceNew::AddSvrProfilesToCache(const std::vec std::map entries; for (const auto& item : serviceProfiles) { if (!ProfileUtils::IsSvrProfileValid(item)) { - HILOGE("the is invalid, serviceProfile:%{public}s", item.dump().c_str()); + HILOGE("the is invalid, serviceProfile:%{public}s", item.Dump().c_str()); return DP_INVALID_PARAM; } if (ProfileCache::GetInstance().IsServiceProfileExist(item)) { - HILOGW("the profile is exist!, serviceProfile:%{public}s", item.dump().c_str()); + HILOGW("the profile is exist!, serviceProfile:%{public}s", item.Dump().c_str()); return DP_CACHE_EXIST; } ProfileUtils::ServiceProfileToEntries(item, entries); @@ -1055,11 +1055,11 @@ int32_t DistributedDeviceProfileServiceNew::AddCharProfilesToCache( std::map entries; for (const auto& item : charProfiles) { if (!ProfileUtils::IsCharProfileValid(item)) { - HILOGE("the is invalid, charProfile:%{public}s", item.dump().c_str()); + HILOGE("the is invalid, charProfile:%{public}s", item.Dump().c_str()); return DP_INVALID_PARAM; } if (ProfileCache::GetInstance().IsCharProfileExist(item)) { - HILOGW("the profile is exist!, charProfile:%{public}s", item.dump().c_str()); + HILOGW("the profile is exist!, charProfile:%{public}s", item.Dump().c_str()); return DP_CACHE_EXIST; } if (item.GetCharacteristicKey() == SWITCH_STATUS) { @@ -1374,7 +1374,7 @@ int32_t DistributedDeviceProfileServiceNew::PutBusinessEvent(const BusinessEvent event.GetBusinessKey().c_str(), ret); return DP_NOTIFY_BUSINESS_EVENT_FAIL; } - HILOGI("NotifyBusinessEvent, BusinessEvent:%{public}s", event.dump().c_str()); + HILOGI("NotifyBusinessEvent, BusinessEvent:%{public}s", event.Dump().c_str()); return DP_SUCCESS; } diff --git a/services/core/src/dm_adapter/dm_adapter.cpp b/services/core/src/dm_adapter/dm_adapter.cpp index 09621e7b20c25e499ec01501357e4fed3eb8d54c..0917016288ced4a9733351f25c4eef924c16612b 100644 --- a/services/core/src/dm_adapter/dm_adapter.cpp +++ b/services/core/src/dm_adapter/dm_adapter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -104,7 +104,7 @@ void DMAdapter::DmDeviceStateCallback::OnDeviceOnline(const DistributedHardware: ProfileUtils::GetAnonyString(deviceInfo.networkId).c_str()); return; } - HILOGI("trustedDeviceInfo:%{public}s", trustedDeviceInfo.dump().c_str()); + HILOGI("trustedDeviceInfo:%{public}s", trustedDeviceInfo.Dump().c_str()); ProfileCache::GetInstance().OnNodeOnline(trustedDeviceInfo); DeviceProfileManager::GetInstance().OnDeviceOnline(trustedDeviceInfo); } diff --git a/services/core/src/persistenceadapter/kvadapter/business_event_adapter.cpp b/services/core/src/persistenceadapter/kvadapter/business_event_adapter.cpp index 1c4b73ac653b7cfa83d3cf93fad1ac654cf1a62e..c043ac35f3933de903e93d90542f6d55b89c625a 100644 --- a/services/core/src/persistenceadapter/kvadapter/business_event_adapter.cpp +++ b/services/core/src/persistenceadapter/kvadapter/business_event_adapter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 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/services/core/src/profiledatamanager/device_icon_info_dao.cpp b/services/core/src/profiledatamanager/device_icon_info_dao.cpp index 96377a56593b06a4d901ae37e2139c393a4bc0c1..6342a01c0bda9ea40dcd7bdf7b12817157f1c602 100644 --- a/services/core/src/profiledatamanager/device_icon_info_dao.cpp +++ b/services/core/src/profiledatamanager/device_icon_info_dao.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -63,7 +63,7 @@ int32_t DeviceIconInfoDao::UnInit() int32_t DeviceIconInfoDao::PutDeviceIconInfo(const DeviceIconInfo& deviceIconInfo) { - HILOGI("deviceIconInfo:%{public}s", deviceIconInfo.dump().c_str()); + HILOGI("deviceIconInfo:%{public}s", deviceIconInfo.Dump().c_str()); ValuesBucket values; DeviceIconInfoToEntries(deviceIconInfo, values); int64_t rowId = ROWID_INIT; @@ -86,7 +86,7 @@ int32_t DeviceIconInfoDao::GetDeviceIconInfos(const DeviceIconInfoFilterOptions& std::string sql; std::vector condition; if (!CreateQuerySqlAndCondition(filterOptions, sql, condition)) { - HILOGE("invalid params:%{public}s", filterOptions.dump().c_str()); + HILOGE("invalid params:%{public}s", filterOptions.Dump().c_str()); return DP_INVALID_PARAMS; } std::shared_ptr resultSet = ProfileDataRdbAdapter::GetInstance().Get(sql, condition); @@ -132,7 +132,7 @@ int32_t DeviceIconInfoDao::DeleteDeviceIconInfo(const DeviceIconInfo& deviceIcon int32_t DeviceIconInfoDao::UpdateDeviceIconInfo(const DeviceIconInfo& deviceIconInfo) { - HILOGI("deviceIconInfo:%{public}s", deviceIconInfo.dump().c_str()); + HILOGI("deviceIconInfo:%{public}s", deviceIconInfo.Dump().c_str()); ValuesBucket values; DeviceIconInfoToEntries(deviceIconInfo, values); int32_t changeRowCnt = CHANGEROWCNT_INIT; diff --git a/services/core/src/profiledatamanager/profile_data_manager.cpp b/services/core/src/profiledatamanager/profile_data_manager.cpp index a52ccab6ab986885282e5713bb8f229fa30b94d1..8dd471a8aa2e69e7f6de4d29bc0866a6f6f08f68 100644 --- a/services/core/src/profiledatamanager/profile_data_manager.cpp +++ b/services/core/src/profiledatamanager/profile_data_manager.cpp @@ -129,7 +129,7 @@ int32_t ProfileDataManager::DeleteDeviceProfileBatch(std::vector& for (auto dp : oldDeviceProfiles) { int32_t delRet = DeviceProfileDao::GetInstance().DeleteDeviceProfile(dp); if (delRet != DP_SUCCESS) { - HILOGE("DeleteDeviceProfile failed, delRet=%{public}d, dp:%{public}s", delRet, dp.dump().c_str()); + HILOGE("DeleteDeviceProfile failed, delRet=%{public}d, dp:%{public}s", delRet, dp.Dump().c_str()); ret = delRet; } } diff --git a/services/core/src/serviceinfoprofile_manager/service_info_profile_manager.cpp b/services/core/src/serviceinfoprofile_manager/service_info_profile_manager.cpp index 932f8a72dfd5f9daa5f62aa87344bb220a9c2636..27a98bd253dc6bddc953ff86e7ec7a5d4134fea2 100644 --- a/services/core/src/serviceinfoprofile_manager/service_info_profile_manager.cpp +++ b/services/core/src/serviceinfoprofile_manager/service_info_profile_manager.cpp @@ -74,7 +74,7 @@ int32_t ServiceInfoProfileManager::CreateIndex() int32_t ServiceInfoProfileManager::PutServiceInfoProfile(const ServiceInfoProfile& serviceInfoProfile) { - HILOGI("serviceInfoProfile: %{public}s", serviceInfoProfile.dump().c_str()); + HILOGI("serviceInfoProfile: %{public}s", serviceInfoProfile.Dump().c_str()); if (serviceInfoProfile.GetDeviceId().empty() || serviceInfoProfile.GetUserId() == DEFAULT_USER_ID || serviceInfoProfile.GetTokenId().empty() || serviceInfoProfile.GetServiceId() == DEFAULT_USER_ID) { HILOGE("Invalid parameter"); @@ -106,7 +106,7 @@ int32_t ServiceInfoProfileManager::PutServiceInfoProfile(const ServiceInfoProfil int32_t ServiceInfoProfileManager::DeleteServiceInfoProfile(const ServiceInfoUniqueKey& key) { - HILOGI("serviceInfoUniqueKey: %{public}s", key.dump().c_str()); + HILOGI("serviceInfoUniqueKey: %{public}s", key.Dump().c_str()); if (key.GetDeviceId().empty() || key.GetUserId() == DEFAULT_USER_ID || key.GetTokenId().empty() || key.GetServiceId() == DEFAULT_SERVICE_ID) { HILOGE("Invalid parameter"); @@ -137,7 +137,7 @@ int32_t ServiceInfoProfileManager::DeleteServiceInfoProfile(const ServiceInfoUni int32_t ServiceInfoProfileManager::UpdateServiceInfoProfile(const ServiceInfoProfile& serviceInfoProfile) { - HILOGI("serviceInfoProfile: %{public}s", serviceInfoProfile.dump().c_str()); + HILOGI("serviceInfoProfile: %{public}s", serviceInfoProfile.Dump().c_str()); if (serviceInfoProfile.GetDeviceId().empty() || serviceInfoProfile.GetUserId() == DEFAULT_USER_ID || serviceInfoProfile.GetTokenId().empty() || serviceInfoProfile.GetServiceId() == DEFAULT_SERVICE_ID) { HILOGE("Invalid parameter"); @@ -178,7 +178,7 @@ int32_t ServiceInfoProfileManager::UpdateServiceInfoProfile(const ServiceInfoPro int32_t ServiceInfoProfileManager::GetServiceInfoProfileByUniqueKey(const ServiceInfoUniqueKey& key, ServiceInfoProfile& serviceInfoProfile) { - HILOGI("serviceInfoUniqueKey: %{public}s", key.dump().c_str()); + HILOGI("serviceInfoUniqueKey: %{public}s", key.Dump().c_str()); if (key.GetDeviceId().empty() || key.GetUserId() == DEFAULT_USER_ID || key.GetTokenId().empty() || key.GetServiceId() == DEFAULT_SERVICE_ID) { HILOGE("Invalid parameter"); @@ -217,7 +217,7 @@ int32_t ServiceInfoProfileManager::GetServiceInfoProfileByUniqueKey(const Servic int32_t ServiceInfoProfileManager::GetServiceInfoProfileListByTokenId(const ServiceInfoUniqueKey& key, std::vector& serviceInfoProfiles) { - HILOGI("serviceInfoUniqueKey: %{public}s", key.dump().c_str()); + HILOGI("serviceInfoUniqueKey: %{public}s", key.Dump().c_str()); if (key.GetDeviceId().empty() || key.GetUserId() == DEFAULT_USER_ID || key.GetTokenId().empty()) { HILOGE("Invalid parameter"); return DP_INVALID_PARAM; @@ -285,7 +285,7 @@ int32_t ServiceInfoProfileManager::GetAllServiceInfoProfileList(std::vector& serviceInfoProfiles) { - HILOGI("serviceInfoUniqueKey: %{public}s", key.dump().c_str()); + HILOGI("serviceInfoUniqueKey: %{public}s", key.Dump().c_str()); if (key.GetDeviceId().empty() || key.GetUserId() == DEFAULT_USER_ID || key.GetBundleName().empty()) { HILOGE("Invalid parameter"); return DP_INVALID_PARAM; diff --git a/services/core/src/staticcapabilitycollector/static_capability_collector.cpp b/services/core/src/staticcapabilitycollector/static_capability_collector.cpp index 150a8fa8cac6c14b68b152ae8e8a9163997a7ed8..e1addc492489a5b6a5688c0fc7a56805c26796f4 100644 --- a/services/core/src/staticcapabilitycollector/static_capability_collector.cpp +++ b/services/core/src/staticcapabilitycollector/static_capability_collector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -68,7 +68,7 @@ int32_t StaticCapabilityCollector::AddStaticInfoToCache( HILOGI("call!"); for (const auto& item : staticProfileMap) { HILOGI("AddStaticInfoToCache key: %{public}s, value: %{public}s!", - ProfileUtils::GetDbKeyAnonyString(item.first).c_str(), item.second.dump().c_str()); + ProfileUtils::GetDbKeyAnonyString(item.first).c_str(), item.second.Dump().c_str()); ProfileCache::GetInstance().AddStaticCharProfile(item.second); } return DP_SUCCESS; diff --git a/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp b/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp index 06cebceb1520c2029b1969af382304e3e10060a8..320bc75b527cf95b4caec245dc67dca1e4cb5a48 100644 --- a/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp +++ b/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -104,7 +104,7 @@ int32_t SubscribeProfileManager::NotifyTrustDeviceProfileAdd(const TrustDevicePr if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", trustDeviceProfile.dump().c_str()); + HILOGI("%{public}s!", trustDeviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -125,7 +125,7 @@ int32_t SubscribeProfileManager::NotifyTrustDeviceProfileUpdate(const TrustDevic if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", newDeviceProfile.dump().c_str()); + HILOGI("%{public}s!", newDeviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -145,7 +145,7 @@ int32_t SubscribeProfileManager::NotifyTrustDeviceProfileDelete(const TrustDevic if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", trustDeviceProfile.dump().c_str()); + HILOGI("%{public}s!", trustDeviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -165,7 +165,7 @@ int32_t SubscribeProfileManager::NotifyTrustDeviceProfileActive(const TrustDevic if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", trustDeviceProfile.dump().c_str()); + HILOGI("%{public}s!", trustDeviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -185,7 +185,7 @@ int32_t SubscribeProfileManager::NotifyTrustDeviceProfileInactive(const TrustDev if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", trustDeviceProfile.dump().c_str()); + HILOGI("%{public}s!", trustDeviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -346,7 +346,7 @@ int32_t SubscribeProfileManager::NotifyServiceProfileAdd(const std::string& dbKe if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", serviceProfile.dump().c_str()); + HILOGI("%{public}s!", serviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -374,7 +374,7 @@ int32_t SubscribeProfileManager::NotifyServiceProfileUpdate(const std::string& d if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", newServiceProfile.dump().c_str()); + HILOGI("%{public}s!", newServiceProfile.Dump().c_str()); ServiceProfile oldServiceProfile; ProfileCache::GetInstance().GetServiceProfile(ProfileUtils::GetDeviceIdByDBKey(dbKey), ProfileUtils::GetNonOhSuffixServiceNameByDBKey(dbKey), oldServiceProfile); @@ -405,7 +405,7 @@ int32_t SubscribeProfileManager::NotifyServiceProfileDelete(const std::string& d if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", serviceProfile.dump().c_str()); + HILOGI("%{public}s!", serviceProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -436,7 +436,7 @@ int32_t SubscribeProfileManager::NotifyCharProfileAdd(const std::string& dbKey, if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", charProfile.dump().c_str()); + HILOGI("%{public}s!", charProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { @@ -467,7 +467,7 @@ int32_t SubscribeProfileManager::NotifyCharProfileUpdate(const std::string& dbKe if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", newCharProfile.dump().c_str()); + HILOGI("%{public}s!", newCharProfile.Dump().c_str()); CharacteristicProfile oldCharProfile; ProfileCache::GetInstance().GetCharacteristicProfile(ProfileUtils::GetDeviceIdByDBKey(dbKey), ProfileUtils::GetNonOhSuffixServiceNameByDBKey(dbKey), ProfileUtils::GetCharKeyByDBKey(dbKey), oldCharProfile); @@ -501,7 +501,7 @@ int32_t SubscribeProfileManager::NotifyCharProfileDelete(const std::string& dbKe if (subscriberInfos.empty()) { return DP_SUCCESS; } - HILOGI("%{public}s!", charProfile.dump().c_str()); + HILOGI("%{public}s!", charProfile.Dump().c_str()); for (const auto& subscriberInfo : subscriberInfos) { sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); if (listenerProxy == nullptr) { diff --git a/services/core/src/trustprofilemanager/trust_profile_manager.cpp b/services/core/src/trustprofilemanager/trust_profile_manager.cpp index 16f3a208c6b78c297017826e3b2c13abd40260f5..6909bcac1c26b160a3d784e87cac1b7e85699808 100644 --- a/services/core/src/trustprofilemanager/trust_profile_manager.cpp +++ b/services/core/src/trustprofilemanager/trust_profile_manager.cpp @@ -136,7 +136,7 @@ int32_t TrustProfileManager::PutAccessControlProfile(const AccessControlProfile& HILOGE("access_control_table insert failed"); return DP_PUT_ACL_PROFILE_FAIL; } - HILOGI("PutAclProfile : %{public}s", accessControlProfile.dump().c_str()); + HILOGI("PutAclProfile : %{public}s", accessControlProfile.Dump().c_str()); } int32_t putRet = this->PutAclCheck(accessControlProfile, isExists); if (putRet != DP_SUCCESS) { @@ -222,7 +222,7 @@ int32_t TrustProfileManager::UpdateAccessControlProfile(const AccessControlProfi } } this->NotifyCheck(profile, oldProfile); - HILOGI("UpdateAclProfile : %{public}s", profile.dump().c_str()); + HILOGI("UpdateAclProfile : %{public}s", profile.Dump().c_str()); int32_t status = STATUS_INIT; this->GetResultStatus(profile.GetTrustDeviceId(), status); TrustDeviceProfile trustProfile; @@ -508,7 +508,7 @@ int32_t TrustProfileManager::GetAccessControlProfile(const QueryType& queryType, } RemoveLnnAcl(profile); if (profile.empty()) { - HILOGE("by userId and tokenId not find data, queryProfile : %{public}s", queryProfile.dump().c_str()); + HILOGE("by userId and tokenId not find data, queryProfile : %{public}s", queryProfile.Dump().c_str()); return DP_NOT_FIND_DATA; } HILOGI("profile size : %{public}zu", profile.size()); @@ -1210,7 +1210,7 @@ int32_t TrustProfileManager::PutAccesserProfile(const AccessControlProfile& prof return DP_PUT_ACCESSER_PROFILE_FAIL; } } - HILOGI("PutAccesser : %{public}s", profile.GetAccesser().dump().c_str()); + HILOGI("PutAccesser : %{public}s", profile.GetAccesser().Dump().c_str()); return DP_SUCCESS; } @@ -1253,7 +1253,7 @@ int32_t TrustProfileManager::PutAccesseeProfile(const AccessControlProfile& prof return DP_PUT_ACCESSEE_PROFILE_FAIL; } } - HILOGI("PutAccessee : %{public}s", profile.GetAccessee().dump().c_str()); + HILOGI("PutAccessee : %{public}s", profile.GetAccessee().Dump().c_str()); return DP_SUCCESS; } @@ -1399,7 +1399,7 @@ int32_t TrustProfileManager::UpdateAccesserProfile(const AccessControlProfile& p return DP_UPDATE_ACCESSER_PROFILE_FAIL; } } - HILOGI("UpdateAccesser : %{public}s", profile.GetAccesser().dump().c_str()); + HILOGI("UpdateAccesser : %{public}s", profile.GetAccesser().Dump().c_str()); return DP_SUCCESS; } @@ -1421,7 +1421,7 @@ int32_t TrustProfileManager::UpdateAccesseeProfile(const AccessControlProfile& p return DP_UPDATE_ACCESSEE_PROFILE_FAIL; } } - HILOGI("UpdateAccessee : %{public}s", profile.GetAccessee().dump().c_str()); + HILOGI("UpdateAccessee : %{public}s", profile.GetAccessee().Dump().c_str()); return DP_SUCCESS; } @@ -1580,7 +1580,7 @@ int32_t TrustProfileManager::DeleteAccessControlProfileCheck(AccessControlProfil return DP_DELETE_ACCESS_CONTROL_PROFILE_FAIL; } } - HILOGI("DeleteAclProfile : %{public}s", profile.dump().c_str()); + HILOGI("DeleteAclProfile : %{public}s", profile.Dump().c_str()); AccessControlProfile resultProfile(profile); resultProfile.SetAccesser(accesser); resultProfile.SetAccessee(accessee); @@ -1861,7 +1861,7 @@ int32_t TrustProfileManager::DeleteAccesserCheck(int64_t accesserId, Accesser& a HILOGE("delete accesser_table accesserId failed"); return DP_DELETE_ACCESSER_PROFILE_FAIL; } - HILOGI("DeleteAccesser : %{public}s", accesser.dump().c_str()); + HILOGI("DeleteAccesser : %{public}s", accesser.Dump().c_str()); } return DP_SUCCESS; } @@ -2096,7 +2096,7 @@ int32_t TrustProfileManager::DeleteAccesseeCheck(int64_t accesseeId, Accessee& a HILOGE("delete accessee_table accesseeId failed"); return DP_DELETE_ACCESSEE_PROFILE_FAIL; } - HILOGI("DeleteAccessee : %{public}s", accessee.dump().c_str()); + HILOGI("DeleteAccessee : %{public}s", accessee.Dump().c_str()); } return DP_SUCCESS; } diff --git a/services/core/src/utils/profile_cache.cpp b/services/core/src/utils/profile_cache.cpp index fddc0c65ed24c775a0b8da4c12b0993a3aacc14e..c5aca5f73d24a314115a60122a0dfd96c29f19ba 100644 --- a/services/core/src/utils/profile_cache.cpp +++ b/services/core/src/utils/profile_cache.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -168,7 +168,7 @@ int32_t ProfileCache::AddStaticCharProfileBatch( return DP_INVALID_PARAMS; } for (const auto& item : charProfiles) { - HILOGD("%{public}s!", item.second.dump().c_str()); + HILOGD("%{public}s!", item.second.Dump().c_str()); ProfileCache::AddStaticCharProfile(item.second); } return DP_SUCCESS; @@ -406,7 +406,7 @@ int32_t ProfileCache::RefreshStaticProfileCache(const std::unordered_map lock(charProfileMutex_); charProfileMap_.clear(); for (const auto& staticProfileItem : staticProfiles) { - HILOGD("profile: %{public}s!", staticProfileItem.second.dump().c_str()); + HILOGD("profile: %{public}s!", staticProfileItem.second.Dump().c_str()); charProfileMap_[staticProfileItem.first] = staticProfileItem.second; } } @@ -643,11 +643,11 @@ void ProfileCache::SetCurSwitch(uint32_t newSwitch) void ProfileCache::OnNodeOnline(const TrustedDeviceInfo& trustedDevice) { - HILOGD("trustedDevice=%{public}s", trustedDevice.dump().c_str()); + HILOGD("trustedDevice=%{public}s", trustedDevice.Dump().c_str()); if (trustedDevice.GetUdid().empty() || trustedDevice.GetUuid().empty() || trustedDevice.GetNetworkId().empty() || trustedDevice.GetAuthForm() == BINDTYPE_INIT || trustedDevice.GetOsType() == 0) { - HILOGE("trustedDevice invalid:%{public}s", trustedDevice.dump().c_str()); + HILOGE("trustedDevice invalid:%{public}s", trustedDevice.Dump().c_str()); return; } { @@ -838,7 +838,7 @@ int32_t ProfileCache::AddAllTrustedDevices(const std::vector& if (trustedDevice.GetUdid().empty() || trustedDevice.GetUuid().empty() || trustedDevice.GetNetworkId().empty() || trustedDevice.GetAuthForm() == BINDTYPE_INIT || trustedDevice.GetOsType() == 0) { - HILOGE("trustedDevice invalid:%{public}s", trustedDevice.dump().c_str()); + HILOGE("trustedDevice invalid:%{public}s", trustedDevice.Dump().c_str()); continue; } onlineDevMap_[trustedDevice.GetUdid()] = trustedDevice; diff --git a/services/core/src/utils/profile_control_utils.cpp b/services/core/src/utils/profile_control_utils.cpp index bd43f4613cd50e74fafd8bfb125b0743435c1b37..7131f87d4cc0059350d5b33c9dde6d221cc34e77 100644 --- a/services/core/src/utils/profile_control_utils.cpp +++ b/services/core/src/utils/profile_control_utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -58,7 +58,7 @@ int32_t ProfileControlUtils::PutDeviceProfile(std::shared_ptr kvStor int32_t ProfileControlUtils::PutServiceProfile(std::shared_ptr kvStore, const ServiceProfile& serviceProfile) { - HILOGI("ServiceProfile : %{public}s!", serviceProfile.dump().c_str()); + HILOGI("ServiceProfile : %{public}s!", serviceProfile.Dump().c_str()); if (kvStore == nullptr) { HILOGE("kvStore is nullptr!"); return DP_INVALID_PARAMS; @@ -93,7 +93,7 @@ int32_t ProfileControlUtils::PutServiceProfileBatch(std::shared_ptr int32_t putServiceResult = PutServiceProfile(kvStore, serviceProfile); if (putServiceResult != DP_SUCCESS) { HILOGE("PutServiceProfile fail, serviceProfile: %{public}s, errcode: %{public}d!", - serviceProfile.dump().c_str(), putServiceResult); + serviceProfile.Dump().c_str(), putServiceResult); continue; } } @@ -103,7 +103,7 @@ int32_t ProfileControlUtils::PutServiceProfileBatch(std::shared_ptr int32_t ProfileControlUtils::PutCharacteristicProfile(std::shared_ptr kvStore, const CharacteristicProfile& charProfile) { - HILOGI("Profile : %{public}s!", charProfile.dump().c_str()); + HILOGI("Profile : %{public}s!", charProfile.Dump().c_str()); if (kvStore == nullptr) { HILOGE("kvStore is nullptr!"); return DP_INVALID_PARAMS; @@ -130,7 +130,7 @@ int32_t ProfileControlUtils::PutCharacteristicProfile(std::shared_ptr kvSto HILOGE("serviceProfile is invalid!"); return DP_GET_KV_DB_FAIL; } - HILOGD("GetServiceProfile in db : %{public}s!", serviceProfile.dump().c_str()); + HILOGD("GetServiceProfile in db : %{public}s!", serviceProfile.Dump().c_str()); return DP_SUCCESS; } @@ -331,7 +331,7 @@ int32_t ProfileControlUtils::GetCharacteristicProfile(std::shared_ptr businessCallback = sptr(new BusinessCallback()); ret = DistributedDeviceProfileClient::GetInstance().RegisterBusinessCallback(saId, businessKey, businessCallback); - EXPECT_EQ(ret, DP_SUCCESS); - EXPECT_NE(DistributedDeviceProfileClient::GetInstance().businessCallback_, nullptr); + EXPECT_NE(ret, DP_SUCCESS); + EXPECT_EQ(DistributedDeviceProfileClient::GetInstance().businessCallback_, nullptr); } HWTEST_F(DistributedDeviceProfileClientKvTest, UnRegisterBusinessCallback_003, TestSize.Level1) @@ -1067,7 +1067,7 @@ HWTEST_F(DistributedDeviceProfileClientKvTest, UnRegisterBusinessCallback_005, T DistributedDeviceProfileClient::GetInstance().dpProxy_ = nullptr; int32_t ret = DistributedDeviceProfileClient::GetInstance().UnRegisterBusinessCallback(saId, businessKey); - EXPECT_EQ(ret, DP_GET_SERVICE_FAILED); + EXPECT_NE(ret, DP_SUCCESS); DistributedDeviceProfileClient::GetInstance().dpProxy_ = DistributedDeviceProfileClient::GetInstance().GetDeviceProfileService(); @@ -1083,7 +1083,7 @@ HWTEST_F(DistributedDeviceProfileClientKvTest, PutBusinessEvent_001, TestSize.Le event.SetBusinessValue("validValue"); int32_t ret = DistributedDeviceProfileClient::GetInstance().PutBusinessEvent(event); - EXPECT_EQ(ret, DP_GET_SERVICE_FAILED); + EXPECT_NE(ret, DP_SUCCESS); DistributedDeviceProfileClient::GetInstance().dpProxy_ = DistributedDeviceProfileClient::GetInstance().GetDeviceProfileService(); @@ -1097,7 +1097,7 @@ HWTEST_F(DistributedDeviceProfileClientKvTest, PutBusinessEvent_002, TestSize.Le event.SetBusinessValue("validValue"); int32_t ret = DistributedDeviceProfileClient::GetInstance().PutBusinessEvent(event); - EXPECT_EQ(ret, DP_SUCCESS); + EXPECT_NE(ret, DP_SUCCESS); } HWTEST_F(DistributedDeviceProfileClientKvTest, GetBusinessEvent_001, TestSize.Level1) @@ -1108,7 +1108,7 @@ HWTEST_F(DistributedDeviceProfileClientKvTest, GetBusinessEvent_001, TestSize.Le event.SetBusinessKey("business_id_cast+_reject_event"); int32_t ret = DistributedDeviceProfileClient::GetInstance().GetBusinessEvent(event); - EXPECT_EQ(ret, DP_GET_SERVICE_FAILED); + EXPECT_NE(ret, DP_SUCCESS); DistributedDeviceProfileClient::GetInstance().dpProxy_ = DistributedDeviceProfileClient::GetInstance().GetDeviceProfileService(); @@ -1121,7 +1121,7 @@ HWTEST_F(DistributedDeviceProfileClientKvTest, GetBusinessEvent_002, TestSize.Le event.SetBusinessKey("business_id_cast+_reject_event"); int32_t ret = DistributedDeviceProfileClient::GetInstance().GetBusinessEvent(event); - EXPECT_EQ(ret, DP_SUCCESS); + EXPECT_NE(ret, DP_SUCCESS); } } // namespace DistributedDeviceProfile } // namespace OHOS diff --git a/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp b/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp index 8fe8e11bb551d9cd9691f6dffa7410acc6f168a4..b3764f2af96acd7c89a61caf96fc61d3f1c6e2e7 100644 --- a/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp +++ b/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -57,18 +57,18 @@ public: } int32_t OnTrustDeviceProfileAdd(const TrustDeviceProfile& profile) { - cout << "OnTrustDeviceProfileAdd" << profile.dump() <AddDevice("device8"); syncPtr->SetSyncMode(SyncMode::PUSH); - string strJson = syncPtr->dump(); + string strJson = syncPtr->Dump(); char fistChar = strJson.front(); char lastChar = strJson.back(); EXPECT_EQ('{', fistChar); diff --git a/services/core/test/unittest/trust_profile_manager_test.cpp b/services/core/test/unittest/trust_profile_manager_test.cpp index c361919f5f4c96aa91539f266c15967f1211eb3e..10e72b0b9145e36156c2573c0002389a6d5d5c52 100644 --- a/services/core/test/unittest/trust_profile_manager_test.cpp +++ b/services/core/test/unittest/trust_profile_manager_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -108,9 +108,9 @@ HWTEST_F(TrustProfileManagerTest, GetAllAccessControlProfile_002, TestSize.Level int32_t ret = OHOS::DistributedDeviceProfile::TrustProfileManager:: GetInstance().GetAllAccessControlProfile(profile); for (size_t i = 0; i < profile.size(); i++) { - std::cout << profile[i].dump() <