1 /*
2  * Copyright (c) 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 
16 #ifndef COMMON_NATIVE_INCLUDE_SECURITY_REPORT_H
17 #define COMMON_NATIVE_INCLUDE_SECURITY_REPORT_H
18 
19 #include <string>
20 #include "func_code.h"
21 
22 namespace OHOS {
23 namespace EDM {
24 struct ReportInfo {
25     FuncOperateType operateType_;
26     int32_t subType_; // reserved
27     std::string policyName_;
28     std::string label_; // reserved
29     std::string outcome_;
30     std::string extra_;  // reserved
31 
ReportInfoReportInfo32     ReportInfo(FuncOperateType operateType, const std::string &policyName, const std::string &outcome)
33     {
34         operateType_ = operateType;
35         subType_ = 0;
36         policyName_ = policyName;
37         label_ = "";
38         outcome_ = outcome;
39         extra_ = "";
40     };
41 };
42 
43 class SecurityReport {
44 public:
45     static void ReportSecurityInfo(const std::string &bundleName, const std::string &abilityName,
46         const ReportInfo &reportInfo);
47 };
48 } // namespace EDM
49 } // namespace OHOS
50 
51 #endif // COMMON_NATIVE_INCLUDE_SECURITY_REPORT_H