1/*
2 * Copyright (c) 2023 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#ifndef PLUGIN_SYS_EVENT_H
16#define PLUGIN_SYS_EVENT_H
17
18#include <stdint.h>
19#include <sys/types.h>
20#include "init_module_engine.h"
21
22#ifdef __cplusplus
23#if __cplusplus
24extern "C" {
25#endif
26#endif
27
28#define MAX_BUFFER_FOR_EVENT 1024
29typedef enum {
30    STARTUP_TIME = 0,
31    STARTUP_EVENT_MAX
32} StartupEventType;
33
34typedef struct {
35    StartupEventType type;
36} StartupEvent;
37
38typedef struct {
39    StartupEvent event;
40    int64_t totalTime;
41    char *detailTime;
42    char *reason;
43    int firstStart;
44    char *page;
45} StartupTimeEvent;
46
47void ReportSysEvent(const StartupEvent *event);
48
49#ifdef __cplusplus
50#if __cplusplus
51}
52#endif
53#endif
54#endif /* PLUGIN_SYS_EVENT_H */
55