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 #include "rdb_fault_hiview_reporter.h"
16 
17 #include "connection.h"
18 namespace OHOS::NativeRdb {
19 
ReportFault(const RdbCorruptedEvent & eventInfo)20 void RdbFaultHiViewReporter::ReportFault(const RdbCorruptedEvent &eventInfo)
21 {
22     (void)eventInfo;
23 }
24 
ReportRestore(const RdbCorruptedEvent & eventInfo,bool repair)25 void RdbFaultHiViewReporter::ReportRestore(const RdbCorruptedEvent &eventInfo, bool repair)
26 {
27     (void)eventInfo;
28 }
29 
Report(const RdbCorruptedEvent & eventInfo)30 void RdbFaultHiViewReporter::Report(const RdbCorruptedEvent &eventInfo)
31 {
32     (void)eventInfo;
33 }
34 
GetFileStatInfo(const DebugInfo & debugInfo)35 std::string RdbFaultHiViewReporter::GetFileStatInfo(const DebugInfo &debugInfo)
36 {
37     (void)debugInfo;
38     return "";
39 }
40 
IsReportCorruptedFault(const std::string & dbPath)41 bool RdbFaultHiViewReporter::IsReportCorruptedFault(const std::string &dbPath)
42 {
43     return false;
44 }
45 
CreateCorruptedFlag(const std::string & dbPath)46 void RdbFaultHiViewReporter::CreateCorruptedFlag(const std::string &dbPath)
47 {
48     (void)dbPath;
49 }
50 
DeleteCorruptedFlag(const std::string & dbPath)51 void RdbFaultHiViewReporter::DeleteCorruptedFlag(const std::string &dbPath)
52 {
53     (void)dbPath;
54 }
55 
GetTimeWithMilliseconds(time_t sec,int64_t nsec)56 std::string RdbFaultHiViewReporter::GetTimeWithMilliseconds(time_t sec, int64_t nsec)
57 {
58     (void)sec;
59     (void)nsec;
60     return "";
61 }
Create(const RdbStoreConfig & config,int32_t errCode,const std::string & appendix)62 RdbCorruptedEvent RdbFaultHiViewReporter::Create(const RdbStoreConfig &config, int32_t errCode,
63     const std::string &appendix)
64 {
65     RdbCorruptedEvent eventInfo;
66     return eventInfo;
67 }
68 
RegCollector(Connection::Collector collector)69 bool RdbFaultHiViewReporter::RegCollector(Connection::Collector collector)
70 {
71     (void)collector;
72     return true;
73 }
Update(RdbCorruptedEvent & eventInfo,const std::map<std::string,DebugInfo> & infos)74 void RdbFaultHiViewReporter::Update(RdbCorruptedEvent &eventInfo, const std::map<std::string, DebugInfo> &infos)
75 {
76     (void)eventInfo;
77     (void)infos;
78 }
79 
GetBundleName(const RdbCorruptedEvent & eventInfo)80 std::string RdbFaultHiViewReporter::GetBundleName(const RdbCorruptedEvent &eventInfo)
81 {
82     (void)eventInfo;
83     return "";
84 }
85 
Format(const std::map<std::string,DebugInfo> & debugs,const std::string & header)86 std::string RdbFaultHiViewReporter::Format(const std::map<std::string, DebugInfo> &debugs, const std::string &header)
87 {
88     (void)debugs;
89     (void)header;
90     return "";
91 }
92 
FormatBrief(const std::map<std::string,DebugInfo> & debugs,const std::string & header)93 std::string RdbFaultHiViewReporter::FormatBrief(const std::map<std::string, DebugInfo> &debugs,
94     const std::string &header)
95 {
96     (void)debugs;
97     (void)header;
98     return "";
99 }
100 } // namespace OHOS::NativeRdb