1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef DRM_DFX_UTILS_H 17 #define DRM_DFX_UTILS_H 18 #include <string> 19 #include <vector> 20 21 namespace OHOS { 22 namespace DrmStandard { 23 struct StatisticsInfo { 24 std::string pluginUuid; 25 std::string pluginName; 26 std::string vendorName; 27 std::string versionName; 28 std::string bundleName; 29 }; 30 std::string __attribute__((visibility("default"))) GetClientBundleName(int32_t uid); 31 std::string __attribute__((visibility("default"))) CastToHexString(std::vector<uint8_t> binaryData); 32 uint32_t __attribute__((visibility("default"))) CalculateTimeDiff(std::chrono::system_clock::time_point timeBefore, 33 std::chrono::system_clock::time_point timeAfter); 34 const int minimumDigit = 2; 35 } // namespace DrmStandard 36 } // namespace OHOS 37 38 #endif // DRM_DFX_UTILS_H