• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 PROPERTIES_H
17 #define PROPERTIES_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace HiviewDFX {
23 bool IsPrivateSwitchOn();
24 bool IsOnceDebugOn();
25 bool IsPersistDebugOn();
26 bool IsDebugOn();
27 bool IsDebuggableHap();
28 uint16_t GetGlobalLevel();
29 uint16_t GetDomainLevel(uint32_t domain);
30 uint16_t GetTagLevel(const std::string& tag);
31 bool IsProcessSwitchOn();
32 bool IsDomainSwitchOn();
33 bool IsKmsgSwitchOn();
34 size_t GetBufferSize(uint16_t type, bool persist);
35 int GetProcessQuota(const std::string& proc);
36 int GetDomainQuota(uint32_t domain);
37 bool IsStatsEnable();
38 bool IsTagStatsEnable();
39 
40 int SetPrivateSwitchOn(bool on);
41 int SetOnceDebugOn(bool on);
42 int SetPersistDebugOn(bool on);
43 int SetGlobalLevel(uint16_t lvl);
44 int SetTagLevel(const std::string& tag, uint16_t lvl);
45 int SetDomainLevel(uint32_t domain, uint16_t lvl);
46 int SetProcessSwitchOn(bool on);
47 int SetDomainSwitchOn(bool on);
48 int SetKmsgSwitchOn(bool on);
49 int SetBufferSize(uint16_t type, bool persist, size_t size);
50 } // namespace HiviewDFX
51 } // namespace OHOS
52 #endif
53