15ba71b47Sopenharmony_ci/*
25ba71b47Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
35ba71b47Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
45ba71b47Sopenharmony_ci * you may not use this file except in compliance with the License.
55ba71b47Sopenharmony_ci * You may obtain a copy of the License at
65ba71b47Sopenharmony_ci *
75ba71b47Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
85ba71b47Sopenharmony_ci *
95ba71b47Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
105ba71b47Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
115ba71b47Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125ba71b47Sopenharmony_ci * See the License for the specific language governing permissions and
135ba71b47Sopenharmony_ci * limitations under the License.
145ba71b47Sopenharmony_ci */
155ba71b47Sopenharmony_ci
165ba71b47Sopenharmony_ci#ifndef SAMGR_SERVICES_DFX_INCLUDE__HISYSEVENT_ADAPTER_H
175ba71b47Sopenharmony_ci#define SAMGR_SERVICES_DFX_INCLUDE__HISYSEVENT_ADAPTER_H
185ba71b47Sopenharmony_ci
195ba71b47Sopenharmony_ci#include <string>
205ba71b47Sopenharmony_cinamespace OHOS {
215ba71b47Sopenharmony_civoid ReportSaMainExit(const std::string& reason);
225ba71b47Sopenharmony_ci
235ba71b47Sopenharmony_civoid ReportAddSystemAbilityFailed(int32_t said, int32_t pid, int32_t uid, const std::string& filaName);
245ba71b47Sopenharmony_ci
255ba71b47Sopenharmony_civoid ReportGetSAFrequency(uint32_t callerUid, uint32_t said, int32_t count);
265ba71b47Sopenharmony_ci
275ba71b47Sopenharmony_civoid WatchDogSendEvent(int32_t pid, uint32_t uid, const std::string& sendMsg,
285ba71b47Sopenharmony_ci    const std::string& eventName);
295ba71b47Sopenharmony_ci
305ba71b47Sopenharmony_civoid ReportSaCrash(int32_t saId);
315ba71b47Sopenharmony_ci
325ba71b47Sopenharmony_civoid ReportSamgrSaLoadFail(int32_t said, int32_t pid, int32_t uid, const std::string& reason);
335ba71b47Sopenharmony_ci
345ba71b47Sopenharmony_civoid ReportSamgrSaLoad(int32_t said, int32_t pid, int32_t uid, int32_t eventId);
355ba71b47Sopenharmony_ci
365ba71b47Sopenharmony_civoid ReportSamgrSaUnload(int32_t said, int32_t pid, int32_t uid, int32_t eventId);
375ba71b47Sopenharmony_ci
385ba71b47Sopenharmony_civoid ReportSaUnLoadFail(int32_t saId, int32_t pid, int32_t uid, const std::string& reason);
395ba71b47Sopenharmony_ci
405ba71b47Sopenharmony_civoid ReportSaLoadDuration(int32_t saId, int32_t keyStage, int64_t duration);
415ba71b47Sopenharmony_ci
425ba71b47Sopenharmony_civoid ReportSaUnLoadDuration(int32_t saId, int32_t keyStage, int64_t duration);
435ba71b47Sopenharmony_ci
445ba71b47Sopenharmony_civoid ReportProcessStartFail(const std::string& processName, int32_t pid, int32_t uid, const std::string& reason);
455ba71b47Sopenharmony_ci
465ba71b47Sopenharmony_civoid ReportProcessStopFail(const std::string& processName, int32_t pid, int32_t uid, const std::string& reason);
475ba71b47Sopenharmony_ci
485ba71b47Sopenharmony_civoid ReportProcessStartDuration(const std::string& processName, int32_t pid, int32_t uid, int64_t duration);
495ba71b47Sopenharmony_ci
505ba71b47Sopenharmony_civoid ReportProcessStopDuration(const std::string& processName, int32_t pid, int32_t uid, int64_t duration);
515ba71b47Sopenharmony_ci
525ba71b47Sopenharmony_civoid ReportSAIdle(int32_t said, const std::string& reason);
535ba71b47Sopenharmony_ci} // OHOS
545ba71b47Sopenharmony_ci#endif // SAMGR_SERVICES_DFX_INCLUDE__HISYSEVENT_ADAPTER_H
55