1b0e7dd80Sopenharmony_ci/* 2b0e7dd80Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3b0e7dd80Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4b0e7dd80Sopenharmony_ci * you may not use this file except in compliance with the License. 5b0e7dd80Sopenharmony_ci * You may obtain a copy of the License at 6b0e7dd80Sopenharmony_ci * 7b0e7dd80Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8b0e7dd80Sopenharmony_ci * 9b0e7dd80Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10b0e7dd80Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11b0e7dd80Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12b0e7dd80Sopenharmony_ci * See the License for the specific language governing permissions and 13b0e7dd80Sopenharmony_ci * limitations under the License. 14b0e7dd80Sopenharmony_ci */ 15b0e7dd80Sopenharmony_ci 16b0e7dd80Sopenharmony_ci#ifndef BIN_INCLUDE_HITRACE_CAPTURE_H 17b0e7dd80Sopenharmony_ci#define BIN_INCLUDE_HITRACE_CAPTURE_H 18b0e7dd80Sopenharmony_ci 19b0e7dd80Sopenharmony_ci#include <cstdint> 20b0e7dd80Sopenharmony_ci#include <iosfwd> 21b0e7dd80Sopenharmony_ci#include <string> 22b0e7dd80Sopenharmony_ci 23b0e7dd80Sopenharmony_cinamespace OHOS { 24b0e7dd80Sopenharmony_cinamespace HiviewDFX { 25b0e7dd80Sopenharmony_cinamespace HitraceOsal { 26b0e7dd80Sopenharmony_cienum TraceType { USER, KERNEL }; 27b0e7dd80Sopenharmony_ciconstexpr int MAX_SYS_FILES = 11; 28b0e7dd80Sopenharmony_cistruct TagCategory { 29b0e7dd80Sopenharmony_ci std::string name; 30b0e7dd80Sopenharmony_ci std::string description; 31b0e7dd80Sopenharmony_ci uint64_t tag; 32b0e7dd80Sopenharmony_ci TraceType type; 33b0e7dd80Sopenharmony_ci struct { 34b0e7dd80Sopenharmony_ci std::string path; 35b0e7dd80Sopenharmony_ci } SysFiles[MAX_SYS_FILES]; 36b0e7dd80Sopenharmony_ci}; 37b0e7dd80Sopenharmony_ci 38b0e7dd80Sopenharmony_cistd::string GetPropertyInner(const std::string& property, const std::string& value); 39b0e7dd80Sopenharmony_cibool SetPropertyInner(const std::string& property, const std::string& value); 40b0e7dd80Sopenharmony_cibool RefreshBinderServices(void); 41b0e7dd80Sopenharmony_cibool RefreshHalServices(void); 42b0e7dd80Sopenharmony_cibool IsHmKernel(); 43b0e7dd80Sopenharmony_cibool IsDeveloperMode(); 44b0e7dd80Sopenharmony_cibool IsRootVersion(); 45b0e7dd80Sopenharmony_ci} 46b0e7dd80Sopenharmony_ci} 47b0e7dd80Sopenharmony_ci} 48b0e7dd80Sopenharmony_ci#endif // BIN_INCLUDE_HITRACE_CAPTURE_H 49