1/* 2 * Copyright (c) 2022 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#ifndef OHOS_DM_DFX_CONSTANTS_H 16#define OHOS_DM_DFX_CONSTANTS_H 17 18#include "dm_device_info.h" 19 20#include <string> 21#include <unordered_map> 22 23namespace OHOS { 24namespace DistributedHardware { 25// HisysEvent Type 26const int DM_HISYEVENT_FAULT = 1; 27const int DM_HISYEVENT_STATISTIC = 2; 28const int DM_HISYEVENT_SECURITY = 3; 29const int DM_HISYEVENT_BEHAVIOR = 4; 30 31// HiDumper Flag 32enum class HidumperFlag { 33 HIDUMPER_UNKNOWN = 0, 34 HIDUMPER_GET_HELP, 35 HIDUMPER_GET_TRUSTED_LIST, 36 HIDUMPER_GET_DEVICE_STATE, 37}; 38 39// HiDumper info 40constexpr const char* ARGS_HELP_INFO = "-help"; 41constexpr const char* HIDUMPER_GET_TRUSTED_LIST_INFO = "-getTrustlist"; 42 43// HiDumper command 44const std::unordered_map<std::string, HidumperFlag> MAP_ARGS = { 45 { std::string(ARGS_HELP_INFO), HidumperFlag::HIDUMPER_GET_HELP }, 46 { std::string(HIDUMPER_GET_TRUSTED_LIST_INFO), HidumperFlag::HIDUMPER_GET_TRUSTED_LIST }, 47}; 48 49// HiDumper device type 50typedef struct DumperInfo { 51 DmDeviceType deviceTypeId; 52 std::string deviceTypeInfo; 53} DumperInfo; 54} // namespace DistributedHardware 55} // namespace OHOS 56#endif // OHOS_DM_DFX_CONSTANTS_H 57