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 16 #ifndef OHOS_DISTRIBUTED_HARDWARE_DHUTIL_HISYSEVENT_H 17 #define OHOS_DISTRIBUTED_HARDWARE_DHUTIL_HISYSEVENT_H 18 19 #include <cstdint> 20 #include <string> 21 22 #include "hisysevent.h" 23 24 #include "device_type.h" 25 26 namespace OHOS { 27 namespace DistributedHardware { 28 const std::string DHFWK_INIT_BEGIN = "DHFWK_INIT_BEGIN"; 29 const std::string DHFWK_INIT_END = "DHFWK_INIT_END"; 30 const std::string DHFWK_INIT_FAIL = "DHFWK_INIT_FAIL"; 31 const std::string DHFWK_EXIT_BEGIN = "DHFWK_EXIT_BEGIN"; 32 const std::string DHFWK_EXIT_END = "DHFWK_EXIT_END"; 33 const std::string DHFWK_DEV_OFFLINE = "DHFWK_DEV_OFFLINE"; 34 const std::string DHFWK_RELEASE_FAIL = "DHFWK_RELEASE_FAIL"; 35 const std::string DHFWK_DH_REGISTER_FAIL = "DHFWK_DH_REGISTER_FAIL"; 36 const std::string DHFWK_DH_UNREGISTER_FAIL = "DHFWK_DH_UNREGISTER_FAIL"; 37 38 void HiSysEventWriteMsg(const std::string &status, const OHOS::HiviewDFX::HiSysEvent::EventType eventType, 39 const std::string &msg); 40 void HiSysEventWriteErrCodeMsg(const std::string &status, const OHOS::HiviewDFX::HiSysEvent::EventType eventType, 41 int32_t errCode, const std::string &msg); 42 void HiSysEventWriteReleaseMsg(const std::string &status, const OHOS::HiviewDFX::HiSysEvent::EventType eventType, 43 const DHType dhType, int32_t errCode, const std::string &msg); 44 void HiSysEventWriteCompOfflineMsg(const std::string &status, const OHOS::HiviewDFX::HiSysEvent::EventType eventType, 45 const std::string &anonyNetworkId, const std::string &msg); 46 void HiSysEventWriteCompMgrFailedMsg(const std::string &status, const OHOS::HiviewDFX::HiSysEvent::EventType eventType, 47 const std::string &anonyDHId, int32_t errCode, const std::string &msg); 48 } // namespace DistributedHardware 49 } // namespace OHOS 50 #endif