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 * @kit PerformanceAnalysisKit 30 * @syscap SystemCapability.HiviewDFX.HiAppEvent 31 * 32 * @since 8 33 * @version 1.0 34 */ 35 36 /** 37 * @file hiappevent_param.h 38 * 39 * @brief Defines the param names of all predefined events. 40 * 41 * In addition to custom events associated with specific apps, you can also use predefined events for logging. 42 * 43 * Sample code: 44 * <pre> 45 * ParamList list = OH_HiAppEvent_CreateParamList(); 46 * OH_HiAppEvent_AddInt32Param(list, PARAM_USER_ID, 123); 47 * int res = OH_HiAppEvent_Write("user_domain", EVENT_USER_LOGIN, BEHAVIOR, list); 48 * OH_HiAppEvent_DestroyParamList(list); 49 * </pre> 50 * 51 * @since 8 52 * @version 1.0 53 */ 54 #ifdef __cplusplus 55 extern "C" { 56 #endif 57 58 /** 59 * @brief Preset param name, user id param. 60 * 61 * @since 8 62 * @version 1.0 63 */ 64 #define PARAM_USER_ID "user_id" 65 66 /** 67 * @brief Preset param name, distributed service name param. 68 * 69 * @since 8 70 * @version 1.0 71 */ 72 #define PARAM_DISTRIBUTED_SERVICE_NAME "ds_name" 73 74 /** 75 * @brief Preset param name, distributed service instance id param. 76 * 77 * @since 8 78 * @version 1.0 79 */ 80 #define PARAM_DISTRIBUTED_SERVICE_INSTANCE_ID "ds_instance_id" 81 82 #ifdef __cplusplus 83 } 84 #endif 85 /** @} */ 86 #endif // HIVIEWDFX_HIAPPEVENT_PARAM_H