1 /* 2 * Copyright (c) 2024 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_FAULTLOGGER_INFO_H 17 #define OHOS_FAULTLOGGER_INFO_H 18 19 #include <string> 20 #include <vector> 21 #include "faultlogger_client.h" 22 23 namespace OHOS { 24 namespace HiviewDFX { 25 class CBaseContext { 26 public: CBaseContext()27 CBaseContext() {}; ~CBaseContext()28 virtual ~CBaseContext() {}; 29 }; 30 31 struct CJFaultLogInfo { 32 int pid = 0; 33 int uid = 0; 34 int type = 0; 35 int64_t ts = 0; 36 std::string reason = ""; 37 std::string module = ""; 38 std::string summary = ""; 39 std::string fullLog = ""; 40 }; 41 42 class CFaultLogInfoContext : public CBaseContext { 43 public: CFaultLogInfoContext()44 CFaultLogInfoContext() {}; ~CFaultLogInfoContext()45 ~CFaultLogInfoContext() override {}; 46 int32_t faultType = 0; 47 bool resolved = false; 48 std::vector<CJFaultLogInfo> infoVector; 49 }; 50 } // namespace HiviewDFX 51 } // namespace OHOS 52 #endif