1 /* 2 * Copyright (c) 2021 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 HIVIEWDFX_HIVIEW_FAULTLOGGER_FAULT_QUERY_RESULT_IMPL_OHOS_H 16 #define HIVIEWDFX_HIVIEW_FAULTLOGGER_FAULT_QUERY_RESULT_IMPL_OHOS_H 17 18 #include <memory> 19 20 #include "refbase.h" 21 22 #include "faultlog_info.h" 23 #include "faultlog_query_result_proxy.h" 24 25 namespace OHOS { 26 namespace HiviewDFX { 27 class FaultLogQueryResultImpl { 28 public: FaultLogQueryResultImpl(sptr<FaultLogQueryResultProxy> impl)29 explicit FaultLogQueryResultImpl(sptr<FaultLogQueryResultProxy> impl) : impl_(impl){}; 30 virtual ~FaultLogQueryResultImpl(); 31 32 std::unique_ptr<FaultLogInfo> GetNext(); 33 bool HasNext(); 34 35 private: 36 sptr<FaultLogQueryResultProxy> impl_ = nullptr; 37 }; 38 } // namespace HiviewDFX 39 } // namespace OHOS 40 #endif // HIVIEWDFX_HIVIEW_FAULTLOGGER_FAULT_QUERY_RESULT_IMPL_OHOS_H