• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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 OHOS_USERIAM_DFX_HISYSEVENT_ADAPTER_H
17 #define OHOS_USERIAM_DFX_HISYSEVENT_ADAPTER_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace UserIam {
23 namespace UserAuth {
24 struct UserAuthInfo {
25     uint64_t callingUid = 0;
26     int32_t authType = 0;
27     uint32_t atl = 0;
28     uint32_t authResult = 0;
29     std::string timeSpanString;
30     uint32_t sdkVersion = 0;
31     uint32_t authWidgetType = 0;
32 };
33 
34 struct PinAuthInfo {
35     int32_t userId = 0;
36     uint64_t callingUid = 0;
37     std::string authTimeString;
38     uint32_t authResult = 0;
39     uint32_t remainTime = 0;
40     uint32_t freezingTime = 0;
41 };
42 
43 void ReportSystemFault(const std::string &timeString, const std::string &moudleName);
44 void ReportTemplateChange(int32_t executorType, uint32_t changeType, const std::string &reason);
45 void ReportBehaviorCredChange(int32_t userId, int32_t authType, uint32_t operationType, uint32_t optResult);
46 void ReportSecurityCredChange(int32_t userId, int32_t authType, uint32_t operationType, uint32_t optResult);
47 void ReportUserAuth(const UserAuthInfo &info);
48 void ReportPinAuth(const PinAuthInfo &info);
49 } // namespace UserAuth
50 } // namespace UserIam
51 } // namespace OHOS
52 #endif // OHOS_USERIAM_DFX_HISYSEVENT_ADAPTER_H