179a732c7Sopenharmony_ci/*
279a732c7Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
379a732c7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
479a732c7Sopenharmony_ci * you may not use this file except in compliance with the License.
579a732c7Sopenharmony_ci * You may obtain a copy of the License at
679a732c7Sopenharmony_ci *
779a732c7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0
879a732c7Sopenharmony_ci *
979a732c7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1079a732c7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1179a732c7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1279a732c7Sopenharmony_ci * See the License for the specific language governing permissions and
1379a732c7Sopenharmony_ci * limitations under the License.
1479a732c7Sopenharmony_ci */
1579a732c7Sopenharmony_ci#ifndef OHOS_DM_DFX_CONSTANTS_H
1679a732c7Sopenharmony_ci#define OHOS_DM_DFX_CONSTANTS_H
1779a732c7Sopenharmony_ci
1879a732c7Sopenharmony_ci#include "dm_device_info.h"
1979a732c7Sopenharmony_ci
2079a732c7Sopenharmony_ci#include <string>
2179a732c7Sopenharmony_ci#include <unordered_map>
2279a732c7Sopenharmony_ci
2379a732c7Sopenharmony_cinamespace OHOS {
2479a732c7Sopenharmony_cinamespace DistributedHardware {
2579a732c7Sopenharmony_ci// HisysEvent Type
2679a732c7Sopenharmony_ciconst int DM_HISYEVENT_FAULT = 1;
2779a732c7Sopenharmony_ciconst int DM_HISYEVENT_STATISTIC = 2;
2879a732c7Sopenharmony_ciconst int DM_HISYEVENT_SECURITY = 3;
2979a732c7Sopenharmony_ciconst int DM_HISYEVENT_BEHAVIOR = 4;
3079a732c7Sopenharmony_ci
3179a732c7Sopenharmony_ci// HiDumper Flag
3279a732c7Sopenharmony_cienum class HidumperFlag {
3379a732c7Sopenharmony_ci    HIDUMPER_UNKNOWN = 0,
3479a732c7Sopenharmony_ci    HIDUMPER_GET_HELP,
3579a732c7Sopenharmony_ci    HIDUMPER_GET_TRUSTED_LIST,
3679a732c7Sopenharmony_ci    HIDUMPER_GET_DEVICE_STATE,
3779a732c7Sopenharmony_ci};
3879a732c7Sopenharmony_ci
3979a732c7Sopenharmony_ci// HiDumper info
4079a732c7Sopenharmony_ciconstexpr const char* ARGS_HELP_INFO = "-help";
4179a732c7Sopenharmony_ciconstexpr const char* HIDUMPER_GET_TRUSTED_LIST_INFO = "-getTrustlist";
4279a732c7Sopenharmony_ci
4379a732c7Sopenharmony_ci// HiDumper command
4479a732c7Sopenharmony_ciconst std::unordered_map<std::string, HidumperFlag> MAP_ARGS = {
4579a732c7Sopenharmony_ci    { std::string(ARGS_HELP_INFO), HidumperFlag::HIDUMPER_GET_HELP },
4679a732c7Sopenharmony_ci    { std::string(HIDUMPER_GET_TRUSTED_LIST_INFO), HidumperFlag::HIDUMPER_GET_TRUSTED_LIST },
4779a732c7Sopenharmony_ci};
4879a732c7Sopenharmony_ci
4979a732c7Sopenharmony_ci// HiDumper device type
5079a732c7Sopenharmony_citypedef struct DumperInfo {
5179a732c7Sopenharmony_ci    DmDeviceType deviceTypeId;
5279a732c7Sopenharmony_ci    std::string deviceTypeInfo;
5379a732c7Sopenharmony_ci} DumperInfo;
5479a732c7Sopenharmony_ci} // namespace DistributedHardware
5579a732c7Sopenharmony_ci} // namespace OHOS
5679a732c7Sopenharmony_ci#endif // OHOS_DM_DFX_CONSTANTS_H
57