1 /*
2  * Copyright (c) 2021 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 
16 #ifndef HIVIEWDFX_HIAPPEVENT_PARAM_H
17 #define HIVIEWDFX_HIAPPEVENT_PARAM_H
18 
19 /**
20  * @addtogroup HiAppEvent
21  * @{
22  *
23  * @brief Provides application event logging functions.
24  *
25  * Provides the event logging function for applications to log the fault, statistical, security, and user behavior
26  * events reported during running. Based on event information, you will be able to analyze the running status of
27  * applications.
28  *
29  * @syscap SystemCapability.HiviewDFX.HiAppEvent
30  *
31  * @since 8
32  * @version 1.0
33  */
34 
35 /**
36  * @file hiappevent_param.h
37  *
38  * @brief Defines the param names of all predefined events.
39  *
40  * In addition to custom events associated with specific apps, you can also use predefined events for logging.
41  *
42  * Sample code:
43  * <pre>
44  *     ParamList list = OH_HiAppEvent_CreateParamList();
45  *     OH_HiAppEvent_AddInt32Param(list, PARAM_USER_ID, 123);
46  *     int res = OH_HiAppEvent_Write("user_domain", EVENT_USER_LOGIN, BEHAVIOR, list);
47  *     OH_HiAppEvent_DestroyParamList(list);
48  * </pre>
49  *
50  * @since 8
51  * @version 1.0
52  */
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 /**
58  * @brief Preset param name, user id param.
59  *
60  * @since 8
61  * @version 1.0
62  */
63 #define PARAM_USER_ID "user_id"
64 
65 /**
66  * @brief Preset param name, distributed service name param.
67  *
68  * @since 8
69  * @version 1.0
70  */
71 #define PARAM_DISTRIBUTED_SERVICE_NAME "ds_name"
72 
73 /**
74  * @brief Preset param name, distributed service instance id param.
75  *
76  * @since 8
77  * @version 1.0
78  */
79 #define PARAM_DISTRIBUTED_SERVICE_INSTANCE_ID "ds_instance_id"
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 /** @} */
85 #endif // HIVIEWDFX_HIAPPEVENT_PARAM_H