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