185d2f8c5Sopenharmony_ci/* 285d2f8c5Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 385d2f8c5Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 485d2f8c5Sopenharmony_ci * you may not use this file except in compliance with the License. 585d2f8c5Sopenharmony_ci * You may obtain a copy of the License at 685d2f8c5Sopenharmony_ci * 785d2f8c5Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 885d2f8c5Sopenharmony_ci * 985d2f8c5Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1085d2f8c5Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1185d2f8c5Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1285d2f8c5Sopenharmony_ci * See the License for the specific language governing permissions and 1385d2f8c5Sopenharmony_ci * limitations under the License. 1485d2f8c5Sopenharmony_ci */ 1585d2f8c5Sopenharmony_ci 1685d2f8c5Sopenharmony_ci#ifndef TRACE_H 1785d2f8c5Sopenharmony_ci#define TRACE_H 1885d2f8c5Sopenharmony_ci 1985d2f8c5Sopenharmony_ci#include "nocopyable.h" 2085d2f8c5Sopenharmony_ci 2185d2f8c5Sopenharmony_ci#include "context_callback.h" 2285d2f8c5Sopenharmony_ci#include "hisysevent_adapter.h" 2385d2f8c5Sopenharmony_ci 2485d2f8c5Sopenharmony_cinamespace OHOS { 2585d2f8c5Sopenharmony_cinamespace UserIam { 2685d2f8c5Sopenharmony_cinamespace UserAuth { 2785d2f8c5Sopenharmony_ciclass Trace final : public NoCopyable { 2885d2f8c5Sopenharmony_ciprivate: 2985d2f8c5Sopenharmony_ci static Trace trace; 3085d2f8c5Sopenharmony_ci static void ProcessCredChangeEvent(const ContextCallbackNotifyListener::MetaData &metaData, TraceFlag flag); 3185d2f8c5Sopenharmony_ci static void ProcessCredManagerEvent(const ContextCallbackNotifyListener::MetaData &metaData, TraceFlag flag); 3285d2f8c5Sopenharmony_ci static void CopyMetaDataToTraceInfo(const ContextCallbackNotifyListener::MetaData &metaData, UserAuthTrace &info); 3385d2f8c5Sopenharmony_ci static void ProcessUserAuthEvent(const ContextCallbackNotifyListener::MetaData &metaData, TraceFlag flag); 3485d2f8c5Sopenharmony_ci static void ProcessUserAuthFwkEvent(const ContextCallbackNotifyListener::MetaData &metaData, TraceFlag flag); 3585d2f8c5Sopenharmony_ci Trace(); 3685d2f8c5Sopenharmony_ci ~Trace() override; 3785d2f8c5Sopenharmony_ci}; 3885d2f8c5Sopenharmony_ci} // namespace UserAuth 3985d2f8c5Sopenharmony_ci} // namespace UserIam 4085d2f8c5Sopenharmony_ci} // namespace OHOS 4185d2f8c5Sopenharmony_ci#endif // TRACE_H