12d4d9a4dSopenharmony_ci/*
22d4d9a4dSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
32d4d9a4dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
42d4d9a4dSopenharmony_ci * you may not use this file except in compliance with the License.
52d4d9a4dSopenharmony_ci * You may obtain a copy of the License at
62d4d9a4dSopenharmony_ci *
72d4d9a4dSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
82d4d9a4dSopenharmony_ci *
92d4d9a4dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
102d4d9a4dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
112d4d9a4dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122d4d9a4dSopenharmony_ci * See the License for the specific language governing permissions and
132d4d9a4dSopenharmony_ci * limitations under the License.
142d4d9a4dSopenharmony_ci */
152d4d9a4dSopenharmony_ci
162d4d9a4dSopenharmony_ci#ifndef OHOS_DISTRIBUTED_INPUT_HISYSEVENT_UTILS_H
172d4d9a4dSopenharmony_ci#define OHOS_DISTRIBUTED_INPUT_HISYSEVENT_UTILS_H
182d4d9a4dSopenharmony_ci
192d4d9a4dSopenharmony_ci#include <cstring>
202d4d9a4dSopenharmony_ci
212d4d9a4dSopenharmony_ci#include "single_instance.h"
222d4d9a4dSopenharmony_ci#include "hisysevent.h"
232d4d9a4dSopenharmony_ci#include "constants_dinput.h"
242d4d9a4dSopenharmony_ci
252d4d9a4dSopenharmony_cinamespace OHOS {
262d4d9a4dSopenharmony_cinamespace DistributedHardware {
272d4d9a4dSopenharmony_cinamespace DistributedInput {
282d4d9a4dSopenharmony_ciconst std::string DINPUT_INIT = "DINPUT_INIT";
292d4d9a4dSopenharmony_ciconst std::string DINPUT_REGISTER = "DINPUT_REGISTER";
302d4d9a4dSopenharmony_ciconst std::string DINPUT_PREPARE = "DINPUT_PREPARE";
312d4d9a4dSopenharmony_ciconst std::string DINPUT_START_USE = "DINPUT_START_USE";
322d4d9a4dSopenharmony_ciconst std::string DINPUT_STOP_USE = "DINPUT_STOP_USE";
332d4d9a4dSopenharmony_ciconst std::string DINPUT_UNPREPARE = "DINPUT_UNPREPARE";
342d4d9a4dSopenharmony_ciconst std::string DINPUT_UNREGISTER = "DINPUT_UNREGISTER";
352d4d9a4dSopenharmony_ciconst std::string DINPUT_EXIT = "DINPUT_EXIT";
362d4d9a4dSopenharmony_ciconst std::string DINPUT_INIT_FAIL = "DINPUT_INIT_FAIL";
372d4d9a4dSopenharmony_ciconst std::string DINPUT_REGISTER_FAIL = "DINPUT_REGISTER_FAIL";
382d4d9a4dSopenharmony_ciconst std::string DINPUT_OPT_FAIL = "DINPUT_OPT_FAIL";
392d4d9a4dSopenharmony_ciconst std::string DINPUT_UNREGISTER_FAIL = "DINPUT_UNREGISTER_FAIL";
402d4d9a4dSopenharmony_ci
412d4d9a4dSopenharmony_ciclass HisyseventUtil {
422d4d9a4dSopenharmony_ciDECLARE_SINGLE_INSTANCE_BASE(HisyseventUtil);
432d4d9a4dSopenharmony_cipublic:
442d4d9a4dSopenharmony_ci    void SysEventWriteBehavior(std::string status, std::string msg);
452d4d9a4dSopenharmony_ci    void SysEventWriteBehavior(std::string status, std::string devId, std::string msg);
462d4d9a4dSopenharmony_ci    void SysEventWriteBehavior(std::string status, std::string devId, std::string dhId, std::string msg);
472d4d9a4dSopenharmony_ci    void SysEventWriteFault(std::string status, std::string msg);
482d4d9a4dSopenharmony_ci    void SysEventWriteFault(std::string status, std::string devId, int32_t errorCode, std::string msg);
492d4d9a4dSopenharmony_ci    void SysEventWriteFault(std::string status, std::string devId, std::string dhId, int32_t errorCode,
502d4d9a4dSopenharmony_ci        std::string msg);
512d4d9a4dSopenharmony_ci
522d4d9a4dSopenharmony_ciprivate:
532d4d9a4dSopenharmony_ci    HisyseventUtil() = default;
542d4d9a4dSopenharmony_ci    ~HisyseventUtil() = default;
552d4d9a4dSopenharmony_ci};
562d4d9a4dSopenharmony_ci} // namespace DistributedInput
572d4d9a4dSopenharmony_ci} // namespace DistributedHardware
582d4d9a4dSopenharmony_ci} // namespace OHOS
592d4d9a4dSopenharmony_ci
602d4d9a4dSopenharmony_ci#endif // OHOS_DISTRIBUTED_INPUT_HISYSEVENT_UTILS_H
61