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