12498b56bSopenharmony_ci/*
22498b56bSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd.
32498b56bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
42498b56bSopenharmony_ci * you may not use this file except in compliance with the License.
52498b56bSopenharmony_ci * You may obtain a copy of the License at
62498b56bSopenharmony_ci *
72498b56bSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
82498b56bSopenharmony_ci *
92498b56bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
102498b56bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
112498b56bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122498b56bSopenharmony_ci * See the License for the specific language governing permissions and
132498b56bSopenharmony_ci * limitations under the License.
142498b56bSopenharmony_ci */
152498b56bSopenharmony_ci
162498b56bSopenharmony_ci#ifndef PROPERTIES_H
172498b56bSopenharmony_ci#define PROPERTIES_H
182498b56bSopenharmony_ci
192498b56bSopenharmony_ci#include <string>
202498b56bSopenharmony_ci
212498b56bSopenharmony_cinamespace OHOS {
222498b56bSopenharmony_cinamespace HiviewDFX {
232498b56bSopenharmony_ci
242498b56bSopenharmony_cibool IsOnceDebugOn();
252498b56bSopenharmony_cibool IsPersistDebugOn();
262498b56bSopenharmony_ci#ifdef __cplusplus
272498b56bSopenharmony_ciextern "C" {
282498b56bSopenharmony_ci#endif
292498b56bSopenharmony_ci
302498b56bSopenharmony_cibool IsDebugOn();
312498b56bSopenharmony_cibool IsPrivateSwitchOn();
322498b56bSopenharmony_ci
332498b56bSopenharmony_ci#ifdef __cplusplus
342498b56bSopenharmony_ci}
352498b56bSopenharmony_ci#endif
362498b56bSopenharmony_cibool IsDebuggableHap();
372498b56bSopenharmony_ciuint16_t GetGlobalLevel();
382498b56bSopenharmony_ciuint16_t GetDomainLevel(uint32_t domain);
392498b56bSopenharmony_ciuint16_t GetTagLevel(const std::string& tag);
402498b56bSopenharmony_cibool IsProcessSwitchOn();
412498b56bSopenharmony_cibool IsDomainSwitchOn();
422498b56bSopenharmony_cibool IsKmsgSwitchOn();
432498b56bSopenharmony_cisize_t GetBufferSize(uint16_t type, bool persist);
442498b56bSopenharmony_ciint GetProcessQuota(const std::string& proc);
452498b56bSopenharmony_ciint GetDomainQuota(uint32_t domain);
462498b56bSopenharmony_cibool IsStatsEnable();
472498b56bSopenharmony_cibool IsTagStatsEnable();
482498b56bSopenharmony_ci
492498b56bSopenharmony_ciint SetPrivateSwitchOn(bool on);
502498b56bSopenharmony_ciint SetOnceDebugOn(bool on);
512498b56bSopenharmony_ciint SetPersistDebugOn(bool on);
522498b56bSopenharmony_ciint SetGlobalLevel(uint16_t lvl);
532498b56bSopenharmony_ciint SetTagLevel(const std::string& tag, uint16_t lvl);
542498b56bSopenharmony_ciint SetDomainLevel(uint32_t domain, uint16_t lvl);
552498b56bSopenharmony_ciint SetProcessSwitchOn(bool on);
562498b56bSopenharmony_ciint SetDomainSwitchOn(bool on);
572498b56bSopenharmony_ciint SetKmsgSwitchOn(bool on);
582498b56bSopenharmony_ciint SetBufferSize(uint16_t type, bool persist, size_t size);
592498b56bSopenharmony_ci} // namespace HiviewDFX
602498b56bSopenharmony_ci} // namespace OHOS
612498b56bSopenharmony_ci#endif
62