12ee81decSopenharmony_ci/*
22ee81decSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
32ee81decSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
42ee81decSopenharmony_ci * you may not use this file except in compliance with the License.
52ee81decSopenharmony_ci * You may obtain a copy of the License at
62ee81decSopenharmony_ci *
72ee81decSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0
82ee81decSopenharmony_ci *
92ee81decSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
102ee81decSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
112ee81decSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122ee81decSopenharmony_ci * See the License for the specific language governing permissions and
132ee81decSopenharmony_ci * limitations under the License.
142ee81decSopenharmony_ci */
152ee81decSopenharmony_ci
162ee81decSopenharmony_ci#ifndef SERVICE_DSLM_BIGDATA_H
172ee81decSopenharmony_ci#define SERVICE_DSLM_BIGDATA_H
182ee81decSopenharmony_ci
192ee81decSopenharmony_ci#ifdef __cplusplus
202ee81decSopenharmony_ci#include <cstdint>
212ee81decSopenharmony_ciconstexpr int MODEL_MAX_LEN = 128;
222ee81decSopenharmony_ciconstexpr int PKG_NAME_MAX_LEN = 256;
232ee81decSopenharmony_ci#else
242ee81decSopenharmony_ci#include <stdint.h>
252ee81decSopenharmony_ci#define MODEL_MAX_LEN 128
262ee81decSopenharmony_ci#define PKG_NAME_MAX_LEN 256
272ee81decSopenharmony_ci#endif
282ee81decSopenharmony_ci
292ee81decSopenharmony_citypedef struct AppInvokeEvent {
302ee81decSopenharmony_ci    int32_t uid;
312ee81decSopenharmony_ci    int32_t costTime;
322ee81decSopenharmony_ci    int32_t retCode;
332ee81decSopenharmony_ci    int32_t secLevel;
342ee81decSopenharmony_ci    int32_t retMode;
352ee81decSopenharmony_ci    char localModel[MODEL_MAX_LEN];
362ee81decSopenharmony_ci    char targetModel[MODEL_MAX_LEN];
372ee81decSopenharmony_ci    char pkgName[PKG_NAME_MAX_LEN];
382ee81decSopenharmony_ci} AppInvokeEvent;
392ee81decSopenharmony_ci
402ee81decSopenharmony_citypedef struct SecurityInfoSyncEvent {
412ee81decSopenharmony_ci    char localModel[MODEL_MAX_LEN];
422ee81decSopenharmony_ci    char targetModel[MODEL_MAX_LEN];
432ee81decSopenharmony_ci    uint64_t localVersion;
442ee81decSopenharmony_ci    uint64_t targetVersion;
452ee81decSopenharmony_ci    int32_t credType;
462ee81decSopenharmony_ci    int32_t retCode;
472ee81decSopenharmony_ci    int32_t costTime;
482ee81decSopenharmony_ci    int32_t secLevel;
492ee81decSopenharmony_ci} SecurityInfoSyncEvent;
502ee81decSopenharmony_ci
512ee81decSopenharmony_ci#ifdef __cplusplus
522ee81decSopenharmony_ciextern "C" {
532ee81decSopenharmony_ci#endif
542ee81decSopenharmony_ci
552ee81decSopenharmony_civoid ReportServiceStartFailedEvent(const uint32_t errorType);
562ee81decSopenharmony_ci
572ee81decSopenharmony_civoid ReportInitSelfFailedEvent(const char *errorString);
582ee81decSopenharmony_ci
592ee81decSopenharmony_civoid ReportAppInvokeEvent(const AppInvokeEvent *event);
602ee81decSopenharmony_ci
612ee81decSopenharmony_civoid ReportSecurityInfoSyncEvent(const SecurityInfoSyncEvent *event);
622ee81decSopenharmony_ci
632ee81decSopenharmony_ci#ifdef __cplusplus
642ee81decSopenharmony_ci}
652ee81decSopenharmony_ci#endif
662ee81decSopenharmony_ci
672ee81decSopenharmony_ci#endif // SERVICE_DSLM_BIGDATA_H
68