1 /* 2 * Copyright (c) 2021-2023 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 #ifndef OHOS_HIVIEWDFX_IFAULTLOGGER_SERVICE_H 16 #define OHOS_HIVIEWDFX_IFAULTLOGGER_SERVICE_H 17 18 #include <string> 19 20 #include "iremote_broker.h" 21 #include "iremote_object.h" 22 #include "iremote_proxy.h" 23 24 #include "ifaultlog_query_result.h" 25 #include "faultlog_info_ohos.h" 26 27 namespace OHOS { 28 namespace HiviewDFX { 29 class IFaultLoggerService : public IRemoteBroker { 30 public: 31 virtual void AddFaultLog(const FaultLogInfoOhos& info) = 0; 32 virtual sptr<IRemoteObject> QuerySelfFaultLog(int32_t faultType, int32_t maxNum) = 0; 33 virtual void Destroy() = 0; 34 public: 35 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.hiviewdfx.IFaultLoggerService"); 36 }; 37 } // namespace HiviewDFX 38 } // namespace OHOS 39 40 #endif // OHOS_HIVIEWDFX_IFAULTLOGGER_SERVICE_H