• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# hiappevent_event.h
2
3
4## Overview
5
6Defines the names of all predefined events.
7
8In addition to custom events associated with specific applications, you can use predefined events for logging.
9
10Example:
11
12```
13ParamList list = OH_HiAppEvent_CreateParamList();
14OH_HiAppEvent_AddInt32Param(list, PARAM_USER_ID, 123);
15int res = OH_HiAppEvent_Write("user_domain", EVENT_USER_LOGIN, BEHAVIOR, list);
16OH_HiAppEvent_DestroyParamList(list);
17```
18
19**File to include**: <hiappevent/hiappevent_event.h>
20
21**Library**: libhiappevent_ndk.z.so
22
23**System capability**: SystemCapability.HiviewDFX.HiAppEvent
24
25**Since**: 8
26
27**Related module**: [HiAppEvent](_hi_app_event.md)
28
29
30## Summary
31
32
33### Macros
34
35| Name| Description|
36| -------- | -------- |
37| [EVENT_USER_LOGIN](_hi_app_event.md#event_user_login)&nbsp;&nbsp;&nbsp;"hiappevent.user_login" | User login event. |
38| [EVENT_USER_LOGOUT](_hi_app_event.md#event_user_logout)&nbsp;&nbsp;&nbsp;"hiappevent.user_logout" | User logout event. |
39| [EVENT_DISTRIBUTED_SERVICE_START](_hi_app_event.md#event_distributed_service_start)&nbsp;&nbsp;&nbsp;"hiappevent.distributed_service_start" | Distributed service event. |
40| [EVENT_APP_CRASH](_hi_app_event.md#event_app_crash)&nbsp;&nbsp;&nbsp;"APP_CRASH" | Application crash event. |
41| [EVENT_APP_FREEZE](_hi_app_event.md#event_app_freeze)&nbsp;&nbsp;&nbsp;"APP_FREEZE" | Application freeze event. |
42| [EVENT_APP_LAUNCH](_hi_app_event.md#event_app_launch)&nbsp;&nbsp;&nbsp;"APP_LAUNCH" | Application loading event. |
43| [EVENT_SCROLL_JANK](_hi_app_event.md#event_scroll_jank)&nbsp;&nbsp;&nbsp;"SCROLL_JANK" | Event indicating application freeze during swiping. |
44| [EVENT_CPU_USAGE_HIGH](_hi_app_event.md#event_cpu_usage_high)&nbsp;&nbsp;&nbsp;"CPU_USAGE_HIGH" | Event indicating high CPU usage of an application. |
45| [EVENT_BATTERY_USAGE](_hi_app_event.md#event_battery_usage)&nbsp;&nbsp;&nbsp;"BATTERY_USAGE" | Application power usage event. |
46| [EVENT_RESOURCE_OVERLIMIT](_hi_app_event.md#event_resource_overlimit)&nbsp;&nbsp;&nbsp;"RESOURCE_OVERLIMIT" | Application resource threshold-crossing event. |
47| [DOMAIN_OS](_hi_app_event.md#domain_os)&nbsp;&nbsp;&nbsp;"OS" | OS scope. |
48