1d590543dSopenharmony_ci/*
2d590543dSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
3d590543dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4d590543dSopenharmony_ci * you may not use this file except in compliance with the License.
5d590543dSopenharmony_ci * You may obtain a copy of the License at
6d590543dSopenharmony_ci *
7d590543dSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8d590543dSopenharmony_ci *
9d590543dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10d590543dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11d590543dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12d590543dSopenharmony_ci * See the License for the specific language governing permissions and
13d590543dSopenharmony_ci * limitations under the License.
14d590543dSopenharmony_ci */
15d590543dSopenharmony_ci
16d590543dSopenharmony_ci#include "stats_hisysevent.h"
17d590543dSopenharmony_ci
18d590543dSopenharmony_cinamespace OHOS {
19d590543dSopenharmony_cinamespace PowerMgr {
20d590543dSopenharmony_cinamespace {
21d590543dSopenharmony_ciconst uint32_t COMPARE_SUCCESS = 0;
22d590543dSopenharmony_ci}
23d590543dSopenharmony_cibool StatsHiSysEvent::CheckHiSysEvent(const std::string& eventName)
24d590543dSopenharmony_ci{
25d590543dSopenharmony_ci    for (int32_t i = 0; i < HISYSEVENT_TYPE_END; i++) {
26d590543dSopenharmony_ci        if (eventName.compare(HISYSEVENT_LIST[i]) == COMPARE_SUCCESS) {
27d590543dSopenharmony_ci            return true;
28d590543dSopenharmony_ci        }
29d590543dSopenharmony_ci    }
30d590543dSopenharmony_ci    return false;
31d590543dSopenharmony_ci}
32d590543dSopenharmony_ci} // namespace PowerMgr
33d590543dSopenharmony_ci} // namespace OHOS