1e41f4b71Sopenharmony_ci# CommonEvent 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Overview 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciDescribes the common event capabilities provided by the **CommonEvent** for applications. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Notification.CommonEvent 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci**Since**: 12 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci## Summary 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci### Files 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci| Name| Description| 19e41f4b71Sopenharmony_ci| -------- | -------- | 20e41f4b71Sopenharmony_ci| [oh_commonevent.h](oh_commonevent_8h.md) | Defines the APIs for subscribing to and unsubscribing from common events.<br>**File to include**: <BasicServicesKit/oh_commonevent.h><br>**Library**: libohcommonevent.so| 21e41f4b71Sopenharmony_ci| [oh_commonevent_support.h](oh_commonevent_support_8h.md) | Provides common event constants defined by the system.<br>**File to include**: <BasicServicesKit/oh_commonevent_support.h><br>**Library**: libohcommonevent.so| 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci### Types 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci| Name| Description| 27e41f4b71Sopenharmony_ci| -------- | -------- | 28e41f4b71Sopenharmony_ci|[CommonEvent_SubscribeInfo](#commonevent_subscribeinfo) | Defines the subscriber information.| 29e41f4b71Sopenharmony_ci|[CommonEvent_Subscriber](#commonevent_subscriber) | Defines a subscriber.| 30e41f4b71Sopenharmony_ci|[CommonEvent_RcvData](#commonevent_rcvdata) | Defines the callback data of a common event.| 31e41f4b71Sopenharmony_ci|[CommonEvent_Parameters](#commonevent_parameters) | Defines the additional information about a common event.| 32e41f4b71Sopenharmony_ci|[CommonEvent_ReceiveCallback](#commonevent_receivecallback)| Defines the callback function of a common event.| 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci### Enums 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci| Name| Description| 37e41f4b71Sopenharmony_ci| -------- | -------- | 38e41f4b71Sopenharmony_ci| [CommonEvent_ErrCode](#commonevent_errcode) | Enumerates the error codes.| 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci### Functions 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci| Name| Description| 44e41f4b71Sopenharmony_ci| -------- | -------- | 45e41f4b71Sopenharmony_ci| [OH_CommonEvent_CreateSubscribeInfo](#oh_commonevent_createsubscribeinfo)| Creates the subscriber information.| 46e41f4b71Sopenharmony_ci| [OH_CommonEvent_SetPublisherPermission](#oh_commonevent_setpublisherpermission) | Sets the subscriber permission.| 47e41f4b71Sopenharmony_ci| [OH_CommonEvent_SetPublisherBundleName](#oh_commonevent_setpublisherbundlename) | Sets a bundle name of the subscriber.| 48e41f4b71Sopenharmony_ci| [OH_CommonEvent_DestroySubscribeInfo](#oh_commonevent_destroysubscribeinfo) | Destroys the subscriber information.| 49e41f4b71Sopenharmony_ci| [OH_CommonEvent_CreateSubscriber](#oh_commonevent_createsubscriber)| Creates a subscriber.| 50e41f4b71Sopenharmony_ci| [OH_CommonEvent_DestroySubscriber](#oh_commonevent_destroysubscriber) | Destroys a subscriber.| 51e41f4b71Sopenharmony_ci| [OH_CommonEvent_Subscribe](#oh_commonevent_subscribe) | Subscribes to a common event.| 52e41f4b71Sopenharmony_ci| [OH_CommonEvent_UnSubscribe](#oh_commonevent_unsubscribe) | Unsubscribes from a common event.| 53e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetEventFromRcvData](#oh_commonevent_geteventfromrcvdata)| Obtains the name of a common event.| 54e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetCodeFromRcvData](#oh_commonevent_getcodefromrcvdata) | Obtains the result code of a common event.| 55e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetDataStrFromRcvData](#oh_commonevent_getdatastrfromrcvdata)| Obtains the custom result data of a common event.| 56e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetBundleNameFromRcvData](#oh_commonevent_getbundlenamefromrcvdata)| Obtains the bundle name of a common event.| 57e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetParametersFromRcvData](#oh_commonevent_getparametersfromrcvdata) | Obtains the additional information about a common event.| 58e41f4b71Sopenharmony_ci| [OH_CommonEvent_HasKeyInParameters](#oh_commonevent_haskeyinparameters) | Checks whether the additional information of a common event contains a key-value pair.| 59e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetIntFromParameters](#oh_commonevent_getintfromparameters) | Obtains the **int** data information from the additional information of a common event.| 60e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetIntArrayFromParameters](#oh_commonevent_getintarrayfromparameters)| Obtains the **int** array information from the additional information of a common event.| 61e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetLongFromParameters](#oh_commonevent_getlongfromparameters)| Obtains the **long** data information from the additional information of a common event.| 62e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetLongArrayFromParameters](#oh_commonevent_getlongarrayfromparameters)| Obtains the **long** array information from the additional information of a common event.| 63e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetBoolFromParameters](#oh_commonevent_getboolfromparameters)| Obtains the **bool** data information from the additional information of a common event.| 64e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetBoolArrayFromParameters](#oh_commonevent_getboolarrayfromparameters)| Obtains the **bool** array information from the additional information of a common event.| 65e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetCharFromParameters](#oh_commonevent_getcharfromparameters)| Obtains the **char** data from the additional information of a common event.| 66e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetCharArrayFromParameters](#oh_commonevent_getchararrayfromparameters)| Obtains the **char** array information from the additional information of a common event.| 67e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetDoubleFromParameters](#oh_commonevent_getdoublefromparameters)| Obtains the **double** data information from the additional information of a common event.| 68e41f4b71Sopenharmony_ci| [OH_CommonEvent_GetDoubleArrayFromParameters](#oh_commonevent_getdoublearrayfromparameters)| Obtains the **double** array information from the additional information of a common event.| 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci### Constants 71e41f4b71Sopenharmony_ci| Name| Description| 72e41f4b71Sopenharmony_ci| -------- | -------- | 73e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SHUTDOWN](#common_event_shutdown) = "usual.event.SHUTDOWN" | Indicates the common event that the device is being shut down and the final shutdown will proceed.| 74e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_BATTERY_CHANGED](#common_event_battery_changed) = "usual.event.BATTERY_CHANGED" | Indicates the common event that the charging state, level, and other information about the battery have changed.| 75e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_BATTERY_LOW](#common_event_battery_low) = "usual.event.BATTERY_LOW"|Indicates the common event that the battery level is low.| 76e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_BATTERY_OKAY](#common_event_battery_okay) = "usual.event.BATTERY_OKAY"|Indicates the common event that the battery exits the low state.| 77e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_POWER_CONNECTED](#common_event_power_connected) = "usual.event.POWER_CONNECTED"|Indicates the common event that the device is connected to an external power supply.| 78e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_POWER_DISCONNECTED](#common_event_power_disconnected) = "usual.event.POWER_DISCONNECTED"|Indicates the common event that the device is disconnected from the external power supply.| 79e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SCREEN_OFF](#common_event_screen_off) = "usual.event.SCREEN_OFF"| Indicates the common event that the device screen is off and the device is sleeping.| 80e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SCREEN_ON](#common_event_screen_on) = "usual.event.SCREEN_ON"|Indicates the common event that the device screen is on and the device is in interactive state.| 81e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_THERMAL_LEVEL_CHANGED](#common_event_thermal_level_changed) = "usual.event.THERMAL_LEVEL_CHANGED"|Indicates the common event that the device's thermal level has changed.| 82e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_TIME_TICK](#common_event_time_tick) = "usual.event.TIME_TICK"|Indicates the common event that the system time has changed.| 83e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_TIME_CHANGED](#common_event_time_changed) = "usual.event.TIME_CHANGED"|Indicates the common event that the system time has changed.| 84e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_TIMEZONE_CHANGED](#common_event_timezone_changed) = "usual.event.TIMEZONE_CHANGED"|Indicates the common event that the system time zone has changed.| 85e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_ADDED](#common_event_package_added) = "usual.event.PACKAGE_ADDED"| Indicates the common event that a new application package has been installed on the device.| 86e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_REMOVED](#common_event_package_removed) = "usual.event.PACKAGE_REMOVED"| Indicates the common event that an installed application has been uninstalled from the device with the application data retained.| 87e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_BUNDLE_REMOVED](#common_event_bundle_removed) = "usual.event.BUNDLE_REMOVED"| Indicates the common event that an installed bundle has been uninstalled from the device with the application data retained.| 88e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_FULLY_REMOVED](#common_event_package_fully_removed) = "usual.event.PACKAGE_FULLY_REMOVED"|Indicates the common event that an installed application, including both the application data and code, has been completely uninstalled from the device.| 89e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_CHANGED](#common_event_package_changed) = "usual.event.PACKAGE_CHANGED"| Indicates the common event that an application package has been changed (for example, a component in the package has been enabled or disabled).| 90e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_RESTARTED](#common_event_package_restarted) = "usual.event.PACKAGE_RESTARTED"| Indicates a common event that a user restarts an application package and kills all its processes.| 91e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_DATA_CLEARED](#common_event_package_data_cleared) = "usual.event.PACKAGE_DATA_CLEARED"| Indicates the common event that the user has cleared the application package data.| 92e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGE_CACHE_CLEARED](#common_event_package_cache_cleared) = "usual.event.PACKAGE_CACHE_CLEARED"|Indicates the common event that the user has cleared the application package data cache.| 93e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_PACKAGES_SUSPENDED](#common_event_packages_suspended) = "usual.event.PACKAGES_SUSPENDED"|Indicates the common event that application packages have been suspended.| 94e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_MY_PACKAGE_SUSPENDED](#common_event_my_package_suspended) = "usual.event.MY_PACKAGE_SUSPENDED"| Indicates the common event that application packages are suspended.| 95e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_MY_PACKAGE_UNSUSPENDED](#common_event_my_package_unsuspended) = "usual.event.MY_PACKAGE_UNSUSPENDED"| Indicates the common event that application packages have not been suspended.| 96e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_LOCALE_CHANGED](#common_event_locale_changed) = "usual.event.LOCALE_CHANGED"| Indicates the common event that the device locale has changed.| 97e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_MANAGE_PACKAGE_STORAGE](#common_event_manage_package_storage) = "usual.event.MANAGE_PACKAGE_STORAGE"| Indicates the common event that the device storage is insufficient.| 98e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_USER_UNLOCKED](#common_event_user_unlocked) = "usual.event.USER_UNLOCKED"| Indicates the common event that the credential-encrypted storage has become unlocked for the current user when the device is unlocked after being restarted.| 99e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT](#common_event_distributed_account_logout) = "common.event.DISTRIBUTED_ACCOUNT_LOGOUT"|Indicates the common event that a distributed account is successfully logged out.| 100e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID](#common_event_distributed_account_token_invalid) = "common.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID"|Indicates the common event that the token of a distributed account is invalid.| 101e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF](#common_event_distributed_account_logoff) = "common.event.DISTRIBUTED_ACCOUNT_LOGOFF"| Indicates the common event that a distributed account is deregistered.| 102e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_POWER_STATE](#common_event_wifi_power_state) = "usual.event.wifi.POWER_STATE"| Indicates the common event that the Wi-Fi state has changed, for example, enabled or disabled.| 103e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_SCAN_FINISHED](#common_event_wifi_scan_finished) = "usual.event.wifi.SCAN_FINISHED"|Indicates the common event that the Wi-Fi access point has been scanned and proven to be available.| 104e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_RSSI_VALUE](#common_event_wifi_rssi_value) = "usual.event.wifi.RSSI_VALUE"|Indicates the common event that the Wi-Fi signal strength (RSSI) has changed.| 105e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_CONN_STATE](#common_event_wifi_conn_state) = "usual.event.wifi.CONN_STATE"| Indicates the common event that the Wi-Fi connection state has changed.| 106e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_HOTSPOT_STATE](#common_event_wifi_hotspot_state) = "usual.event.wifi.HOTSPOT_STATE"| Indicates the common event that the Wi-Fi hotspot state has changed, for example, enabled or disabled.| 107e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_AP_STA_JOIN](#common_event_wifi_ap_sta_join) = "usual.event.wifi.WIFI_HS_STA_JOIN"| Indicates the common event that a client has joined the Wi-Fi hotspot of the current device.| 108e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_AP_STA_LEAVE](#common_event_wifi_ap_sta_leave) = "usual.event.wifi.WIFI_HS_STA_LEAVE"|Indicates the common event that a client has disconnected from the Wi-Fi hotspot of the current device.| 109e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE](#common_event_wifi_mplink_state_change) = "usual.event.wifi.mplink.STATE_CHANGE"|Indicates the common event that the state of MPLINK (an enhanced Wi-Fi feature) has changed.| 110e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_P2P_CONN_STATE](#common_event_wifi_p2p_conn_state) = "usual.event.wifi.p2p.CONN_STATE_CHANGE"|Indicates the common event that the Wi-Fi P2P connection state has changed.| 111e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_P2P_STATE_CHANGED](#common_event_wifi_p2p_state_changed) = "usual.event.wifi.p2p.STATE_CHANGE"|Indicates the common event that the Wi-Fi P2P state has changed, for example, enabled or disabled.| 112e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED](#common_event_wifi_p2p_peers_state_changed) = "usual.event.wifi.p2p.DEVICES_CHANGE"|Indicates the common event that the state of the Wi-Fi P2P peer device has changed.| 113e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED](#common_event_wifi_p2p_peers_discovery_state_changed) = "usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE"|Indicates the common event that the Wi-Fi P2P discovery state has changed.| 114e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED](#common_event_wifi_p2p_current_device_state_changed) = "usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE"|Indicates the common event that the state of the Wi-Fi P2P local device has changed.| 115e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED](#common_event_wifi_p2p_group_state_changed) = "usual.event.wifi.p2p.GROUP_STATE_CHANGED"|Indicates the common event that the Wi-Fi P2P group information has changed.| 116e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED](#common_event_nfc_action_adapter_state_changed) = "usual.event.nfc.action.ADAPTER_STATE_CHANGED"| Indicates the common event that the state of the device NFC adapter has changed.| 117e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED](#common_event_nfc_action_rf_field_on_detected) = "usual.event.nfc.action.RF_FIELD_ON_DETECTED"|Indicates the common event that the NFC RF field is on.| 118e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED](#common_event_nfc_action_rf_field_off_detected) = "usual.event.nfc.action.RF_FIELD_OFF_DETECTED"|Indicates the common event that the NFC RF field is off.| 119e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_DISCHARGING](#common_event_discharging) = "usual.event.DISCHARGING"| Indicates the common event that the system stops charging the battery.| 120e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_CHARGING](#common_event_charging) = "usual.event.CHARGING"|Indicates a common event that the system starts charging the battery.| 121e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED](#common_event_device_idle_mode_changed) = "usual.event.DEVICE_IDLE_MODE_CHANGED"| Indicates the common event that the system standby mode has changed.| 122e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED](#common_event_charge_idle_mode_changed) = "usual.event.CHARGE_IDLE_MODE_CHANGED"|Indicates the common event that the device enters the charging idle mode.| 123e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_POWER_SAVE_MODE_CHANGED](#common_event_power_save_mode_changed) = "usual.event.POWER_SAVE_MODE_CHANGED"|Indicates the common event that the system power saving mode is changed.| 124e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_USB_STATE](#common_event_usb_state) = "usual.event.hardware.usb.action.USB_STATE"|Indicates the common event that the USB device state has changed.| 125e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_USB_PORT_CHANGED](#common_event_usb_port_changed) = "usual.event.hardware.usb.action.USB_PORT_CHANGED"|Indicates the common event that the USB port state of the user device has changed.| 126e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_USB_DEVICE_ATTACHED](#common_event_usb_device_attached) = "usual.event.hardware.usb.action.USB_DEVICE_ATTACHED"|Indicates the common event that a USB device has been attached when the user device functions as a USB host.| 127e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_USB_DEVICE_DETACHED](#common_event_usb_device_detached) = "usual.event.hardware.usb.action.USB_DEVICE_DETACHED"|Indicates the common event that a USB device has been detached when the user device functions as a USB host.| 128e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_AIRPLANE_MODE_CHANGED](#common_event_airplane_mode_changed) = "usual.event.AIRPLANE_MODE"| Indicates the common event that the airplane mode of the device has changed.| 129e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SPLIT_SCREEN](#common_event_split_screen) = "common.event.SPLIT_SCREEN"| Indicates the common event of screen splitting.| 130e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_QUICK_FIX_APPLY_RESULT](#common_event_quick_fix_apply_result) = "usual.event.QUICK_FIX_APPLY_RESULT"| Indicates the common event that a quick fix is applied to an application.| 131e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_QUICK_FIX_REVOKE_RESULT](#common_event_quick_fix_revoke_result) = "usual.event.QUICK_FIX_REVOKE_RESULT"| Indicates the common event that a quick fix is canceled.| 132e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_USER_INFO_UPDATED](#common_event_user_info_updated) = "usual.event.USER_INFO_UPDATED"| Indicates the common event that the user information has been updated.| 133e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SIM_STATE_CHANGED](#common_event_sim_state_changed) = "usual.event.SIM_STATE_CHANGED"|Indicates the common event that the SIM card state has been updated.| 134e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_CALL_STATE_CHANGED](#common_event_call_state_changed) = "usual.event.CALL_STATE_CHANGED"| Indicates the common event that the call state has been updated.| 135e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_NETWORK_STATE_CHANGED](#common_event_network_state_changed) = "usual.event.NETWORK_STATE_CHANGED"| Indicates the common event that the network state has been updated.| 136e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SIGNAL_INFO_CHANGED](#common_event_signal_info_changed) = "usual.event.SIGNAL_INFO_CHANGED"|Indicates the common event that the signal information has been updated.| 137e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SCREEN_UNLOCKED](#common_event_screen_unlocked) = "usual.event.SCREEN_UNLOCKED"|Indicates the common event that the screen has been unlocked.| 138e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_SCREEN_LOCKED](#common_event_screen_locked) = "usual.event.SCREEN_LOCKED"| Indicates the common event that the screen has been locked.| 139e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_HTTP_PROXY_CHANGE](#common_event_http_proxy_change) = "usual.event.HTTP_PROXY_CHANGE"| Indicates the common event that the HTTP proxy configuration has changed.| 140e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_CONNECTIVITY_CHANGE](#common_event_connectivity_change) = "usual.event.CONNECTIVITY_CHANGE"| Indicates the common event that the network connection state has changed.| 141e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_MINORSMODE_ON](#common_event_minorsmode_on) = "usual.event.MINORSMODE_ON"|Indicates the common event that the minor mode is enabled.| 142e41f4b71Sopenharmony_ci|static const char* const [COMMON_EVENT_MINORSMODE_OFF](#common_event_minorsmode_off) = "usual.event.MINORSMODE_OFF"| Indicates the common event that the minor mode is disabled.| 143e41f4b71Sopenharmony_ci## Type Description 144e41f4b71Sopenharmony_ci 145e41f4b71Sopenharmony_ci### CommonEvent_SubscribeInfo 146e41f4b71Sopenharmony_ci 147e41f4b71Sopenharmony_ci```c 148e41f4b71Sopenharmony_citypedef struct CommonEvent_SubscribeInfo CommonEvent_SubscribeInfo 149e41f4b71Sopenharmony_ci``` 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci**Description** 152e41f4b71Sopenharmony_ci 153e41f4b71Sopenharmony_ciDefines the subscriber information. 154e41f4b71Sopenharmony_ci 155e41f4b71Sopenharmony_ci**Since**: 12 156e41f4b71Sopenharmony_ci 157e41f4b71Sopenharmony_ci### CommonEvent_Subscriber 158e41f4b71Sopenharmony_ci 159e41f4b71Sopenharmony_ci```c 160e41f4b71Sopenharmony_citypedef void CommonEvent_Subscriber 161e41f4b71Sopenharmony_ci``` 162e41f4b71Sopenharmony_ci 163e41f4b71Sopenharmony_ci**Description** 164e41f4b71Sopenharmony_ci 165e41f4b71Sopenharmony_ciDefines a subscriber. 166e41f4b71Sopenharmony_ci 167e41f4b71Sopenharmony_ci**Since**: 12 168e41f4b71Sopenharmony_ci 169e41f4b71Sopenharmony_ci### CommonEvent_RcvData 170e41f4b71Sopenharmony_ci 171e41f4b71Sopenharmony_ci```c 172e41f4b71Sopenharmony_citypedef struct CommonEvent_RcvData CommonEvent_RcvData 173e41f4b71Sopenharmony_ci``` 174e41f4b71Sopenharmony_ci 175e41f4b71Sopenharmony_ci**Description** 176e41f4b71Sopenharmony_ci 177e41f4b71Sopenharmony_ciDefines the callback data of a common event. 178e41f4b71Sopenharmony_ci 179e41f4b71Sopenharmony_ci**Since**: 12 180e41f4b71Sopenharmony_ci 181e41f4b71Sopenharmony_ci### CommonEvent_Parameters 182e41f4b71Sopenharmony_ci 183e41f4b71Sopenharmony_ci```c 184e41f4b71Sopenharmony_citypedef struct CommonEvent_Parameters CommonEvent_Parameters 185e41f4b71Sopenharmony_ci``` 186e41f4b71Sopenharmony_ci 187e41f4b71Sopenharmony_ci**Description** 188e41f4b71Sopenharmony_ci 189e41f4b71Sopenharmony_ciDefines the additional information about a common event. 190e41f4b71Sopenharmony_ci 191e41f4b71Sopenharmony_ci**Since**: 12 192e41f4b71Sopenharmony_ci 193e41f4b71Sopenharmony_ci### CommonEvent_ReceiveCallback 194e41f4b71Sopenharmony_ci 195e41f4b71Sopenharmony_ci```c 196e41f4b71Sopenharmony_citypedef void (*CommonEvent_ReceiveCallback)(const [CommonEvent_RcvData](#commonevent_rcvdata) *data) 197e41f4b71Sopenharmony_ci``` 198e41f4b71Sopenharmony_ci 199e41f4b71Sopenharmony_ci**Description** 200e41f4b71Sopenharmony_ci 201e41f4b71Sopenharmony_ciDefines the callback function of a common event. 202e41f4b71Sopenharmony_ci 203e41f4b71Sopenharmony_ci**Since**: 12 204e41f4b71Sopenharmony_ci 205e41f4b71Sopenharmony_ci 206e41f4b71Sopenharmony_ci## Enum Description 207e41f4b71Sopenharmony_ci 208e41f4b71Sopenharmony_ci### CommonEvent_ErrCode 209e41f4b71Sopenharmony_ci**Description** 210e41f4b71Sopenharmony_ci 211e41f4b71Sopenharmony_ciEnumerates the error codes. 212e41f4b71Sopenharmony_ci 213e41f4b71Sopenharmony_ci**Since**: 12 214e41f4b71Sopenharmony_ci 215e41f4b71Sopenharmony_ci| Value| Description| 216e41f4b71Sopenharmony_ci| -------- | -------- | 217e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_OK = 0 |The operation is successful.| 218e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_PERMISSION_ERROR = 201 |Permission denied.| 219e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_INVALID_PARAMETER = 401 |Invalid parameter.| 220e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_SENDING_REQUEST_FAILED = 1500007 |Failed to send an IPC request.| 221e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_INIT_UNDONE = 1500008|The service is not initialized.| 222e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_SUBSCRIBER_NUM_EXCEEDED = 1500010|The number of subscribers exceeds 200.| 223e41f4b71Sopenharmony_ci| COMMONEVENT_ERR_ALLOC_MEMORY_FAILED = 1500011|The system failed to allocate memory.| 224e41f4b71Sopenharmony_ci 225e41f4b71Sopenharmony_ci## Constant Description 226e41f4b71Sopenharmony_ci 227e41f4b71Sopenharmony_ci### COMMON_EVENT_SHUTDOWN 228e41f4b71Sopenharmony_ci 229e41f4b71Sopenharmony_ci```c 230e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SHUTDOWN = "usual.event.SHUTDOWN" 231e41f4b71Sopenharmony_ci``` 232e41f4b71Sopenharmony_ci 233e41f4b71Sopenharmony_ci**Description** 234e41f4b71Sopenharmony_ci 235e41f4b71Sopenharmony_ciIndicates the common event that the device is being shut down and the final shutdown will proceed. 236e41f4b71Sopenharmony_ci 237e41f4b71Sopenharmony_ci**Since**: 12 238e41f4b71Sopenharmony_ci 239e41f4b71Sopenharmony_ci### COMMON_EVENT_BATTERY_CHANGED 240e41f4b71Sopenharmony_ci 241e41f4b71Sopenharmony_ci```c 242e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_BATTERY_CHANGED = "usual.event.BATTERY_CHANGED" 243e41f4b71Sopenharmony_ci``` 244e41f4b71Sopenharmony_ci 245e41f4b71Sopenharmony_ci**Description** 246e41f4b71Sopenharmony_ci 247e41f4b71Sopenharmony_ciIndicates the common event that the charging state, level, and other information about the battery have changed. 248e41f4b71Sopenharmony_ci 249e41f4b71Sopenharmony_ci**Since**: 12 250e41f4b71Sopenharmony_ci 251e41f4b71Sopenharmony_ci### COMMON_EVENT_BATTERY_LOW 252e41f4b71Sopenharmony_ci 253e41f4b71Sopenharmony_ci```c 254e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_BATTERY_LOW = "usual.event.BATTERY_LOW" 255e41f4b71Sopenharmony_ci``` 256e41f4b71Sopenharmony_ci 257e41f4b71Sopenharmony_ci**Description** 258e41f4b71Sopenharmony_ci 259e41f4b71Sopenharmony_ciIndicates the common event that the battery level is low. 260e41f4b71Sopenharmony_ci 261e41f4b71Sopenharmony_ci**Since**: 12 262e41f4b71Sopenharmony_ci 263e41f4b71Sopenharmony_ci### COMMON_EVENT_BATTERY_OKAY 264e41f4b71Sopenharmony_ci 265e41f4b71Sopenharmony_ci```c 266e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_BATTERY_OKAY = "usual.event.BATTERY_OKAY" 267e41f4b71Sopenharmony_ci``` 268e41f4b71Sopenharmony_ci 269e41f4b71Sopenharmony_ci**Description** 270e41f4b71Sopenharmony_ci 271e41f4b71Sopenharmony_ciIndicates the common event that the battery exits the low state. 272e41f4b71Sopenharmony_ci 273e41f4b71Sopenharmony_ci**Since**: 12 274e41f4b71Sopenharmony_ci 275e41f4b71Sopenharmony_ci### COMMON_EVENT_POWER_CONNECTED 276e41f4b71Sopenharmony_ci 277e41f4b71Sopenharmony_ci```c 278e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_POWER_CONNECTED = "usual.event.POWER_CONNECTED" 279e41f4b71Sopenharmony_ci``` 280e41f4b71Sopenharmony_ci 281e41f4b71Sopenharmony_ci**Description** 282e41f4b71Sopenharmony_ci 283e41f4b71Sopenharmony_ciIndicates the common event that the device is connected to an external power supply. 284e41f4b71Sopenharmony_ci 285e41f4b71Sopenharmony_ci**Since**: 12 286e41f4b71Sopenharmony_ci 287e41f4b71Sopenharmony_ci### COMMON_EVENT_POWER_DISCONNECTED 288e41f4b71Sopenharmony_ci 289e41f4b71Sopenharmony_ci```c 290e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_POWER_DISCONNECTED = "usual.event.POWER_DISCONNECTED" 291e41f4b71Sopenharmony_ci``` 292e41f4b71Sopenharmony_ci 293e41f4b71Sopenharmony_ci**Description** 294e41f4b71Sopenharmony_ci 295e41f4b71Sopenharmony_ciIndicates the common event that the device is disconnected from the external power supply. 296e41f4b71Sopenharmony_ci 297e41f4b71Sopenharmony_ci**Since**: 12 298e41f4b71Sopenharmony_ci 299e41f4b71Sopenharmony_ci### COMMON_EVENT_SCREEN_OFF 300e41f4b71Sopenharmony_ci 301e41f4b71Sopenharmony_ci```c 302e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF" 303e41f4b71Sopenharmony_ci``` 304e41f4b71Sopenharmony_ci 305e41f4b71Sopenharmony_ci**Description** 306e41f4b71Sopenharmony_ci 307e41f4b71Sopenharmony_ciIndicates the common event that the device screen is off and the device is sleeping. 308e41f4b71Sopenharmony_ci 309e41f4b71Sopenharmony_ci**Since**: 12 310e41f4b71Sopenharmony_ci 311e41f4b71Sopenharmony_ci### COMMON_EVENT_SCREEN_ON 312e41f4b71Sopenharmony_ci 313e41f4b71Sopenharmony_ci```c 314e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON" 315e41f4b71Sopenharmony_ci``` 316e41f4b71Sopenharmony_ci 317e41f4b71Sopenharmony_ci**Description** 318e41f4b71Sopenharmony_ci 319e41f4b71Sopenharmony_ciIndicates the common event that the device screen is on and the device is in interactive state. 320e41f4b71Sopenharmony_ci 321e41f4b71Sopenharmony_ci**Since**: 12 322e41f4b71Sopenharmony_ci 323e41f4b71Sopenharmony_ci### COMMON_EVENT_THERMAL_LEVEL_CHANGED 324e41f4b71Sopenharmony_ci 325e41f4b71Sopenharmony_ci```c 326e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED" 327e41f4b71Sopenharmony_ci``` 328e41f4b71Sopenharmony_ci 329e41f4b71Sopenharmony_ci**Description** 330e41f4b71Sopenharmony_ci 331e41f4b71Sopenharmony_ciIndicates the common event that the device's thermal level has changed. 332e41f4b71Sopenharmony_ci 333e41f4b71Sopenharmony_ci**Since**: 12 334e41f4b71Sopenharmony_ci 335e41f4b71Sopenharmony_ci### COMMON_EVENT_TIME_TICK 336e41f4b71Sopenharmony_ci 337e41f4b71Sopenharmony_ci```c 338e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_TIME_TICK = "usual.event.TIME_TICK" 339e41f4b71Sopenharmony_ci``` 340e41f4b71Sopenharmony_ci 341e41f4b71Sopenharmony_ci**Description** 342e41f4b71Sopenharmony_ci 343e41f4b71Sopenharmony_ciIndicates the common event that the device's thermal level has changed. 344e41f4b71Sopenharmony_ci 345e41f4b71Sopenharmony_ci**Since**: 12 346e41f4b71Sopenharmony_ci 347e41f4b71Sopenharmony_ci### COMMON_EVENT_TIME_CHANGED 348e41f4b71Sopenharmony_ci 349e41f4b71Sopenharmony_ci```c 350e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_TIME_CHANGED = "usual.event.TIME_CHANGED" 351e41f4b71Sopenharmony_ci``` 352e41f4b71Sopenharmony_ci 353e41f4b71Sopenharmony_ci**Description** 354e41f4b71Sopenharmony_ci 355e41f4b71Sopenharmony_ciIndicates the common event that the system time has changed. 356e41f4b71Sopenharmony_ci 357e41f4b71Sopenharmony_ci**Since**: 12 358e41f4b71Sopenharmony_ci 359e41f4b71Sopenharmony_ci### COMMON_EVENT_TIMEZONE_CHANGED 360e41f4b71Sopenharmony_ci 361e41f4b71Sopenharmony_ci```c 362e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_TIMEZONE_CHANGED = "usual.event.TIMEZONE_CHANGED" 363e41f4b71Sopenharmony_ci``` 364e41f4b71Sopenharmony_ci 365e41f4b71Sopenharmony_ci**Description** 366e41f4b71Sopenharmony_ci 367e41f4b71Sopenharmony_ciIndicates the common event that the system time zone has changed. 368e41f4b71Sopenharmony_ci 369e41f4b71Sopenharmony_ci**Since**: 12 370e41f4b71Sopenharmony_ci 371e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_ADDED 372e41f4b71Sopenharmony_ci 373e41f4b71Sopenharmony_ci```c 374e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_ADDED = "usual.event.PACKAGE_ADDED" 375e41f4b71Sopenharmony_ci``` 376e41f4b71Sopenharmony_ci 377e41f4b71Sopenharmony_ci**Description** 378e41f4b71Sopenharmony_ci 379e41f4b71Sopenharmony_ciIndicates the common event that a new application package has been installed on the device. 380e41f4b71Sopenharmony_ci 381e41f4b71Sopenharmony_ci**Since**: 12 382e41f4b71Sopenharmony_ci 383e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_REMOVED 384e41f4b71Sopenharmony_ci 385e41f4b71Sopenharmony_ci```c 386e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_REMOVED = "usual.event.PACKAGE_REMOVED" 387e41f4b71Sopenharmony_ci``` 388e41f4b71Sopenharmony_ci 389e41f4b71Sopenharmony_ci**Description** 390e41f4b71Sopenharmony_ci 391e41f4b71Sopenharmony_ciIndicates the common event that an installed application has been uninstalled from the device with the application data retained. 392e41f4b71Sopenharmony_ci 393e41f4b71Sopenharmony_ci**Since**: 12 394e41f4b71Sopenharmony_ci 395e41f4b71Sopenharmony_ci### COMMON_EVENT_BUNDLE_REMOVED 396e41f4b71Sopenharmony_ci 397e41f4b71Sopenharmony_ci```c 398e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_BUNDLE_REMOVED = "usual.event.BUNDLE_REMOVED" 399e41f4b71Sopenharmony_ci``` 400e41f4b71Sopenharmony_ci 401e41f4b71Sopenharmony_ci**Description** 402e41f4b71Sopenharmony_ci 403e41f4b71Sopenharmony_ciIndicates the common event that an installed bundle has been uninstalled from the device with the application data retained. 404e41f4b71Sopenharmony_ci 405e41f4b71Sopenharmony_ci**Since**: 12 406e41f4b71Sopenharmony_ci 407e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_FULLY_REMOVED 408e41f4b71Sopenharmony_ci 409e41f4b71Sopenharmony_ci```c 410e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_FULLY_REMOVED = "usual.event.PACKAGE_FULLY_REMOVED" 411e41f4b71Sopenharmony_ci``` 412e41f4b71Sopenharmony_ci 413e41f4b71Sopenharmony_ci**Description** 414e41f4b71Sopenharmony_ci 415e41f4b71Sopenharmony_ciIndicates the common event that an installed application, including both the application data and code, has been completely uninstalled from the device. 416e41f4b71Sopenharmony_ci 417e41f4b71Sopenharmony_ci**Since**: 12 418e41f4b71Sopenharmony_ci 419e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_CHANGED 420e41f4b71Sopenharmony_ci 421e41f4b71Sopenharmony_ci```c 422e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_CHANGED = "usual.event.PACKAGE_CHANGED" 423e41f4b71Sopenharmony_ci``` 424e41f4b71Sopenharmony_ci 425e41f4b71Sopenharmony_ci**Description** 426e41f4b71Sopenharmony_ci 427e41f4b71Sopenharmony_ciIndicates the common event that an application package has been changed (for example, a component in the package has been enabled or disabled). 428e41f4b71Sopenharmony_ci 429e41f4b71Sopenharmony_ci**Since**: 12 430e41f4b71Sopenharmony_ci 431e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_RESTARTED 432e41f4b71Sopenharmony_ci 433e41f4b71Sopenharmony_ci```c 434e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_RESTARTED = "usual.event.PACKAGE_RESTARTED" 435e41f4b71Sopenharmony_ci``` 436e41f4b71Sopenharmony_ci 437e41f4b71Sopenharmony_ci**Description** 438e41f4b71Sopenharmony_ci 439e41f4b71Sopenharmony_ciIndicates a common event that a user restarts an application package and kills all its processes. 440e41f4b71Sopenharmony_ci 441e41f4b71Sopenharmony_ci**Since**: 12 442e41f4b71Sopenharmony_ci 443e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_DATA_CLEARED 444e41f4b71Sopenharmony_ci 445e41f4b71Sopenharmony_ci```c 446e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_DATA_CLEARED = "usual.event.PACKAGE_DATA_CLEARED" 447e41f4b71Sopenharmony_ci``` 448e41f4b71Sopenharmony_ci 449e41f4b71Sopenharmony_ci**Description** 450e41f4b71Sopenharmony_ci 451e41f4b71Sopenharmony_ciIndicates the common event that the user has cleared the application package data. 452e41f4b71Sopenharmony_ci 453e41f4b71Sopenharmony_ci**Since**: 12 454e41f4b71Sopenharmony_ci 455e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGE_CACHE_CLEARED 456e41f4b71Sopenharmony_ci 457e41f4b71Sopenharmony_ci```c 458e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGE_CACHE_CLEARED = "usual.event.PACKAGE_CACHE_CLEARED" 459e41f4b71Sopenharmony_ci``` 460e41f4b71Sopenharmony_ci 461e41f4b71Sopenharmony_ci**Description** 462e41f4b71Sopenharmony_ci 463e41f4b71Sopenharmony_ciIndicates the common event that the user has cleared the application package data cache. 464e41f4b71Sopenharmony_ci 465e41f4b71Sopenharmony_ci**Since**: 12 466e41f4b71Sopenharmony_ci 467e41f4b71Sopenharmony_ci### COMMON_EVENT_PACKAGES_SUSPENDED 468e41f4b71Sopenharmony_ci 469e41f4b71Sopenharmony_ci```c 470e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_PACKAGES_SUSPENDED = "usual.event.PACKAGES_SUSPENDED" 471e41f4b71Sopenharmony_ci``` 472e41f4b71Sopenharmony_ci 473e41f4b71Sopenharmony_ci**Description** 474e41f4b71Sopenharmony_ci 475e41f4b71Sopenharmony_ciIndicates the common event that application packages have been suspended. 476e41f4b71Sopenharmony_ci 477e41f4b71Sopenharmony_ci**Since**: 12 478e41f4b71Sopenharmony_ci 479e41f4b71Sopenharmony_ci### COMMON_EVENT_MY_PACKAGE_SUSPENDED 480e41f4b71Sopenharmony_ci 481e41f4b71Sopenharmony_ci```c 482e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_MY_PACKAGE_SUSPENDED = "usual.event.MY_PACKAGE_SUSPENDED" 483e41f4b71Sopenharmony_ci``` 484e41f4b71Sopenharmony_ci 485e41f4b71Sopenharmony_ci**Description** 486e41f4b71Sopenharmony_ci 487e41f4b71Sopenharmony_ciIndicates the common event that application packages are suspended. 488e41f4b71Sopenharmony_ci 489e41f4b71Sopenharmony_ci**Since**: 12 490e41f4b71Sopenharmony_ci 491e41f4b71Sopenharmony_ci### COMMON_EVENT_MY_PACKAGE_UNSUSPENDED 492e41f4b71Sopenharmony_ci 493e41f4b71Sopenharmony_ci```c 494e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_MY_PACKAGE_UNSUSPENDED = "usual.event.MY_PACKAGE_UNSUSPENDED" 495e41f4b71Sopenharmony_ci``` 496e41f4b71Sopenharmony_ci 497e41f4b71Sopenharmony_ci**Description** 498e41f4b71Sopenharmony_ci 499e41f4b71Sopenharmony_ciIndicates the common event that application packages have not been suspended. 500e41f4b71Sopenharmony_ci 501e41f4b71Sopenharmony_ci**Since**: 12 502e41f4b71Sopenharmony_ci 503e41f4b71Sopenharmony_ci### COMMON_EVENT_LOCALE_CHANGED 504e41f4b71Sopenharmony_ci 505e41f4b71Sopenharmony_ci```c 506e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_LOCALE_CHANGED = "usual.event.LOCALE_CHANGED" 507e41f4b71Sopenharmony_ci``` 508e41f4b71Sopenharmony_ci 509e41f4b71Sopenharmony_ci**Description** 510e41f4b71Sopenharmony_ci 511e41f4b71Sopenharmony_ciIndicates the common event that the device locale has changed. 512e41f4b71Sopenharmony_ci 513e41f4b71Sopenharmony_ci**Since**: 12 514e41f4b71Sopenharmony_ci 515e41f4b71Sopenharmony_ci### COMMON_EVENT_MANAGE_PACKAGE_STORAGE 516e41f4b71Sopenharmony_ci 517e41f4b71Sopenharmony_ci```c 518e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_MANAGE_PACKAGE_STORAGE = "usual.event.MANAGE_PACKAGE_STORAGE" 519e41f4b71Sopenharmony_ci``` 520e41f4b71Sopenharmony_ci 521e41f4b71Sopenharmony_ci**Description** 522e41f4b71Sopenharmony_ci 523e41f4b71Sopenharmony_ciIndicates the common event that the device storage is insufficient. 524e41f4b71Sopenharmony_ci 525e41f4b71Sopenharmony_ci**Since**: 12 526e41f4b71Sopenharmony_ci 527e41f4b71Sopenharmony_ci### COMMON_EVENT_USER_UNLOCKED 528e41f4b71Sopenharmony_ci 529e41f4b71Sopenharmony_ci```c 530e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_USER_UNLOCKED = "usual.event.USER_UNLOCKED" 531e41f4b71Sopenharmony_ci``` 532e41f4b71Sopenharmony_ci 533e41f4b71Sopenharmony_ci**Description** 534e41f4b71Sopenharmony_ci 535e41f4b71Sopenharmony_ciIndicates the common event that the credential-encrypted storage has become unlocked for the current user when the device is unlocked after being restarted. 536e41f4b71Sopenharmony_ci 537e41f4b71Sopenharmony_ci**Since**: 12 538e41f4b71Sopenharmony_ci 539e41f4b71Sopenharmony_ci### COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT 540e41f4b71Sopenharmony_ci 541e41f4b71Sopenharmony_ci```c 542e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT = "common.event.DISTRIBUTED_ACCOUNT_LOGOUT" 543e41f4b71Sopenharmony_ci``` 544e41f4b71Sopenharmony_ci 545e41f4b71Sopenharmony_ci**Description** 546e41f4b71Sopenharmony_ci 547e41f4b71Sopenharmony_ciIndicates the common event that a distributed account is successfully logged out. 548e41f4b71Sopenharmony_ci 549e41f4b71Sopenharmony_ci**Since**: 12 550e41f4b71Sopenharmony_ci 551e41f4b71Sopenharmony_ci### COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID 552e41f4b71Sopenharmony_ci 553e41f4b71Sopenharmony_ci```c 554e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID = "common.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID" 555e41f4b71Sopenharmony_ci``` 556e41f4b71Sopenharmony_ci 557e41f4b71Sopenharmony_ci**Description** 558e41f4b71Sopenharmony_ci 559e41f4b71Sopenharmony_ciIndicates the common event that the token of a distributed account is invalid. 560e41f4b71Sopenharmony_ci 561e41f4b71Sopenharmony_ci**Since**: 12 562e41f4b71Sopenharmony_ci 563e41f4b71Sopenharmony_ci### COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF 564e41f4b71Sopenharmony_ci 565e41f4b71Sopenharmony_ci```c 566e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF = "common.event.DISTRIBUTED_ACCOUNT_LOGOFF" 567e41f4b71Sopenharmony_ci``` 568e41f4b71Sopenharmony_ci 569e41f4b71Sopenharmony_ci**Description** 570e41f4b71Sopenharmony_ci 571e41f4b71Sopenharmony_ciIndicates the common event that a distributed account is deregistered. 572e41f4b71Sopenharmony_ci 573e41f4b71Sopenharmony_ci**Since**: 12 574e41f4b71Sopenharmony_ci 575e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_POWER_STATE 576e41f4b71Sopenharmony_ci 577e41f4b71Sopenharmony_ci```c 578e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_POWER_STATE = "usual.event.wifi.POWER_STATE" 579e41f4b71Sopenharmony_ci``` 580e41f4b71Sopenharmony_ci 581e41f4b71Sopenharmony_ci**Description** 582e41f4b71Sopenharmony_ci 583e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi state has changed, for example, enabled or disabled. 584e41f4b71Sopenharmony_ci 585e41f4b71Sopenharmony_ci**Since**: 12 586e41f4b71Sopenharmony_ci 587e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_SCAN_FINISHED 588e41f4b71Sopenharmony_ci 589e41f4b71Sopenharmony_ci```c 590e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_SCAN_FINISHED = "usual.event.wifi.SCAN_FINISHED" 591e41f4b71Sopenharmony_ci``` 592e41f4b71Sopenharmony_ci 593e41f4b71Sopenharmony_ci**Description** 594e41f4b71Sopenharmony_ci 595e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi access point has been scanned and proven to be available. 596e41f4b71Sopenharmony_ci 597e41f4b71Sopenharmony_ci**Since**: 12 598e41f4b71Sopenharmony_ci 599e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_RSSI_VALUE 600e41f4b71Sopenharmony_ci 601e41f4b71Sopenharmony_ci```c 602e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_RSSI_VALUE = "usual.event.wifi.RSSI_VALUE" 603e41f4b71Sopenharmony_ci``` 604e41f4b71Sopenharmony_ci 605e41f4b71Sopenharmony_ci**Description** 606e41f4b71Sopenharmony_ci 607e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi signal strength (RSSI) has changed. 608e41f4b71Sopenharmony_ci 609e41f4b71Sopenharmony_ci**Since**: 12 610e41f4b71Sopenharmony_ci 611e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_CONN_STATE 612e41f4b71Sopenharmony_ci 613e41f4b71Sopenharmony_ci```c 614e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_CONN_STATE = "usual.event.wifi.CONN_STATE" 615e41f4b71Sopenharmony_ci``` 616e41f4b71Sopenharmony_ci 617e41f4b71Sopenharmony_ci**Description** 618e41f4b71Sopenharmony_ci 619e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi connection state has changed. 620e41f4b71Sopenharmony_ci 621e41f4b71Sopenharmony_ci**Since**: 12 622e41f4b71Sopenharmony_ci 623e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_HOTSPOT_STATE 624e41f4b71Sopenharmony_ci 625e41f4b71Sopenharmony_ci```c 626e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_HOTSPOT_STATE = "usual.event.wifi.HOTSPOT_STATE" 627e41f4b71Sopenharmony_ci``` 628e41f4b71Sopenharmony_ci 629e41f4b71Sopenharmony_ci**Description** 630e41f4b71Sopenharmony_ci 631e41f4b71Sopenharmony_ciIndicates a common event of the Wi-Fi hotspot state. 632e41f4b71Sopenharmony_ci 633e41f4b71Sopenharmony_ci**Since**: 12 634e41f4b71Sopenharmony_ci 635e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_AP_STA_JOIN 636e41f4b71Sopenharmony_ci 637e41f4b71Sopenharmony_ci```c 638e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_AP_STA_JOIN = "usual.event.wifi.WIFI_HS_STA_JOIN" 639e41f4b71Sopenharmony_ci``` 640e41f4b71Sopenharmony_ci 641e41f4b71Sopenharmony_ci**Description** 642e41f4b71Sopenharmony_ci 643e41f4b71Sopenharmony_ciIndicates the common event that a client has joined the Wi-Fi hotspot of the current device. 644e41f4b71Sopenharmony_ci 645e41f4b71Sopenharmony_ci**Since**: 12 646e41f4b71Sopenharmony_ci 647e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_AP_STA_LEAVE 648e41f4b71Sopenharmony_ci 649e41f4b71Sopenharmony_ci```c 650e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_AP_STA_LEAVE = "usual.event.wifi.WIFI_HS_STA_LEAVE" 651e41f4b71Sopenharmony_ci``` 652e41f4b71Sopenharmony_ci 653e41f4b71Sopenharmony_ci**Description** 654e41f4b71Sopenharmony_ci 655e41f4b71Sopenharmony_ciIndicates the common event that a client has disconnected from the Wi-Fi hotspot of the current device. 656e41f4b71Sopenharmony_ci 657e41f4b71Sopenharmony_ci**Since**: 12 658e41f4b71Sopenharmony_ci 659e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE 660e41f4b71Sopenharmony_ci 661e41f4b71Sopenharmony_ci```c 662e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = "usual.event.wifi.mplink.STATE_CHANGE" 663e41f4b71Sopenharmony_ci``` 664e41f4b71Sopenharmony_ci 665e41f4b71Sopenharmony_ci**Description** 666e41f4b71Sopenharmony_ci 667e41f4b71Sopenharmony_ciIndicates the common event that the state of MPLINK (an enhanced Wi-Fi feature) has changed. 668e41f4b71Sopenharmony_ci 669e41f4b71Sopenharmony_ci**Since**: 12 670e41f4b71Sopenharmony_ci 671e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_P2P_CONN_STATE 672e41f4b71Sopenharmony_ci 673e41f4b71Sopenharmony_ci```c 674e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_P2P_CONN_STATE = "usual.event.wifi.p2p.CONN_STATE_CHANGE" 675e41f4b71Sopenharmony_ci``` 676e41f4b71Sopenharmony_ci 677e41f4b71Sopenharmony_ci**Description** 678e41f4b71Sopenharmony_ci 679e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi P2P connection state has changed. 680e41f4b71Sopenharmony_ci 681e41f4b71Sopenharmony_ci**Since**: 12 682e41f4b71Sopenharmony_ci 683e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_P2P_STATE_CHANGED 684e41f4b71Sopenharmony_ci 685e41f4b71Sopenharmony_ci```c 686e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_P2P_STATE_CHANGED = "usual.event.wifi.p2p.STATE_CHANGE" 687e41f4b71Sopenharmony_ci``` 688e41f4b71Sopenharmony_ci 689e41f4b71Sopenharmony_ci**Description** 690e41f4b71Sopenharmony_ci 691e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi P2P state has changed, for example, enabled or disabled. 692e41f4b71Sopenharmony_ci 693e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED 694e41f4b71Sopenharmony_ci 695e41f4b71Sopenharmony_ci```c 696e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED = "usual.event.wifi.p2p.DEVICES_CHANGE" 697e41f4b71Sopenharmony_ci``` 698e41f4b71Sopenharmony_ci 699e41f4b71Sopenharmony_ci**Description** 700e41f4b71Sopenharmony_ci 701e41f4b71Sopenharmony_ciIndicates the common event that the state of the Wi-Fi P2P peer device has changed. 702e41f4b71Sopenharmony_ci 703e41f4b71Sopenharmony_ci**Since**: 12 704e41f4b71Sopenharmony_ci 705e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED 706e41f4b71Sopenharmony_ci 707e41f4b71Sopenharmony_ci```c 708e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED = "usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE" 709e41f4b71Sopenharmony_ci``` 710e41f4b71Sopenharmony_ci 711e41f4b71Sopenharmony_ci**Description** 712e41f4b71Sopenharmony_ci 713e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi P2P discovery state has changed. 714e41f4b71Sopenharmony_ci 715e41f4b71Sopenharmony_ci**Since**: 12 716e41f4b71Sopenharmony_ci 717e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED 718e41f4b71Sopenharmony_ci 719e41f4b71Sopenharmony_ci```c 720e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED = "usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE" 721e41f4b71Sopenharmony_ci``` 722e41f4b71Sopenharmony_ci 723e41f4b71Sopenharmony_ci**Description** 724e41f4b71Sopenharmony_ci 725e41f4b71Sopenharmony_ciIndicates the common event that the state of the Wi-Fi P2P local device has changed. 726e41f4b71Sopenharmony_ci 727e41f4b71Sopenharmony_ci**Since**: 12 728e41f4b71Sopenharmony_ci 729e41f4b71Sopenharmony_ci### COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED 730e41f4b71Sopenharmony_ci 731e41f4b71Sopenharmony_ci```c 732e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED = "usual.event.wifi.p2p.GROUP_STATE_CHANGED" 733e41f4b71Sopenharmony_ci``` 734e41f4b71Sopenharmony_ci 735e41f4b71Sopenharmony_ci**Description** 736e41f4b71Sopenharmony_ci 737e41f4b71Sopenharmony_ciIndicates the common event that the Wi-Fi P2P group information has changed. 738e41f4b71Sopenharmony_ci 739e41f4b71Sopenharmony_ci**Since**: 12 740e41f4b71Sopenharmony_ci 741e41f4b71Sopenharmony_ci### COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED 742e41f4b71Sopenharmony_ci 743e41f4b71Sopenharmony_ci```c 744e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED = "usual.event.nfc.action.ADAPTER_STATE_CHANGED" 745e41f4b71Sopenharmony_ci``` 746e41f4b71Sopenharmony_ci 747e41f4b71Sopenharmony_ci**Description** 748e41f4b71Sopenharmony_ci 749e41f4b71Sopenharmony_ciIndicates the common event that the state of the device NFC adapter has changed. 750e41f4b71Sopenharmony_ci 751e41f4b71Sopenharmony_ci**Since**: 12 752e41f4b71Sopenharmony_ci 753e41f4b71Sopenharmony_ci### COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED 754e41f4b71Sopenharmony_ci 755e41f4b71Sopenharmony_ci```c 756e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED = "usual.event.nfc.action.RF_FIELD_ON_DETECTED" 757e41f4b71Sopenharmony_ci``` 758e41f4b71Sopenharmony_ci 759e41f4b71Sopenharmony_ci**Description** 760e41f4b71Sopenharmony_ci 761e41f4b71Sopenharmony_ciIndicates the common event that the NFC RF field is on. 762e41f4b71Sopenharmony_ci 763e41f4b71Sopenharmony_ci**Since**: 12 764e41f4b71Sopenharmony_ci 765e41f4b71Sopenharmony_ci### COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED 766e41f4b71Sopenharmony_ci 767e41f4b71Sopenharmony_ci```c 768e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED = "usual.event.nfc.action.RF_FIELD_OFF_DETECTED" 769e41f4b71Sopenharmony_ci``` 770e41f4b71Sopenharmony_ci 771e41f4b71Sopenharmony_ci**Description** 772e41f4b71Sopenharmony_ci 773e41f4b71Sopenharmony_ciIndicates the common event that the NFC RF field is off. 774e41f4b71Sopenharmony_ci 775e41f4b71Sopenharmony_ci**Since**: 12 776e41f4b71Sopenharmony_ci 777e41f4b71Sopenharmony_ci### COMMON_EVENT_DISCHARGING 778e41f4b71Sopenharmony_ci 779e41f4b71Sopenharmony_ci```c 780e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_DISCHARGING = "usual.event.DISCHARGING" 781e41f4b71Sopenharmony_ci``` 782e41f4b71Sopenharmony_ci 783e41f4b71Sopenharmony_ci**Description** 784e41f4b71Sopenharmony_ci 785e41f4b71Sopenharmony_ciIndicates the common event that the system stops charging the battery. 786e41f4b71Sopenharmony_ci 787e41f4b71Sopenharmony_ci**Since**: 12 788e41f4b71Sopenharmony_ci 789e41f4b71Sopenharmony_ci### COMMON_EVENT_CHARGING 790e41f4b71Sopenharmony_ci 791e41f4b71Sopenharmony_ci```c 792e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_CHARGING = "usual.event.CHARGING" 793e41f4b71Sopenharmony_ci``` 794e41f4b71Sopenharmony_ci 795e41f4b71Sopenharmony_ci**Description** 796e41f4b71Sopenharmony_ci 797e41f4b71Sopenharmony_ciIndicates a common event that the system starts charging the battery. 798e41f4b71Sopenharmony_ci 799e41f4b71Sopenharmony_ci### COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED 800e41f4b71Sopenharmony_ci 801e41f4b71Sopenharmony_ci```c 802e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED = "usual.event.DEVICE_IDLE_MODE_CHANGED" 803e41f4b71Sopenharmony_ci``` 804e41f4b71Sopenharmony_ci 805e41f4b71Sopenharmony_ci**Description** 806e41f4b71Sopenharmony_ci 807e41f4b71Sopenharmony_ciIndicates the common event that the system standby mode has changed. 808e41f4b71Sopenharmony_ci 809e41f4b71Sopenharmony_ci**Since**: 12 810e41f4b71Sopenharmony_ci 811e41f4b71Sopenharmony_ci### COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED 812e41f4b71Sopenharmony_ci 813e41f4b71Sopenharmony_ci```c 814e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED = "usual.event.CHARGE_IDLE_MODE_CHANGED" 815e41f4b71Sopenharmony_ci``` 816e41f4b71Sopenharmony_ci 817e41f4b71Sopenharmony_ci**Description** 818e41f4b71Sopenharmony_ci 819e41f4b71Sopenharmony_ciIndicates the common event that the device enters the charging idle mode. 820e41f4b71Sopenharmony_ci 821e41f4b71Sopenharmony_ci**Since**: 12 822e41f4b71Sopenharmony_ci 823e41f4b71Sopenharmony_ci### COMMON_EVENT_POWER_SAVE_MODE_CHANGED 824e41f4b71Sopenharmony_ci 825e41f4b71Sopenharmony_ci```c 826e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_POWER_SAVE_MODE_CHANGED = "usual.event.POWER_SAVE_MODE_CHANGED" 827e41f4b71Sopenharmony_ci``` 828e41f4b71Sopenharmony_ci 829e41f4b71Sopenharmony_ci**Description** 830e41f4b71Sopenharmony_ci 831e41f4b71Sopenharmony_ciIndicates the common event that the system power saving mode is changed. 832e41f4b71Sopenharmony_ci 833e41f4b71Sopenharmony_ci**Since**: 12 834e41f4b71Sopenharmony_ci 835e41f4b71Sopenharmony_ci### COMMON_EVENT_USB_STATE 836e41f4b71Sopenharmony_ci 837e41f4b71Sopenharmony_ci```c 838e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_USB_STATE = "usual.event.hardware.usb.action.USB_STATE" 839e41f4b71Sopenharmony_ci``` 840e41f4b71Sopenharmony_ci 841e41f4b71Sopenharmony_ci**Description** 842e41f4b71Sopenharmony_ci 843e41f4b71Sopenharmony_ciIndicates the common event that the USB device state has changed. 844e41f4b71Sopenharmony_ci 845e41f4b71Sopenharmony_ci**Since**: 12 846e41f4b71Sopenharmony_ci 847e41f4b71Sopenharmony_ci### COMMON_EVENT_USB_PORT_CHANGED 848e41f4b71Sopenharmony_ci 849e41f4b71Sopenharmony_ci```c 850e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_USB_PORT_CHANGED = "usual.event.hardware.usb.action.USB_PORT_CHANGED" 851e41f4b71Sopenharmony_ci``` 852e41f4b71Sopenharmony_ci 853e41f4b71Sopenharmony_ci**Description** 854e41f4b71Sopenharmony_ci 855e41f4b71Sopenharmony_ciIndicates the common event that the USB port state of the user device has changed. 856e41f4b71Sopenharmony_ci 857e41f4b71Sopenharmony_ci**Since**: 12 858e41f4b71Sopenharmony_ci 859e41f4b71Sopenharmony_ci### COMMON_EVENT_USB_DEVICE_ATTACHED 860e41f4b71Sopenharmony_ci 861e41f4b71Sopenharmony_ci```c 862e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_USB_DEVICE_ATTACHED = "usual.event.hardware.usb.action.USB_DEVICE_ATTACHED" 863e41f4b71Sopenharmony_ci``` 864e41f4b71Sopenharmony_ci 865e41f4b71Sopenharmony_ci**Description** 866e41f4b71Sopenharmony_ci 867e41f4b71Sopenharmony_ciIndicates the common event that a USB device has been attached when the user device functions as a USB host. 868e41f4b71Sopenharmony_ci 869e41f4b71Sopenharmony_ci**Since**: 12 870e41f4b71Sopenharmony_ci 871e41f4b71Sopenharmony_ci### COMMON_EVENT_USB_DEVICE_DETACHED 872e41f4b71Sopenharmony_ci 873e41f4b71Sopenharmony_ci```c 874e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_USB_DEVICE_DETACHED = "usual.event.hardware.usb.action.USB_DEVICE_DETACHED" 875e41f4b71Sopenharmony_ci``` 876e41f4b71Sopenharmony_ci 877e41f4b71Sopenharmony_ci**Description** 878e41f4b71Sopenharmony_ci 879e41f4b71Sopenharmony_ciIndicates the common event that a USB device has been detached when the user device functions as a USB host. 880e41f4b71Sopenharmony_ci 881e41f4b71Sopenharmony_ci**Since**: 12 882e41f4b71Sopenharmony_ci 883e41f4b71Sopenharmony_ci### COMMON_EVENT_AIRPLANE_MODE_CHANGED 884e41f4b71Sopenharmony_ci 885e41f4b71Sopenharmony_ci```c 886e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_AIRPLANE_MODE_CHANGED = "usual.event.AIRPLANE_MODE" 887e41f4b71Sopenharmony_ci``` 888e41f4b71Sopenharmony_ci 889e41f4b71Sopenharmony_ci**Description** 890e41f4b71Sopenharmony_ci 891e41f4b71Sopenharmony_ciIndicates the common event that the airplane mode of the device has changed. 892e41f4b71Sopenharmony_ci 893e41f4b71Sopenharmony_ci**Since**: 12 894e41f4b71Sopenharmony_ci 895e41f4b71Sopenharmony_ci### COMMON_EVENT_SPLIT_SCREEN 896e41f4b71Sopenharmony_ci 897e41f4b71Sopenharmony_ci```c 898e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN" 899e41f4b71Sopenharmony_ci``` 900e41f4b71Sopenharmony_ci 901e41f4b71Sopenharmony_ci**Description** 902e41f4b71Sopenharmony_ci 903e41f4b71Sopenharmony_ciIndicates the common event of screen splitting. 904e41f4b71Sopenharmony_ci 905e41f4b71Sopenharmony_ci**Since**: 12 906e41f4b71Sopenharmony_ci 907e41f4b71Sopenharmony_ci### COMMON_EVENT_QUICK_FIX_APPLY_RESULT 908e41f4b71Sopenharmony_ci 909e41f4b71Sopenharmony_ci```c 910e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_QUICK_FIX_APPLY_RESULT = "usual.event.QUICK_FIX_APPLY_RESULT" 911e41f4b71Sopenharmony_ci``` 912e41f4b71Sopenharmony_ci 913e41f4b71Sopenharmony_ci**Description** 914e41f4b71Sopenharmony_ci 915e41f4b71Sopenharmony_ciIndicates the common event that a quick fix is applied to an application. 916e41f4b71Sopenharmony_ci 917e41f4b71Sopenharmony_ci**Since**: 12 918e41f4b71Sopenharmony_ci 919e41f4b71Sopenharmony_ci### COMMON_EVENT_QUICK_FIX_REVOKE_RESULT 920e41f4b71Sopenharmony_ci 921e41f4b71Sopenharmony_ci```c 922e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = "usual.event.QUICK_FIX_REVOKE_RESULT" 923e41f4b71Sopenharmony_ci``` 924e41f4b71Sopenharmony_ci 925e41f4b71Sopenharmony_ci**Description** 926e41f4b71Sopenharmony_ci 927e41f4b71Sopenharmony_ciIndicates the common event that a quick fix is canceled. 928e41f4b71Sopenharmony_ci 929e41f4b71Sopenharmony_ci**Since**: 12 930e41f4b71Sopenharmony_ci 931e41f4b71Sopenharmony_ci### COMMON_EVENT_USER_INFO_UPDATED 932e41f4b71Sopenharmony_ci 933e41f4b71Sopenharmony_ci```c 934e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_USER_INFO_UPDATED = "usual.event.USER_INFO_UPDATED" 935e41f4b71Sopenharmony_ci``` 936e41f4b71Sopenharmony_ci 937e41f4b71Sopenharmony_ci**Description** 938e41f4b71Sopenharmony_ci 939e41f4b71Sopenharmony_ciIndicates the common event that the user information has been updated. 940e41f4b71Sopenharmony_ci 941e41f4b71Sopenharmony_ci**Since**: 12 942e41f4b71Sopenharmony_ci 943e41f4b71Sopenharmony_ci### COMMON_EVENT_SIM_STATE_CHANGED 944e41f4b71Sopenharmony_ci 945e41f4b71Sopenharmony_ci```c 946e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SIM_STATE_CHANGED = "usual.event.SIM_STATE_CHANGED" 947e41f4b71Sopenharmony_ci``` 948e41f4b71Sopenharmony_ci 949e41f4b71Sopenharmony_ci**Description** 950e41f4b71Sopenharmony_ci 951e41f4b71Sopenharmony_ciIndicates the common event that the SIM card state has been updated. 952e41f4b71Sopenharmony_ci 953e41f4b71Sopenharmony_ci**Since**: 12 954e41f4b71Sopenharmony_ci 955e41f4b71Sopenharmony_ci### COMMON_EVENT_CALL_STATE_CHANGED 956e41f4b71Sopenharmony_ci 957e41f4b71Sopenharmony_ci```c 958e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_CALL_STATE_CHANGED = "usual.event.CALL_STATE_CHANGED" 959e41f4b71Sopenharmony_ci``` 960e41f4b71Sopenharmony_ci 961e41f4b71Sopenharmony_ci**Description** 962e41f4b71Sopenharmony_ci 963e41f4b71Sopenharmony_ciIndicates the common event that the call state has been updated. 964e41f4b71Sopenharmony_ci 965e41f4b71Sopenharmony_ci**Since**: 12 966e41f4b71Sopenharmony_ci 967e41f4b71Sopenharmony_ci### COMMON_EVENT_NETWORK_STATE_CHANGED 968e41f4b71Sopenharmony_ci 969e41f4b71Sopenharmony_ci```c 970e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_NETWORK_STATE_CHANGED = "usual.event.NETWORK_STATE_CHANGED" 971e41f4b71Sopenharmony_ci``` 972e41f4b71Sopenharmony_ci 973e41f4b71Sopenharmony_ci**Description** 974e41f4b71Sopenharmony_ci 975e41f4b71Sopenharmony_ciIndicates the common event that the network state has been updated. 976e41f4b71Sopenharmony_ci 977e41f4b71Sopenharmony_ci**Since**: 12 978e41f4b71Sopenharmony_ci 979e41f4b71Sopenharmony_ci### COMMON_EVENT_SIGNAL_INFO_CHANGED 980e41f4b71Sopenharmony_ci 981e41f4b71Sopenharmony_ci```c 982e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SIGNAL_INFO_CHANGED = "usual.event.SIGNAL_INFO_CHANGED" 983e41f4b71Sopenharmony_ci``` 984e41f4b71Sopenharmony_ci 985e41f4b71Sopenharmony_ci**Description** 986e41f4b71Sopenharmony_ci 987e41f4b71Sopenharmony_ciIndicates the common event that the signal information has been updated. 988e41f4b71Sopenharmony_ci 989e41f4b71Sopenharmony_ci**Since**: 12 990e41f4b71Sopenharmony_ci 991e41f4b71Sopenharmony_ci### COMMON_EVENT_SCREEN_UNLOCKED 992e41f4b71Sopenharmony_ci 993e41f4b71Sopenharmony_ci```c 994e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SCREEN_UNLOCKED = "usual.event.SCREEN_UNLOCKED" 995e41f4b71Sopenharmony_ci``` 996e41f4b71Sopenharmony_ci 997e41f4b71Sopenharmony_ci**Description** 998e41f4b71Sopenharmony_ci 999e41f4b71Sopenharmony_ciIndicates the common event that the screen has been unlocked. 1000e41f4b71Sopenharmony_ci 1001e41f4b71Sopenharmony_ci**Since**: 12 1002e41f4b71Sopenharmony_ci 1003e41f4b71Sopenharmony_ci### COMMON_EVENT_SCREEN_LOCKED 1004e41f4b71Sopenharmony_ci 1005e41f4b71Sopenharmony_ci```c 1006e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_SCREEN_LOCKED = "usual.event.SCREEN_LOCKED" 1007e41f4b71Sopenharmony_ci``` 1008e41f4b71Sopenharmony_ci 1009e41f4b71Sopenharmony_ci**Description** 1010e41f4b71Sopenharmony_ci 1011e41f4b71Sopenharmony_ciIndicates the common event that the screen has been locked. 1012e41f4b71Sopenharmony_ci 1013e41f4b71Sopenharmony_ci**Since**: 12 1014e41f4b71Sopenharmony_ci 1015e41f4b71Sopenharmony_ci### COMMON_EVENT_HTTP_PROXY_CHANGE 1016e41f4b71Sopenharmony_ci 1017e41f4b71Sopenharmony_ci```c 1018e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_HTTP_PROXY_CHANGE = "usual.event.HTTP_PROXY_CHANGE" 1019e41f4b71Sopenharmony_ci``` 1020e41f4b71Sopenharmony_ci 1021e41f4b71Sopenharmony_ci**Description** 1022e41f4b71Sopenharmony_ci 1023e41f4b71Sopenharmony_ciIndicates the common event that the HTTP proxy configuration has changed. 1024e41f4b71Sopenharmony_ci 1025e41f4b71Sopenharmony_ci**Since**: 12 1026e41f4b71Sopenharmony_ci 1027e41f4b71Sopenharmony_ci### COMMON_EVENT_CONNECTIVITY_CHANGE 1028e41f4b71Sopenharmony_ci 1029e41f4b71Sopenharmony_ci```c 1030e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_CONNECTIVITY_CHANGE = "usual.event.CONNECTIVITY_CHANGE" 1031e41f4b71Sopenharmony_ci``` 1032e41f4b71Sopenharmony_ci 1033e41f4b71Sopenharmony_ci**Description** 1034e41f4b71Sopenharmony_ci 1035e41f4b71Sopenharmony_ciIndicates the common event that the network connection state has changed. 1036e41f4b71Sopenharmony_ci 1037e41f4b71Sopenharmony_ci**Since**: 12 1038e41f4b71Sopenharmony_ci 1039e41f4b71Sopenharmony_ci### COMMON_EVENT_MINORSMODE_ON 1040e41f4b71Sopenharmony_ci 1041e41f4b71Sopenharmony_ci```c 1042e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_MINORSMODE_ON = "usual.event.MINORSMODE_ON" 1043e41f4b71Sopenharmony_ci``` 1044e41f4b71Sopenharmony_ci 1045e41f4b71Sopenharmony_ci**Description** 1046e41f4b71Sopenharmony_ci 1047e41f4b71Sopenharmony_ciIndicates that the minor mode is enabled. 1048e41f4b71Sopenharmony_ci 1049e41f4b71Sopenharmony_ci**Since**: 12 1050e41f4b71Sopenharmony_ci 1051e41f4b71Sopenharmony_ci### COMMON_EVENT_MINORSMODE_OFF 1052e41f4b71Sopenharmony_ci 1053e41f4b71Sopenharmony_ci```c 1054e41f4b71Sopenharmony_cistatic const char* const COMMON_EVENT_MINORSMODE_OFF = "usual.event.MINORSMODE_OFF" 1055e41f4b71Sopenharmony_ci``` 1056e41f4b71Sopenharmony_ci 1057e41f4b71Sopenharmony_ci**Description** 1058e41f4b71Sopenharmony_ci 1059e41f4b71Sopenharmony_ciIndicates the common event that the minor mode is disabled. 1060e41f4b71Sopenharmony_ci 1061e41f4b71Sopenharmony_ci**Since**: 12 1062e41f4b71Sopenharmony_ci 1063e41f4b71Sopenharmony_ci## Function Description 1064e41f4b71Sopenharmony_ci 1065e41f4b71Sopenharmony_ci### OH_CommonEvent_CreateSubscribeInfo 1066e41f4b71Sopenharmony_ci 1067e41f4b71Sopenharmony_ci```cpp 1068e41f4b71Sopenharmony_ciCommonEvent_SubscribeInfo* OH_CommonEvent_CreateSubscribeInfo(const char* events[], int32_t eventsNum) 1069e41f4b71Sopenharmony_ci``` 1070e41f4b71Sopenharmony_ci 1071e41f4b71Sopenharmony_ci**Description** 1072e41f4b71Sopenharmony_ci 1073e41f4b71Sopenharmony_ciCreates the subscriber information. 1074e41f4b71Sopenharmony_ci 1075e41f4b71Sopenharmony_ci**Since**: 12 1076e41f4b71Sopenharmony_ci 1077e41f4b71Sopenharmony_ci**Parameters** 1078e41f4b71Sopenharmony_ci 1079e41f4b71Sopenharmony_ci| Name| Description| 1080e41f4b71Sopenharmony_ci| -------- | -------- | 1081e41f4b71Sopenharmony_ci| events | Events you have subscribed to.| 1082e41f4b71Sopenharmony_ci| eventsNum | Number of events| 1083e41f4b71Sopenharmony_ci 1084e41f4b71Sopenharmony_ci**Returns** 1085e41f4b71Sopenharmony_ci 1086e41f4b71Sopenharmony_ciReturns the subscriber information. 1087e41f4b71Sopenharmony_ci 1088e41f4b71Sopenharmony_ci### OH_CommonEvent_SetPublisherPermission 1089e41f4b71Sopenharmony_ci 1090e41f4b71Sopenharmony_ci```cpp 1091e41f4b71Sopenharmony_ciCommonEvent_ErrCode OH_CommonEvent_SetPublisherPermission(CommonEvent_SubscribeInfo* info, const char* permission) 1092e41f4b71Sopenharmony_ci``` 1093e41f4b71Sopenharmony_ci 1094e41f4b71Sopenharmony_ci**Description** 1095e41f4b71Sopenharmony_ci 1096e41f4b71Sopenharmony_ciSets the subscriber permission. 1097e41f4b71Sopenharmony_ci 1098e41f4b71Sopenharmony_ci**Since**: 12 1099e41f4b71Sopenharmony_ci 1100e41f4b71Sopenharmony_ci**Parameters** 1101e41f4b71Sopenharmony_ci 1102e41f4b71Sopenharmony_ci| Name| Description| 1103e41f4b71Sopenharmony_ci| -------- | -------- | 1104e41f4b71Sopenharmony_ci| info | Subscriber information.| 1105e41f4b71Sopenharmony_ci| permission | Name of the permission.| 1106e41f4b71Sopenharmony_ci 1107e41f4b71Sopenharmony_ci**Returns** 1108e41f4b71Sopenharmony_ci 1109e41f4b71Sopenharmony_ciReturns **COMMONEVENT_ERR_OK** if the operation is successful.<br>Returns **COMMONEVENT_ERR_INVALID_PARAMETER** if **info** is a null pointer. 1110e41f4b71Sopenharmony_ci 1111e41f4b71Sopenharmony_ci### OH_CommonEvent_SetPublisherBundleName 1112e41f4b71Sopenharmony_ci 1113e41f4b71Sopenharmony_ci```cpp 1114e41f4b71Sopenharmony_ciCommonEvent_ErrCode OH_CommonEvent_SetPublisherBundleName(CommonEvent_SubscribeInfo* info, const char* bundleName) 1115e41f4b71Sopenharmony_ci``` 1116e41f4b71Sopenharmony_ci 1117e41f4b71Sopenharmony_ci**Description** 1118e41f4b71Sopenharmony_ci 1119e41f4b71Sopenharmony_ciSets a bundle name of the subscriber. 1120e41f4b71Sopenharmony_ci 1121e41f4b71Sopenharmony_ci**Since**: 12 1122e41f4b71Sopenharmony_ci 1123e41f4b71Sopenharmony_ci**Parameters** 1124e41f4b71Sopenharmony_ci 1125e41f4b71Sopenharmony_ci| Name| Description| 1126e41f4b71Sopenharmony_ci| -------- | -------- | 1127e41f4b71Sopenharmony_ci| info | Subscriber information.| 1128e41f4b71Sopenharmony_ci| bundleName | Bundle name.| 1129e41f4b71Sopenharmony_ci 1130e41f4b71Sopenharmony_ci**Returns** 1131e41f4b71Sopenharmony_ci 1132e41f4b71Sopenharmony_ciReturns **COMMONEVENT_ERR_OK** if the operation is successful.<br>Returns **COMMONEVENT_ERR_INVALID_PARAMETER** if **info** is a null pointer. 1133e41f4b71Sopenharmony_ci 1134e41f4b71Sopenharmony_ci### OH_CommonEvent_DestroySubscribeInfo 1135e41f4b71Sopenharmony_ci 1136e41f4b71Sopenharmony_ci```cpp 1137e41f4b71Sopenharmony_civoid OH_CommonEvent_DestroySubscribeInfo(CommonEvent_SubscribeInfo* info) 1138e41f4b71Sopenharmony_ci``` 1139e41f4b71Sopenharmony_ci 1140e41f4b71Sopenharmony_ci**Description** 1141e41f4b71Sopenharmony_ci 1142e41f4b71Sopenharmony_ciDestroys the subscriber information. 1143e41f4b71Sopenharmony_ci 1144e41f4b71Sopenharmony_ci**Since**: 12 1145e41f4b71Sopenharmony_ci 1146e41f4b71Sopenharmony_ci**Parameters** 1147e41f4b71Sopenharmony_ci 1148e41f4b71Sopenharmony_ci| Name| Description| 1149e41f4b71Sopenharmony_ci| -------- | -------- | 1150e41f4b71Sopenharmony_ci| info | Subscriber information.| 1151e41f4b71Sopenharmony_ci 1152e41f4b71Sopenharmony_ci### OH_CommonEvent_CreateSubscriber 1153e41f4b71Sopenharmony_ci 1154e41f4b71Sopenharmony_ci```cpp 1155e41f4b71Sopenharmony_ciCommonEvent_Subscriber* OH_CommonEvent_CreateSubscriber(const CommonEvent_SubscribeInfo* info, CommonEvent_ReceiveCallback callback) 1156e41f4b71Sopenharmony_ci``` 1157e41f4b71Sopenharmony_ci 1158e41f4b71Sopenharmony_ci**Description** 1159e41f4b71Sopenharmony_ci 1160e41f4b71Sopenharmony_ciCreates a subscriber. 1161e41f4b71Sopenharmony_ci 1162e41f4b71Sopenharmony_ci**Since**: 12 1163e41f4b71Sopenharmony_ci 1164e41f4b71Sopenharmony_ci**Parameters** 1165e41f4b71Sopenharmony_ci 1166e41f4b71Sopenharmony_ci| Name| Description| 1167e41f4b71Sopenharmony_ci| -------- | -------- | 1168e41f4b71Sopenharmony_ci| info | Subscriber information.| 1169e41f4b71Sopenharmony_ci| callback | Event callback.| 1170e41f4b71Sopenharmony_ci 1171e41f4b71Sopenharmony_ci**Returns** 1172e41f4b71Sopenharmony_ci 1173e41f4b71Sopenharmony_ciReturns the subscriber. 1174e41f4b71Sopenharmony_ci 1175e41f4b71Sopenharmony_ci### OH_CommonEvent_DestroySubscriber 1176e41f4b71Sopenharmony_ci 1177e41f4b71Sopenharmony_ci```cpp 1178e41f4b71Sopenharmony_civoid OH_CommonEvent_DestroySubscriber(CommonEvent_Subscriber* subscriber) 1179e41f4b71Sopenharmony_ci``` 1180e41f4b71Sopenharmony_ci 1181e41f4b71Sopenharmony_ci**Description** 1182e41f4b71Sopenharmony_ci 1183e41f4b71Sopenharmony_ciDestroys a subscriber. 1184e41f4b71Sopenharmony_ci 1185e41f4b71Sopenharmony_ci**Since**: 12 1186e41f4b71Sopenharmony_ci 1187e41f4b71Sopenharmony_ci**Parameters** 1188e41f4b71Sopenharmony_ci 1189e41f4b71Sopenharmony_ci| Name| Description| 1190e41f4b71Sopenharmony_ci| -------- | -------- | 1191e41f4b71Sopenharmony_ci| subscriber | Subscriber.| 1192e41f4b71Sopenharmony_ci 1193e41f4b71Sopenharmony_ci### OH_CommonEvent_Subscribe 1194e41f4b71Sopenharmony_ci 1195e41f4b71Sopenharmony_ci```cpp 1196e41f4b71Sopenharmony_ciCommonEvent_ErrCode OH_CommonEvent_Subscribe(const CommonEvent_Subscriber* subscriber) 1197e41f4b71Sopenharmony_ci``` 1198e41f4b71Sopenharmony_ci 1199e41f4b71Sopenharmony_ci**Description** 1200e41f4b71Sopenharmony_ci 1201e41f4b71Sopenharmony_ciSubscribes to a common event. 1202e41f4b71Sopenharmony_ci 1203e41f4b71Sopenharmony_ci**Since**: 12 1204e41f4b71Sopenharmony_ci 1205e41f4b71Sopenharmony_ci**Parameters** 1206e41f4b71Sopenharmony_ci 1207e41f4b71Sopenharmony_ci| Name| Description| 1208e41f4b71Sopenharmony_ci| -------- | -------- | 1209e41f4b71Sopenharmony_ci| subscriber | Subscriber.| 1210e41f4b71Sopenharmony_ci 1211e41f4b71Sopenharmony_ci**Returns** 1212e41f4b71Sopenharmony_ci 1213e41f4b71Sopenharmony_ciReturns **COMMONEVENT_ERR_OK** if the operation is successful.<br>Returns **COMMONEVENT_ERR_INVALID_PARAMETER** if the **subscriber** is a null parameter.<br>Returns **COMMONEVENT_ERR_SENDING_REQUEST_FAILED** if the IPC fails to be sent.<br>Returns **COMMONEVENT_ERR_INIT_UNDONE** if the common event service is not initialized.<br>Returns **COMMONEVENT_ERR_SUBSCRIBER_NUM_EXCEEDED** if the number of subscribers in the current process exceeds 200.<br>Returns **COMMONEVENT_ERR_ALLOC_MEMORY_FAILED** if the system fails to allocate memory. 1214e41f4b71Sopenharmony_ci 1215e41f4b71Sopenharmony_ci### OH_CommonEvent_UnSubscribe 1216e41f4b71Sopenharmony_ci 1217e41f4b71Sopenharmony_ci```cpp 1218e41f4b71Sopenharmony_ciCommonEvent_ErrCode OH_CommonEvent_UnSubscribe(const CommonEvent_Subscriber* subscriber) 1219e41f4b71Sopenharmony_ci``` 1220e41f4b71Sopenharmony_ci 1221e41f4b71Sopenharmony_ci**Description** 1222e41f4b71Sopenharmony_ci 1223e41f4b71Sopenharmony_ciUnsubscribes from a common event. 1224e41f4b71Sopenharmony_ci 1225e41f4b71Sopenharmony_ci**Since**: 12 1226e41f4b71Sopenharmony_ci 1227e41f4b71Sopenharmony_ci**Parameters** 1228e41f4b71Sopenharmony_ci 1229e41f4b71Sopenharmony_ci| Name| Description| 1230e41f4b71Sopenharmony_ci| -------- | -------- | 1231e41f4b71Sopenharmony_ci| subscriber | Subscriber.| 1232e41f4b71Sopenharmony_ci 1233e41f4b71Sopenharmony_ci**Returns** 1234e41f4b71Sopenharmony_ci 1235e41f4b71Sopenharmony_ciReturns **COMMONEVENT_ERR_OK** if the operation is successful.<br>Returns **COMMONEVENT_ERR_INVALID_PARAMETER** if the **subscriber** is a null parameter.<br>Returns **COMMONEVENT_ERR_SENDING_REQUEST_FAILED** if the IPC fails to be sent.<br>Returns **COMMONEVENT_ERR_INIT_UNDONE** if the common event service is not initialized. 1236e41f4b71Sopenharmony_ci 1237e41f4b71Sopenharmony_ci### OH_CommonEvent_GetEventFromRcvData 1238e41f4b71Sopenharmony_ci 1239e41f4b71Sopenharmony_ci```cpp 1240e41f4b71Sopenharmony_ciconst char* OH_CommonEvent_GetEventFromRcvData(const CommonEvent_RcvData* rcvData) 1241e41f4b71Sopenharmony_ci``` 1242e41f4b71Sopenharmony_ci 1243e41f4b71Sopenharmony_ci**Description** 1244e41f4b71Sopenharmony_ci 1245e41f4b71Sopenharmony_ciObtains the name of a callback common event. 1246e41f4b71Sopenharmony_ci 1247e41f4b71Sopenharmony_ci**Since**: 12 1248e41f4b71Sopenharmony_ci 1249e41f4b71Sopenharmony_ci**Parameters** 1250e41f4b71Sopenharmony_ci 1251e41f4b71Sopenharmony_ci| Name| Description| 1252e41f4b71Sopenharmony_ci| -------- | -------- | 1253e41f4b71Sopenharmony_ci| rcvData | Callback data of a common event.| 1254e41f4b71Sopenharmony_ci 1255e41f4b71Sopenharmony_ci**Returns** 1256e41f4b71Sopenharmony_ci 1257e41f4b71Sopenharmony_ciReturns the name of a common event. 1258e41f4b71Sopenharmony_ci 1259e41f4b71Sopenharmony_ci### OH_CommonEvent_GetCodeFromRcvData 1260e41f4b71Sopenharmony_ci 1261e41f4b71Sopenharmony_ci```cpp 1262e41f4b71Sopenharmony_ciint32_t OH_CommonEvent_GetCodeFromRcvData(const CommonEvent_RcvData* rcvData) 1263e41f4b71Sopenharmony_ci``` 1264e41f4b71Sopenharmony_ci 1265e41f4b71Sopenharmony_ci**Description** 1266e41f4b71Sopenharmony_ci 1267e41f4b71Sopenharmony_ciObtains the result code of the callback common event. 1268e41f4b71Sopenharmony_ci 1269e41f4b71Sopenharmony_ci**Since**: 12 1270e41f4b71Sopenharmony_ci 1271e41f4b71Sopenharmony_ci**Parameters** 1272e41f4b71Sopenharmony_ci 1273e41f4b71Sopenharmony_ci| Name| Description| 1274e41f4b71Sopenharmony_ci| -------- | -------- | 1275e41f4b71Sopenharmony_ci| rcvData | Callback data of a common event.| 1276e41f4b71Sopenharmony_ci 1277e41f4b71Sopenharmony_ci**Returns** 1278e41f4b71Sopenharmony_ci 1279e41f4b71Sopenharmony_ciReturns the result code of a common event. 1280e41f4b71Sopenharmony_ci 1281e41f4b71Sopenharmony_ci### OH_CommonEvent_GetDataStrFromRcvData 1282e41f4b71Sopenharmony_ci 1283e41f4b71Sopenharmony_ci```cpp 1284e41f4b71Sopenharmony_ciconst char* OH_CommonEvent_GetDataStrFromRcvData(const CommonEvent_RcvData* rcvData) 1285e41f4b71Sopenharmony_ci``` 1286e41f4b71Sopenharmony_ci 1287e41f4b71Sopenharmony_ci**Description** 1288e41f4b71Sopenharmony_ci 1289e41f4b71Sopenharmony_ciObtains the custom result data of a common event. 1290e41f4b71Sopenharmony_ci 1291e41f4b71Sopenharmony_ci**Since**: 12 1292e41f4b71Sopenharmony_ci 1293e41f4b71Sopenharmony_ci**Parameters** 1294e41f4b71Sopenharmony_ci 1295e41f4b71Sopenharmony_ci| Name| Description| 1296e41f4b71Sopenharmony_ci| -------- | -------- | 1297e41f4b71Sopenharmony_ci| rcvData | Callback data of a common event.| 1298e41f4b71Sopenharmony_ci 1299e41f4b71Sopenharmony_ci**Returns** 1300e41f4b71Sopenharmony_ci 1301e41f4b71Sopenharmony_ciReturns the custom result data of a common event. 1302e41f4b71Sopenharmony_ci 1303e41f4b71Sopenharmony_ci### OH_CommonEvent_GetBundleNameFromRcvData 1304e41f4b71Sopenharmony_ci 1305e41f4b71Sopenharmony_ci```cpp 1306e41f4b71Sopenharmony_ciconst char* OH_CommonEvent_GetBundleNameFromRcvData(const CommonEvent_RcvData* rcvData) 1307e41f4b71Sopenharmony_ci``` 1308e41f4b71Sopenharmony_ci 1309e41f4b71Sopenharmony_ci**Description** 1310e41f4b71Sopenharmony_ci 1311e41f4b71Sopenharmony_ciObtains the bundle name of a callback common event. 1312e41f4b71Sopenharmony_ci 1313e41f4b71Sopenharmony_ci**Since**: 12 1314e41f4b71Sopenharmony_ci 1315e41f4b71Sopenharmony_ci**Parameters** 1316e41f4b71Sopenharmony_ci 1317e41f4b71Sopenharmony_ci| Name| Description| 1318e41f4b71Sopenharmony_ci| -------- | -------- | 1319e41f4b71Sopenharmony_ci| rcvData | Callback data of a common event.| 1320e41f4b71Sopenharmony_ci 1321e41f4b71Sopenharmony_ci**Returns** 1322e41f4b71Sopenharmony_ci 1323e41f4b71Sopenharmony_ciReturns the bundle name of a common event. 1324e41f4b71Sopenharmony_ci 1325e41f4b71Sopenharmony_ci### OH_CommonEvent_GetParametersFromRcvData 1326e41f4b71Sopenharmony_ci 1327e41f4b71Sopenharmony_ci```cpp 1328e41f4b71Sopenharmony_ciconst CommonEvent_Parameters* OH_CommonEvent_GetParametersFromRcvData(const CommonEvent_RcvData* rcvData) 1329e41f4b71Sopenharmony_ci``` 1330e41f4b71Sopenharmony_ci 1331e41f4b71Sopenharmony_ci**Description** 1332e41f4b71Sopenharmony_ci 1333e41f4b71Sopenharmony_ciObtains the additional information about a callback common event. 1334e41f4b71Sopenharmony_ci 1335e41f4b71Sopenharmony_ci**Since**: 12 1336e41f4b71Sopenharmony_ci 1337e41f4b71Sopenharmony_ci**Parameters** 1338e41f4b71Sopenharmony_ci 1339e41f4b71Sopenharmony_ci| Name| Description| 1340e41f4b71Sopenharmony_ci| -------- | -------- | 1341e41f4b71Sopenharmony_ci| rcvData | Callback data of a common event.| 1342e41f4b71Sopenharmony_ci 1343e41f4b71Sopenharmony_ci**Returns** 1344e41f4b71Sopenharmony_ci 1345e41f4b71Sopenharmony_ciReturns the additional information about a common event. 1346e41f4b71Sopenharmony_ci 1347e41f4b71Sopenharmony_ci### OH_CommonEvent_HasKeyInParameters 1348e41f4b71Sopenharmony_ci 1349e41f4b71Sopenharmony_ci```cpp 1350e41f4b71Sopenharmony_cibool OH_CommonEvent_HasKeyInParameters(const CommonEvent_Parameters* para, const char* key) 1351e41f4b71Sopenharmony_ci``` 1352e41f4b71Sopenharmony_ci 1353e41f4b71Sopenharmony_ci**Description** 1354e41f4b71Sopenharmony_ci 1355e41f4b71Sopenharmony_ciChecks whether the additional information of a common event contains a key-value pair. 1356e41f4b71Sopenharmony_ci 1357e41f4b71Sopenharmony_ci**Since**: 12 1358e41f4b71Sopenharmony_ci 1359e41f4b71Sopenharmony_ci**Parameters** 1360e41f4b71Sopenharmony_ci 1361e41f4b71Sopenharmony_ci| Name| Description| 1362e41f4b71Sopenharmony_ci| -------- | -------- | 1363e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1364e41f4b71Sopenharmony_ci| key | Key.| 1365e41f4b71Sopenharmony_ci 1366e41f4b71Sopenharmony_ci**Returns** 1367e41f4b71Sopenharmony_ci 1368e41f4b71Sopenharmony_ciReturns **true** if the key-value pair exists; returns **false** otherwise. 1369e41f4b71Sopenharmony_ci 1370e41f4b71Sopenharmony_ci### OH_CommonEvent_GetIntFromParameters 1371e41f4b71Sopenharmony_ci 1372e41f4b71Sopenharmony_ci```cpp 1373e41f4b71Sopenharmony_ciint OH_CommonEvent_GetIntFromParameters(const CommonEvent_Parameters* para, const char* key, const int defaultValue) 1374e41f4b71Sopenharmony_ci``` 1375e41f4b71Sopenharmony_ci 1376e41f4b71Sopenharmony_ci**Description** 1377e41f4b71Sopenharmony_ci 1378e41f4b71Sopenharmony_ciObtains the **int** data with a specific key from the additional information of a common event. 1379e41f4b71Sopenharmony_ci 1380e41f4b71Sopenharmony_ci**Since**: 12 1381e41f4b71Sopenharmony_ci 1382e41f4b71Sopenharmony_ci**Parameters** 1383e41f4b71Sopenharmony_ci 1384e41f4b71Sopenharmony_ci| Name| Description| 1385e41f4b71Sopenharmony_ci| -------- | -------- | 1386e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1387e41f4b71Sopenharmony_ci| key | Key.| 1388e41f4b71Sopenharmony_ci| defaultValue | Default value to be returned.| 1389e41f4b71Sopenharmony_ci 1390e41f4b71Sopenharmony_ci### OH_CommonEvent_GetIntArrayFromParameters 1391e41f4b71Sopenharmony_ci 1392e41f4b71Sopenharmony_ci```cpp 1393e41f4b71Sopenharmony_ciint32_t OH_CommonEvent_GetIntArrayFromParameters(const CommonEvent_Parameters* para, const char* key, int** array) 1394e41f4b71Sopenharmony_ci``` 1395e41f4b71Sopenharmony_ci 1396e41f4b71Sopenharmony_ci**Description** 1397e41f4b71Sopenharmony_ci 1398e41f4b71Sopenharmony_ciObtains the **int** array with a specific key from the additional information of a common event. 1399e41f4b71Sopenharmony_ci 1400e41f4b71Sopenharmony_ci**Since**: 12 1401e41f4b71Sopenharmony_ci 1402e41f4b71Sopenharmony_ci**Parameters** 1403e41f4b71Sopenharmony_ci 1404e41f4b71Sopenharmony_ci| Name| Description| 1405e41f4b71Sopenharmony_ci| -------- | -------- | 1406e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1407e41f4b71Sopenharmony_ci| key | Key.| 1408e41f4b71Sopenharmony_ci| array | **Int** array to receive data.| 1409e41f4b71Sopenharmony_ci 1410e41f4b71Sopenharmony_ci**Returns** 1411e41f4b71Sopenharmony_ci 1412e41f4b71Sopenharmony_ciReturns the length of an array. 1413e41f4b71Sopenharmony_ci 1414e41f4b71Sopenharmony_ci### OH_CommonEvent_GetLongFromParameters 1415e41f4b71Sopenharmony_ci 1416e41f4b71Sopenharmony_ci```cpp 1417e41f4b71Sopenharmony_cilong OH_CommonEvent_GetLongFromParameters(const CommonEvent_Parameters* para, const char* key, const long defaultValue) 1418e41f4b71Sopenharmony_ci``` 1419e41f4b71Sopenharmony_ci 1420e41f4b71Sopenharmony_ci**Description** 1421e41f4b71Sopenharmony_ci 1422e41f4b71Sopenharmony_ciObtains the **long** data with a specific key from the additional information of a common event. 1423e41f4b71Sopenharmony_ci 1424e41f4b71Sopenharmony_ci**Since**: 12 1425e41f4b71Sopenharmony_ci 1426e41f4b71Sopenharmony_ci**Parameters** 1427e41f4b71Sopenharmony_ci 1428e41f4b71Sopenharmony_ci| Name| Description| 1429e41f4b71Sopenharmony_ci| -------- | -------- | 1430e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1431e41f4b71Sopenharmony_ci| key | Key.| 1432e41f4b71Sopenharmony_ci| defaultValue | Default value to be returned.| 1433e41f4b71Sopenharmony_ci 1434e41f4b71Sopenharmony_ci### OH_CommonEvent_GetLongArrayFromParameters 1435e41f4b71Sopenharmony_ci 1436e41f4b71Sopenharmony_ci```cpp 1437e41f4b71Sopenharmony_ciint32_t OH_CommonEvent_GetLongArrayFromParameters(const CommonEvent_Parameters* para, const char* key, long** array) 1438e41f4b71Sopenharmony_ci``` 1439e41f4b71Sopenharmony_ci 1440e41f4b71Sopenharmony_ci**Description** 1441e41f4b71Sopenharmony_ci 1442e41f4b71Sopenharmony_ciObtains the **long** array with a specific key from the additional information of a common event. 1443e41f4b71Sopenharmony_ci 1444e41f4b71Sopenharmony_ci**Since**: 12 1445e41f4b71Sopenharmony_ci 1446e41f4b71Sopenharmony_ci**Parameters** 1447e41f4b71Sopenharmony_ci 1448e41f4b71Sopenharmony_ci| Name| Description| 1449e41f4b71Sopenharmony_ci| -------- | -------- | 1450e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1451e41f4b71Sopenharmony_ci| key | Key.| 1452e41f4b71Sopenharmony_ci| array | **long** array to receive data.| 1453e41f4b71Sopenharmony_ci 1454e41f4b71Sopenharmony_ci**Returns** 1455e41f4b71Sopenharmony_ci 1456e41f4b71Sopenharmony_ciReturns the length of an array. 1457e41f4b71Sopenharmony_ci 1458e41f4b71Sopenharmony_ci### OH_CommonEvent_GetBoolFromParameters 1459e41f4b71Sopenharmony_ci 1460e41f4b71Sopenharmony_ci```cpp 1461e41f4b71Sopenharmony_cibool OH_CommonEvent_GetBoolFromParameters(const CommonEvent_Parameters* para, const char* key, const bool defaultValue) 1462e41f4b71Sopenharmony_ci``` 1463e41f4b71Sopenharmony_ci 1464e41f4b71Sopenharmony_ci**Description** 1465e41f4b71Sopenharmony_ci 1466e41f4b71Sopenharmony_ciObtains the **bool** data with a specific key from the additional information of a common event. 1467e41f4b71Sopenharmony_ci 1468e41f4b71Sopenharmony_ci**Since**: 12 1469e41f4b71Sopenharmony_ci 1470e41f4b71Sopenharmony_ci**Parameters** 1471e41f4b71Sopenharmony_ci 1472e41f4b71Sopenharmony_ci| Name| Description| 1473e41f4b71Sopenharmony_ci| -------- | -------- | 1474e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1475e41f4b71Sopenharmony_ci| key | Key.| 1476e41f4b71Sopenharmony_ci| defaultValue | Default value to be returned.| 1477e41f4b71Sopenharmony_ci 1478e41f4b71Sopenharmony_ci### OH_CommonEvent_GetBoolArrayFromParameters 1479e41f4b71Sopenharmony_ci 1480e41f4b71Sopenharmony_ci```cpp 1481e41f4b71Sopenharmony_ciint32_t OH_CommonEvent_GetBoolArrayFromParameters(const CommonEvent_Parameters* para, const char* key, bool** array) 1482e41f4b71Sopenharmony_ci``` 1483e41f4b71Sopenharmony_ci 1484e41f4b71Sopenharmony_ci**Description** 1485e41f4b71Sopenharmony_ci 1486e41f4b71Sopenharmony_ciObtains the **bool** array with a specific key from the additional information of a common event. 1487e41f4b71Sopenharmony_ci 1488e41f4b71Sopenharmony_ci**Since**: 12 1489e41f4b71Sopenharmony_ci 1490e41f4b71Sopenharmony_ci**Parameters** 1491e41f4b71Sopenharmony_ci 1492e41f4b71Sopenharmony_ci| Name| Description| 1493e41f4b71Sopenharmony_ci| -------- | -------- | 1494e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1495e41f4b71Sopenharmony_ci| key | Key.| 1496e41f4b71Sopenharmony_ci| array | **long** array to receive data.| 1497e41f4b71Sopenharmony_ci 1498e41f4b71Sopenharmony_ci**Returns** 1499e41f4b71Sopenharmony_ci 1500e41f4b71Sopenharmony_ciReturns the length of an array. 1501e41f4b71Sopenharmony_ci 1502e41f4b71Sopenharmony_ci### OH_CommonEvent_GetCharFromParameters 1503e41f4b71Sopenharmony_ci 1504e41f4b71Sopenharmony_ci```cpp 1505e41f4b71Sopenharmony_cichar OH_CommonEvent_GetCharFromParameters(const CommonEvent_Parameters* para, const char* key, const char defaultValue) 1506e41f4b71Sopenharmony_ci``` 1507e41f4b71Sopenharmony_ci 1508e41f4b71Sopenharmony_ci**Description** 1509e41f4b71Sopenharmony_ci 1510e41f4b71Sopenharmony_ciObtains the **char** data with a specific key from the additional information of a common event. 1511e41f4b71Sopenharmony_ci 1512e41f4b71Sopenharmony_ci**Since**: 12 1513e41f4b71Sopenharmony_ci 1514e41f4b71Sopenharmony_ci**Parameters** 1515e41f4b71Sopenharmony_ci 1516e41f4b71Sopenharmony_ci| Name| Description| 1517e41f4b71Sopenharmony_ci| -------- | -------- | 1518e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1519e41f4b71Sopenharmony_ci| key | Key.| 1520e41f4b71Sopenharmony_ci| defaultValue | Default value to be returned.| 1521e41f4b71Sopenharmony_ci 1522e41f4b71Sopenharmony_ci### OH_CommonEvent_GetCharArrayFromParameters 1523e41f4b71Sopenharmony_ci 1524e41f4b71Sopenharmony_ci```cpp 1525e41f4b71Sopenharmony_ciint32_t OH_CommonEvent_GetCharArrayFromParameters(const CommonEvent_Parameters* para, const char* key, char** array) 1526e41f4b71Sopenharmony_ci``` 1527e41f4b71Sopenharmony_ci 1528e41f4b71Sopenharmony_ci**Description** 1529e41f4b71Sopenharmony_ci 1530e41f4b71Sopenharmony_ciObtains the **char** array with a specific key from the additional information of a common event. 1531e41f4b71Sopenharmony_ci 1532e41f4b71Sopenharmony_ci**Since**: 12 1533e41f4b71Sopenharmony_ci 1534e41f4b71Sopenharmony_ci**Parameters** 1535e41f4b71Sopenharmony_ci 1536e41f4b71Sopenharmony_ci| Name| Description| 1537e41f4b71Sopenharmony_ci| -------- | -------- | 1538e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1539e41f4b71Sopenharmony_ci| key | Key.| 1540e41f4b71Sopenharmony_ci| array | **char** array to receive data.| 1541e41f4b71Sopenharmony_ci 1542e41f4b71Sopenharmony_ci**Returns** 1543e41f4b71Sopenharmony_ci 1544e41f4b71Sopenharmony_ciReturns the length of an array. 1545e41f4b71Sopenharmony_ci 1546e41f4b71Sopenharmony_ci### OH_CommonEvent_GetDoubleFromParameters 1547e41f4b71Sopenharmony_ci 1548e41f4b71Sopenharmony_ci```cpp 1549e41f4b71Sopenharmony_cidouble OH_CommonEvent_GetDoubleFromParameters(const CommonEvent_Parameters* para, const char* key, const double defaultValue) 1550e41f4b71Sopenharmony_ci``` 1551e41f4b71Sopenharmony_ci 1552e41f4b71Sopenharmony_ci**Description** 1553e41f4b71Sopenharmony_ci 1554e41f4b71Sopenharmony_ciObtains the **double** data with a specific key from the additional information of a common event. 1555e41f4b71Sopenharmony_ci 1556e41f4b71Sopenharmony_ci**Since**: 12 1557e41f4b71Sopenharmony_ci 1558e41f4b71Sopenharmony_ci**Parameters** 1559e41f4b71Sopenharmony_ci 1560e41f4b71Sopenharmony_ci| Name| Description| 1561e41f4b71Sopenharmony_ci| -------- | -------- | 1562e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1563e41f4b71Sopenharmony_ci| key | Key.| 1564e41f4b71Sopenharmony_ci| defaultValue | Default value to be returned.| 1565e41f4b71Sopenharmony_ci 1566e41f4b71Sopenharmony_ci### OH_CommonEvent_GetDoubleArrayFromParameters 1567e41f4b71Sopenharmony_ci 1568e41f4b71Sopenharmony_ci```cpp 1569e41f4b71Sopenharmony_ciint32_t OH_CommonEvent_GetDoubleArrayFromParameters(const CommonEvent_Parameters* para, const char* key, double** array) 1570e41f4b71Sopenharmony_ci``` 1571e41f4b71Sopenharmony_ci 1572e41f4b71Sopenharmony_ci**Description** 1573e41f4b71Sopenharmony_ci 1574e41f4b71Sopenharmony_ciObtains the **double** array with a specific key from the additional information of a common event. 1575e41f4b71Sopenharmony_ci 1576e41f4b71Sopenharmony_ci**Since**: 12 1577e41f4b71Sopenharmony_ci 1578e41f4b71Sopenharmony_ci**Parameters** 1579e41f4b71Sopenharmony_ci 1580e41f4b71Sopenharmony_ci| Name| Description| 1581e41f4b71Sopenharmony_ci| -------- | -------- | 1582e41f4b71Sopenharmony_ci| para | Additional information about a common event.| 1583e41f4b71Sopenharmony_ci| key | Key.| 1584e41f4b71Sopenharmony_ci| array | **char** array to receive data.| 1585e41f4b71Sopenharmony_ci 1586e41f4b71Sopenharmony_ci**Returns** 1587e41f4b71Sopenharmony_ci 1588e41f4b71Sopenharmony_ciReturns the length of an array. 1589