179a732c7Sopenharmony_ci/*
279a732c7Sopenharmony_ci * Copyright (c) 2022-2024 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
1679a732c7Sopenharmony_ci#ifndef OHOS_DM_HIDUMPER_H
1779a732c7Sopenharmony_ci#define OHOS_DM_HIDUMPER_H
1879a732c7Sopenharmony_ci
1979a732c7Sopenharmony_ci#include <cstdint>
2079a732c7Sopenharmony_ci#include <string>
2179a732c7Sopenharmony_ci#include <vector>
2279a732c7Sopenharmony_ci
2379a732c7Sopenharmony_ci#include "dm_device_info.h"
2479a732c7Sopenharmony_ci#include "dm_dfx_constants.h"
2579a732c7Sopenharmony_ci#include "dm_single_instance.h"
2679a732c7Sopenharmony_ci
2779a732c7Sopenharmony_cinamespace OHOS {
2879a732c7Sopenharmony_cinamespace DistributedHardware {
2979a732c7Sopenharmony_ciclass HiDumpHelper {
3079a732c7Sopenharmony_ciDM_DECLARE_SINGLE_INSTANCE(HiDumpHelper);
3179a732c7Sopenharmony_cipublic:
3279a732c7Sopenharmony_ci    int32_t HiDump(const std::vector<std::string>& args, std::string &result);
3379a732c7Sopenharmony_ci    int32_t GetArgsType(const std::vector<std::string>& args, std::vector<HidumperFlag> &Flag);
3479a732c7Sopenharmony_ci    void SetNodeInfo(const DmDeviceInfo& deviceInfo);
3579a732c7Sopenharmony_ci
3679a732c7Sopenharmony_ciprivate:
3779a732c7Sopenharmony_ci    int32_t ProcessDump(const HidumperFlag &flag, std::string &result);
3879a732c7Sopenharmony_ci    int32_t ShowAllLoadTrustedList(std::string &result);
3979a732c7Sopenharmony_ci    int32_t ShowHelp(std::string &result);
4079a732c7Sopenharmony_ci    int32_t ShowIllealInfomation(std::string &result);
4179a732c7Sopenharmony_ci    std::string GetDeviceType(int32_t deviceTypeId);
4279a732c7Sopenharmony_ci
4379a732c7Sopenharmony_ciprivate:
4479a732c7Sopenharmony_ci    std::vector<DmDeviceInfo> nodeInfos_;
4579a732c7Sopenharmony_ci};
4679a732c7Sopenharmony_ci} // namespace DistributedHardware
4779a732c7Sopenharmony_ci} // namespace OHOS
4879a732c7Sopenharmony_ci#endif // OHOS_DM_HIDUMPER_H
49