Tizen Native API
5.5
|
The Event API provides functions to serve publication and subscription of the event.
#include <app_event.h>
The Event API provides functions to broadcast user-defined event.
The format of the User-Event's name MUST be "event.{sender's appid}.{user-defined name}", unless the API calls using event_name will fail. The {user-defined name} have some restrictions.
Service application can be launched by event triggering. For Launch-On-Event,
static void app_control(app_control_h app_control, void *data) { // Check "launch on event" int ret = 0; const char *event_uri = "event://tizen.system.event.battery_charger_status"; char *operation = NULL; char *uri = NULL; char *event_value = NULL; ret = app_control_get_operation(app_control, &operation); if (ret == APP_CONTROL_ERROR_NONE && operation && strcmp(operation, APP_CONTROL_OPERATION_LAUNCH_ON_EVENT) == 0) { ret = app_control_get_uri(app_control, &uri); if (ret == APP_CONTROL_ERROR_NONE && uri) { if (strncmp(uri, event_uri, strlen(event_uri) + 1) == 0) { ret = app_control_get_extra_data(app_control, "battery_charger_status", &event_value); if (ret == APP_CONTROL_ERROR_NONE && event_value) free(event_value); } free(uri); } free(operation); } }
Name | Condition |
---|---|
SYSTEM_EVENT_BATTERY_CHARGER_STATUS | When Charger CONNECTED |
SYSTEM_EVENT_USB_STATUS | When USB CONNECTED |
SYSTEM_EVENT_EARJACK_STATUS | When Earjack CONNECTED |
SYSTEM_EVENT_INCOMING_MSG | When MSG_TYPE & MSG_ID exist |
There are some system-events which need the privilege for normal operation. You can know these privileged system-events from the 'privilege' comment of the definition of each system-event. If you try to add event handler for these events without privilege, you will get EVENT_ERROR_PERMISSION_DENIED return when you use the API for adding event handler. Also, if you declare app_control operation and URI in the manifest file for these events to enable 'Launch On Event' without privilege, there will be no real launch.
The supported system-event's name, keys, and values of each event are listed in the table below.
Functions | |
int | event_add_event_handler (const char *event_name, event_cb callback, void *user_data, event_handler_h *event_handler) |
Adds the event handler for receiving event-data of interested events. | |
int | event_remove_event_handler (event_handler_h event_handler) |
Removes the registered event handler. | |
int | event_publish_app_event (const char *event_name, bundle *event_data) |
Sends the User-Event to receiver applications. | |
int | event_publish_trusted_app_event (const char *event_name, bundle *event_data) |
Sends the User-Event to trusted receiver-applications. | |
int | event_keep_last_event_data (const char *event_name) |
Keeps last User-Event data for receiver applications. | |
Typedefs | |
typedef struct event_handler * | event_handler_h |
Event handle. | |
typedef void(* | event_cb )(const char *event_name, bundle *event_data, void *user_data) |
Event callback. | |
Defines | |
#define | SYSTEM_EVENT_BATTERY_CHARGER_STATUS "tizen.system.event.battery_charger_status" |
Definition for system-event of battery : charger status. | |
#define | EVENT_KEY_BATTERY_CHARGER_STATUS "battery_charger_status" |
Definition for key of SYSTEM_EVENT_BATTERY_CHARGER_STATUS. | |
#define | EVENT_VAL_BATTERY_CHARGER_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS. | |
#define | EVENT_VAL_BATTERY_CHARGER_CONNECTED "connected" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS. | |
#define | EVENT_VAL_BATTERY_CHARGER_CHARGING "charging" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS. | |
#define | EVENT_VAL_BATTERY_CHARGER_DISCHARGING "discharging" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS. | |
#define | SYSTEM_EVENT_BATTERY_LEVEL_STATUS "tizen.system.event.battery_level_status" |
Definition for system-event of battery : level status. | |
#define | EVENT_KEY_BATTERY_LEVEL_STATUS "battery_level_status" |
Definition for key of SYSTEM_EVENT_BATTERY_LEVEL_STATUS. | |
#define | EVENT_VAL_BATTERY_LEVEL_EMPTY "empty" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS. | |
#define | EVENT_VAL_BATTERY_LEVEL_CRITICAL "critical" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS. | |
#define | EVENT_VAL_BATTERY_LEVEL_LOW "low" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS. | |
#define | EVENT_VAL_BATTERY_LEVEL_HIGH "high" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS. | |
#define | EVENT_VAL_BATTERY_LEVEL_FULL "full" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS. | |
#define | SYSTEM_EVENT_USB_STATUS "tizen.system.event.usb_status" |
Definition for system-event of USB : status of USB connection. | |
#define | EVENT_KEY_USB_STATUS "usb_status" |
Definition for key of SYSTEM_EVENT_USB_STATUS. | |
#define | EVENT_VAL_USB_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_USB_STATUS. | |
#define | EVENT_VAL_USB_CONNECTED "connected" |
Definition for value of EVENT_KEY_USB_STATUS. | |
#define | EVENT_VAL_USB_AVAILABLE "available" |
Definition for value of EVENT_KEY_USB_STATUS. | |
#define | SYSTEM_EVENT_EARJACK_STATUS "tizen.system.event.earjack_status" |
Definition for system-event of ear-jack : status of ear-jack connection. | |
#define | EVENT_KEY_EARJACK_STATUS "earjack_status" |
Definition for key of SYSTEM_EVENT_EARJACK_STATUS. | |
#define | EVENT_VAL_EARJACK_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_EARJACK_STATUS. | |
#define | EVENT_VAL_EARJACK_CONNECTED "connected" |
Definition for value of EVENT_KEY_EARJACK_STATUS. | |
#define | SYSTEM_EVENT_DISPLAY_STATE "tizen.system.event.display_state" |
Definition for system-event of display : state of display. | |
#define | EVENT_KEY_DISPLAY_STATE "display_state" |
Definition for key of SYSTEM_EVENT_DISPLAY_STATE. | |
#define | EVENT_VAL_DISPLAY_NORMAL "normal" |
Definition for value of EVENT_KEY_DISPLAY_STATE. | |
#define | EVENT_VAL_DISPLAY_DIM "dim" |
Definition for value of EVENT_KEY_DISPLAY_STATE. | |
#define | EVENT_VAL_DISPLAY_OFF "off" |
Definition for value of EVENT_KEY_DISPLAY_STATE. | |
#define | SYSTEM_EVENT_BOOT_COMPLETED "tizen.system.event.boot_completed" |
Definition for system-event of system : boot completion. | |
#define | SYSTEM_EVENT_SYSTEM_SHUTDOWN "tizen.system.event.system_shutdown" |
Definition for system-event of system : shutdown. | |
#define | SYSTEM_EVENT_LOW_MEMORY "tizen.system.event.low_memory" |
Definition for system-event of system : low memory. | |
#define | EVENT_KEY_LOW_MEMORY "low_memory" |
Definition for key of SYSTEM_EVENT_LOW_MEMORY. | |
#define | EVENT_VAL_MEMORY_NORMAL "normal" |
Definition for value of EVENT_KEY_LOW_MEMORY. | |
#define | EVENT_VAL_MEMORY_SOFT_WARNING "soft_warning" |
Definition for value of EVENT_KEY_LOW_MEMORY. | |
#define | EVENT_VAL_MEMORY_HARD_WARNING "hard_warning" |
Definition for value of EVENT_KEY_LOW_MEMORY. | |
#define | SYSTEM_EVENT_WIFI_STATE "tizen.system.event.wifi_state" |
Definition for system-event of wifi : state of wifi. | |
#define | EVENT_KEY_WIFI_STATE "wifi_state" |
Definition for key of SYSTEM_EVENT_WIFI_STATE. | |
#define | EVENT_VAL_WIFI_OFF "off" |
Definition for value of EVENT_KEY_WIFI_STATE. | |
#define | EVENT_VAL_WIFI_ON "on" |
Definition for value of EVENT_KEY_WIFI_STATE. | |
#define | EVENT_VAL_WIFI_CONNECTED "connected" |
Definition for value of EVENT_KEY_WIFI_STATE. | |
#define | SYSTEM_EVENT_BT_STATE "tizen.system.event.bt_state" |
Definition for system-event of bluetooth : status of bluetooth. | |
#define | EVENT_KEY_BT_STATE "bt_state" |
Definition for key of SYSTEM_EVENT_BT_STATE. | |
#define | EVENT_VAL_BT_OFF "off" |
Definition for value of EVENT_KEY_BT_STATE. | |
#define | EVENT_VAL_BT_ON "on" |
Definition for value of EVENT_KEY_BT_STATE. | |
#define | EVENT_KEY_BT_LE_STATE "bt_le_state" |
Definition for key of SYSTEM_EVENT_BT_STATE. | |
#define | EVENT_VAL_BT_LE_OFF "off" |
Definition for value of EVENT_KEY_BT_LE_STATE. | |
#define | EVENT_VAL_BT_LE_ON "on" |
Definition for value of EVENT_KEY_BT_LE_STATE. | |
#define | EVENT_KEY_BT_TRANSFERING_STATE "bt_transfering_state" |
Definition for key of SYSTEM_EVENT_BT_STATE. | |
#define | EVENT_VAL_BT_NON_TRANSFERING "non_transfering" |
Definition for value of EVENT_KEY_BT_TRANSFERING_STATE. | |
#define | EVENT_VAL_BT_TRANSFERING "transfering" |
Definition for value of EVENT_KEY_BT_TRANSFERING_STATE. | |
#define | SYSTEM_EVENT_LOCATION_ENABLE_STATE "tizen.system.event.location_enable_state" |
Definition for system-event of location : enable state of location. | |
#define | EVENT_KEY_LOCATION_ENABLE_STATE "location_enable_state" |
Definition for key of SYSTEM_EVENT_LOCATION_ENABLE_STATE. | |
#define | EVENT_VAL_LOCATION_DISABLED "disabled" |
Definition for value of EVENT_KEY_LOCATION_ENABLE_STATE. | |
#define | EVENT_VAL_LOCATION_ENABLED "enabled" |
Definition for value of EVENT_KEY_LOCATION_ENABLE_STATE. | |
#define | SYSTEM_EVENT_GPS_ENABLE_STATE "tizen.system.event.gps_enable_state" |
Definition for system-event of location : enable state of gps. | |
#define | EVENT_KEY_GPS_ENABLE_STATE "gps_enable_state" |
Definition for key of SYSTEM_EVENT_GPS_ENABLE_STATE. | |
#define | EVENT_VAL_GPS_DISABLED "disabled" |
Definition for value of EVENT_KEY_GPS_ENABLE_STATE. | |
#define | EVENT_VAL_GPS_ENABLED "enabled" |
Definition for value of EVENT_KEY_GPS_ENABLE_STATE. | |
#define | SYSTEM_EVENT_NPS_ENABLE_STATE "tizen.system.event.nps_enable_state" |
Definition for system-event of location : enable state of nps. | |
#define | EVENT_KEY_NPS_ENABLE_STATE "nps_enable_state" |
Definition for key of SYSTEM_EVENT_NPS_ENABLE_STATE. | |
#define | EVENT_VAL_NPS_DISABLED "disabled" |
Definition for value of EVENT_KEY_NPS_ENABLE_STATE. | |
#define | EVENT_VAL_NPS_ENABLED "enabled" |
Definition for value of EVENT_KEY_NPS_ENABLE_STATE. | |
#define | SYSTEM_EVENT_INCOMING_MSG "tizen.system.event.incoming_msg" |
Definition for system-event of message : incoming msg. | |
#define | EVENT_KEY_MSG_TYPE "msg_type" |
Definition for key of SYSTEM_EVENT_INCOMING_MSG. | |
#define | EVENT_VAL_SMS "sms" |
Definition for value of EVENT_KEY_MSG_TYPE. | |
#define | EVENT_VAL_MMS "mms" |
Definition for value of EVENT_KEY_MSG_TYPE. | |
#define | EVENT_VAL_PUSH "push" |
Definition for value of EVENT_KEY_MSG_TYPE. | |
#define | EVENT_VAL_CB "cb" |
Definition for value of EVENT_KEY_MSG_TYPE. | |
#define | EVENT_KEY_MSG_ID "msg_id" |
Definition for key of SYSTEM_EVENT_INCOMING_MSG. | |
#define | SYSTEM_EVENT_OUTGOING_MSG "tizen.system.event.outgoing_msg" |
Definition for system-event of message : outgoing msg. | |
#define | EVENT_KEY_OUT_MSG_TYPE "msg_type" |
Definition for key of SYSTEM_EVENT_OUTGOING_MSG. | |
#define | EVENT_VAL_OUT_MSG_SMS "sms" |
Definition for value of EVENT_KEY_OUT_MSG_TYPE. | |
#define | EVENT_VAL_OUT_MSG_MMS "mms" |
Definition for value of EVENT_KEY_OUT_MSG_TYPE. | |
#define | EVENT_KEY_OUT_MSG_ID "msg_id" |
Definition for key of SYSTEM_EVENT_OUTGOING_MSG. | |
#define | SYSTEM_EVENT_TIME_CHANGED "tizen.system.event.time_changed" |
Definition for system-event of setting : time changed. | |
#define | SYSTEM_EVENT_TIME_ZONE "tizen.system.event.time_zone" |
Definition for system-event of setting : timezone setting. | |
#define | EVENT_KEY_TIME_ZONE "time_zone" |
Definition for key of SYSTEM_EVENT_TIME_ZONE. | |
#define | SYSTEM_EVENT_HOUR_FORMAT "tizen.system.event.hour_format" |
Definition for system-event of setting : hour format. | |
#define | EVENT_KEY_HOUR_FORMAT "hour_format" |
Definition for key of SYSTEM_EVENT_HOUR_FORMAT. | |
#define | EVENT_VAL_HOURFORMAT_12 "12" |
Definition for value of EVENT_KEY_HOUR_FORMAT. | |
#define | EVENT_VAL_HOURFORMAT_24 "24" |
Definition for value of EVENT_KEY_HOUR_FORMAT. | |
#define | SYSTEM_EVENT_LANGUAGE_SET "tizen.system.event.language_set" |
Definition for system-event of setting : language setting. | |
#define | EVENT_KEY_LANGUAGE_SET "language_set" |
Definition for key of SYSTEM_EVENT_LANGUAGE_SET. | |
#define | SYSTEM_EVENT_REGION_FORMAT "tizen.system.event.region_format" |
Definition for system-event of setting : region format. | |
#define | EVENT_KEY_REGION_FORMAT "region_format" |
Definition for key of SYSTEM_EVENT_REGION_FORMAT. | |
#define | SYSTEM_EVENT_SILENT_MODE "tizen.system.event.silent_mode" |
Definition for system-event of setting : silent_mode. | |
#define | EVENT_KEY_SILENT_MODE "silent_mode" |
Definition for key of SYSTEM_EVENT_SILENT_MODE. | |
#define | EVENT_VAL_SILENTMODE_ON "on" |
Definition for value of EVENT_KEY_SILENT_MODE. | |
#define | EVENT_VAL_SILENTMODE_OFF "off" |
Definition for value of EVENT_KEY_SILENT_MODE. | |
#define | SYSTEM_EVENT_VIBRATION_STATE "tizen.system.event.vibration_state" |
Definition for system-event of setting : state of vibration. | |
#define | EVENT_KEY_VIBRATION_STATE "vibration_state" |
Definition for key of SYSTEM_EVENT_VIBRATION_STATE. | |
#define | EVENT_VAL_VIBRATION_ON "on" |
Definition for value of EVENT_KEY_VIBRATION_STATE. | |
#define | EVENT_VAL_VIBRATION_OFF "off" |
Definition for value of EVENT_KEY_VIBRATION_STATE. | |
#define | SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE "tizen.system.event.screen_autorotate_state" |
Definition for system-event of setting : state of screen's auto-rotation. | |
#define | EVENT_KEY_SCREEN_AUTOROTATE_STATE "screen_autorotate_state" |
Definition for key of SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE. | |
#define | EVENT_VAL_SCREEN_AUTOROTATE_ON "on" |
Definition for value of EVENT_KEY_SCREEN_AUTOROTATE_STATE. | |
#define | EVENT_VAL_SCREEN_AUTOROTATE_OFF "off" |
Definition for value of EVENT_KEY_SCREEN_AUTOROTATE_STATE. | |
#define | SYSTEM_EVENT_MOBILE_DATA_STATE "tizen.system.event.mobile_data_state" |
Definition for system-event of setting : state of mobile data. | |
#define | EVENT_KEY_MOBILE_DATA_STATE "mobile_data_state" |
Definition for key of SYSTEM_EVENT_MOBILE_DATA_STATE. | |
#define | EVENT_VAL_MOBILE_DATA_OFF "off" |
Definition for value of EVENT_KEY_MOBILE_DATA_STATE. | |
#define | EVENT_VAL_MOBILE_DATA_ON "on" |
Definition for value of EVENT_KEY_MOBILE_DATA_STATE. | |
#define | SYSTEM_EVENT_DATA_ROAMING_STATE "tizen.system.event.data_roaming_state" |
Definition for system-event of setting : state of data roaming. | |
#define | EVENT_KEY_DATA_ROAMING_STATE "data_roaming_state" |
Definition for key of SYSTEM_EVENT_DATA_ROAMING_STATE. | |
#define | EVENT_VAL_DATA_ROAMING_OFF "off" |
Definition for value of EVENT_KEY_DATA_ROAMING_STATE. | |
#define | EVENT_VAL_DATA_ROAMING_ON "on" |
Definition for value of EVENT_KEY_DATA_ROAMING_STATE. | |
#define | SYSTEM_EVENT_FONT_SET "tizen.system.event.font_set" |
Definition for system-event of setting : font setting. | |
#define | EVENT_KEY_FONT_SET "font_set" |
Definition for key of SYSTEM_EVENT_FONT_SET. | |
#define | SYSTEM_EVENT_NETWORK_STATUS "tizen.system.event.network_status" |
Definition for system-event of network : status of network. | |
#define | EVENT_KEY_NETWORK_STATUS "network_status" |
Definition for key of SYSTEM_EVENT_NETWORK_STATUS. | |
#define | EVENT_VAL_NETWORK_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_NETWORK_STATUS. | |
#define | EVENT_VAL_NETWORK_WIFI "wifi" |
Definition for value of EVENT_KEY_NETWORK_STATUS. | |
#define | EVENT_VAL_NETWORK_CELLULAR "cellular" |
Definition for value of EVENT_KEY_NETWORK_STATUS. | |
#define | EVENT_VAL_NETWORK_ETHERNET "ethernet" |
Definition for value of EVENT_KEY_NETWORK_STATUS. | |
#define | EVENT_VAL_NETWORK_BT "bt" |
Definition for value of EVENT_KEY_NETWORK_STATUS. | |
#define | EVENT_VAL_NETWORK_NET_PROXY "net_proxy" |
Definition for value of EVENT_KEY_NETWORK_STATUS. |
#define EVENT_KEY_BATTERY_CHARGER_STATUS "battery_charger_status" |
Definition for key of SYSTEM_EVENT_BATTERY_CHARGER_STATUS.
#define EVENT_KEY_BATTERY_LEVEL_STATUS "battery_level_status" |
Definition for key of SYSTEM_EVENT_BATTERY_LEVEL_STATUS.
#define EVENT_KEY_BT_LE_STATE "bt_le_state" |
Definition for key of SYSTEM_EVENT_BT_STATE.
#define EVENT_KEY_BT_STATE "bt_state" |
#define EVENT_KEY_BT_TRANSFERING_STATE "bt_transfering_state" |
Definition for key of SYSTEM_EVENT_BT_STATE.
#define EVENT_KEY_DATA_ROAMING_STATE "data_roaming_state" |
Definition for key of SYSTEM_EVENT_DATA_ROAMING_STATE.
#define EVENT_KEY_DISPLAY_STATE "display_state" |
Definition for key of SYSTEM_EVENT_DISPLAY_STATE.
#define EVENT_KEY_EARJACK_STATUS "earjack_status" |
Definition for key of SYSTEM_EVENT_EARJACK_STATUS.
#define EVENT_KEY_FONT_SET "font_set" |
Definition for key of SYSTEM_EVENT_FONT_SET.
#define EVENT_KEY_GPS_ENABLE_STATE "gps_enable_state" |
Definition for key of SYSTEM_EVENT_GPS_ENABLE_STATE.
#define EVENT_KEY_HOUR_FORMAT "hour_format" |
Definition for key of SYSTEM_EVENT_HOUR_FORMAT.
#define EVENT_KEY_LANGUAGE_SET "language_set" |
Definition for key of SYSTEM_EVENT_LANGUAGE_SET.
#define EVENT_KEY_LOCATION_ENABLE_STATE "location_enable_state" |
Definition for key of SYSTEM_EVENT_LOCATION_ENABLE_STATE.
#define EVENT_KEY_LOW_MEMORY "low_memory" |
Definition for key of SYSTEM_EVENT_LOW_MEMORY.
#define EVENT_KEY_MOBILE_DATA_STATE "mobile_data_state" |
Definition for key of SYSTEM_EVENT_MOBILE_DATA_STATE.
#define EVENT_KEY_MSG_ID "msg_id" |
Definition for key of SYSTEM_EVENT_INCOMING_MSG.
#define EVENT_KEY_MSG_TYPE "msg_type" |
Definition for key of SYSTEM_EVENT_INCOMING_MSG.
#define EVENT_KEY_NETWORK_STATUS "network_status" |
Definition for key of SYSTEM_EVENT_NETWORK_STATUS.
#define EVENT_KEY_NPS_ENABLE_STATE "nps_enable_state" |
Definition for key of SYSTEM_EVENT_NPS_ENABLE_STATE.
#define EVENT_KEY_OUT_MSG_ID "msg_id" |
Definition for key of SYSTEM_EVENT_OUTGOING_MSG.
#define EVENT_KEY_OUT_MSG_TYPE "msg_type" |
Definition for key of SYSTEM_EVENT_OUTGOING_MSG.
#define EVENT_KEY_REGION_FORMAT "region_format" |
Definition for key of SYSTEM_EVENT_REGION_FORMAT.
#define EVENT_KEY_SCREEN_AUTOROTATE_STATE "screen_autorotate_state" |
Definition for key of SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE.
#define EVENT_KEY_SILENT_MODE "silent_mode" |
Definition for key of SYSTEM_EVENT_SILENT_MODE.
#define EVENT_KEY_TIME_ZONE "time_zone" |
Definition for key of SYSTEM_EVENT_TIME_ZONE.
#define EVENT_KEY_USB_STATUS "usb_status" |
Definition for key of SYSTEM_EVENT_USB_STATUS.
#define EVENT_KEY_VIBRATION_STATE "vibration_state" |
Definition for key of SYSTEM_EVENT_VIBRATION_STATE.
#define EVENT_KEY_WIFI_STATE "wifi_state" |
Definition for key of SYSTEM_EVENT_WIFI_STATE.
#define EVENT_VAL_BATTERY_CHARGER_CHARGING "charging" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS.
#define EVENT_VAL_BATTERY_CHARGER_CONNECTED "connected" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS.
#define EVENT_VAL_BATTERY_CHARGER_DISCHARGING "discharging" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS.
#define EVENT_VAL_BATTERY_CHARGER_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_BATTERY_CHARGER_STATUS.
#define EVENT_VAL_BATTERY_LEVEL_CRITICAL "critical" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS.
#define EVENT_VAL_BATTERY_LEVEL_EMPTY "empty" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS.
#define EVENT_VAL_BATTERY_LEVEL_FULL "full" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS.
#define EVENT_VAL_BATTERY_LEVEL_HIGH "high" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS.
#define EVENT_VAL_BATTERY_LEVEL_LOW "low" |
Definition for value of EVENT_KEY_BATTERY_LEVEL_STATUS.
#define EVENT_VAL_BT_LE_OFF "off" |
Definition for value of EVENT_KEY_BT_LE_STATE.
#define EVENT_VAL_BT_LE_ON "on" |
Definition for value of EVENT_KEY_BT_LE_STATE.
#define EVENT_VAL_BT_NON_TRANSFERING "non_transfering" |
Definition for value of EVENT_KEY_BT_TRANSFERING_STATE.
#define EVENT_VAL_BT_OFF "off" |
Definition for value of EVENT_KEY_BT_STATE.
#define EVENT_VAL_BT_ON "on" |
Definition for value of EVENT_KEY_BT_STATE.
#define EVENT_VAL_BT_TRANSFERING "transfering" |
Definition for value of EVENT_KEY_BT_TRANSFERING_STATE.
#define EVENT_VAL_CB "cb" |
Definition for value of EVENT_KEY_MSG_TYPE.
#define EVENT_VAL_DATA_ROAMING_OFF "off" |
Definition for value of EVENT_KEY_DATA_ROAMING_STATE.
#define EVENT_VAL_DATA_ROAMING_ON "on" |
Definition for value of EVENT_KEY_DATA_ROAMING_STATE.
#define EVENT_VAL_DISPLAY_DIM "dim" |
Definition for value of EVENT_KEY_DISPLAY_STATE.
#define EVENT_VAL_DISPLAY_NORMAL "normal" |
Definition for value of EVENT_KEY_DISPLAY_STATE.
#define EVENT_VAL_DISPLAY_OFF "off" |
Definition for value of EVENT_KEY_DISPLAY_STATE.
#define EVENT_VAL_EARJACK_CONNECTED "connected" |
Definition for value of EVENT_KEY_EARJACK_STATUS.
#define EVENT_VAL_EARJACK_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_EARJACK_STATUS.
#define EVENT_VAL_GPS_DISABLED "disabled" |
Definition for value of EVENT_KEY_GPS_ENABLE_STATE.
#define EVENT_VAL_GPS_ENABLED "enabled" |
Definition for value of EVENT_KEY_GPS_ENABLE_STATE.
#define EVENT_VAL_HOURFORMAT_12 "12" |
Definition for value of EVENT_KEY_HOUR_FORMAT.
#define EVENT_VAL_HOURFORMAT_24 "24" |
Definition for value of EVENT_KEY_HOUR_FORMAT.
#define EVENT_VAL_LOCATION_DISABLED "disabled" |
Definition for value of EVENT_KEY_LOCATION_ENABLE_STATE.
#define EVENT_VAL_LOCATION_ENABLED "enabled" |
Definition for value of EVENT_KEY_LOCATION_ENABLE_STATE.
#define EVENT_VAL_MEMORY_HARD_WARNING "hard_warning" |
Definition for value of EVENT_KEY_LOW_MEMORY.
#define EVENT_VAL_MEMORY_NORMAL "normal" |
Definition for value of EVENT_KEY_LOW_MEMORY.
#define EVENT_VAL_MEMORY_SOFT_WARNING "soft_warning" |
Definition for value of EVENT_KEY_LOW_MEMORY.
#define EVENT_VAL_MMS "mms" |
Definition for value of EVENT_KEY_MSG_TYPE.
#define EVENT_VAL_MOBILE_DATA_OFF "off" |
Definition for value of EVENT_KEY_MOBILE_DATA_STATE.
#define EVENT_VAL_MOBILE_DATA_ON "on" |
Definition for value of EVENT_KEY_MOBILE_DATA_STATE.
#define EVENT_VAL_NETWORK_BT "bt" |
Definition for value of EVENT_KEY_NETWORK_STATUS.
#define EVENT_VAL_NETWORK_CELLULAR "cellular" |
Definition for value of EVENT_KEY_NETWORK_STATUS.
#define EVENT_VAL_NETWORK_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_NETWORK_STATUS.
#define EVENT_VAL_NETWORK_ETHERNET "ethernet" |
Definition for value of EVENT_KEY_NETWORK_STATUS.
#define EVENT_VAL_NETWORK_NET_PROXY "net_proxy" |
Definition for value of EVENT_KEY_NETWORK_STATUS.
#define EVENT_VAL_NETWORK_WIFI "wifi" |
Definition for value of EVENT_KEY_NETWORK_STATUS.
#define EVENT_VAL_NPS_DISABLED "disabled" |
Definition for value of EVENT_KEY_NPS_ENABLE_STATE.
#define EVENT_VAL_NPS_ENABLED "enabled" |
Definition for value of EVENT_KEY_NPS_ENABLE_STATE.
#define EVENT_VAL_OUT_MSG_MMS "mms" |
Definition for value of EVENT_KEY_OUT_MSG_TYPE.
#define EVENT_VAL_OUT_MSG_SMS "sms" |
Definition for value of EVENT_KEY_OUT_MSG_TYPE.
#define EVENT_VAL_PUSH "push" |
Definition for value of EVENT_KEY_MSG_TYPE.
#define EVENT_VAL_SCREEN_AUTOROTATE_OFF "off" |
Definition for value of EVENT_KEY_SCREEN_AUTOROTATE_STATE.
#define EVENT_VAL_SCREEN_AUTOROTATE_ON "on" |
Definition for value of EVENT_KEY_SCREEN_AUTOROTATE_STATE.
#define EVENT_VAL_SILENTMODE_OFF "off" |
Definition for value of EVENT_KEY_SILENT_MODE.
#define EVENT_VAL_SILENTMODE_ON "on" |
Definition for value of EVENT_KEY_SILENT_MODE.
#define EVENT_VAL_SMS "sms" |
Definition for value of EVENT_KEY_MSG_TYPE.
#define EVENT_VAL_USB_AVAILABLE "available" |
Definition for value of EVENT_KEY_USB_STATUS.
#define EVENT_VAL_USB_CONNECTED "connected" |
Definition for value of EVENT_KEY_USB_STATUS.
#define EVENT_VAL_USB_DISCONNECTED "disconnected" |
Definition for value of EVENT_KEY_USB_STATUS.
#define EVENT_VAL_VIBRATION_OFF "off" |
Definition for value of EVENT_KEY_VIBRATION_STATE.
#define EVENT_VAL_VIBRATION_ON "on" |
Definition for value of EVENT_KEY_VIBRATION_STATE.
#define EVENT_VAL_WIFI_CONNECTED "connected" |
Definition for value of EVENT_KEY_WIFI_STATE.
#define EVENT_VAL_WIFI_OFF "off" |
Definition for value of EVENT_KEY_WIFI_STATE.
#define EVENT_VAL_WIFI_ON "on" |
Definition for value of EVENT_KEY_WIFI_STATE.
#define SYSTEM_EVENT_BATTERY_CHARGER_STATUS "tizen.system.event.battery_charger_status" |
Definition for system-event of battery : charger status.
#define SYSTEM_EVENT_BATTERY_LEVEL_STATUS "tizen.system.event.battery_level_status" |
Definition for system-event of battery : level status.
#define SYSTEM_EVENT_BOOT_COMPLETED "tizen.system.event.boot_completed" |
Definition for system-event of system : boot completion.
#define SYSTEM_EVENT_BT_STATE "tizen.system.event.bt_state" |
Definition for system-event of bluetooth : status of bluetooth.
#define SYSTEM_EVENT_DATA_ROAMING_STATE "tizen.system.event.data_roaming_state" |
Definition for system-event of setting : state of data roaming.
#define SYSTEM_EVENT_DISPLAY_STATE "tizen.system.event.display_state" |
Definition for system-event of display : state of display.
#define SYSTEM_EVENT_EARJACK_STATUS "tizen.system.event.earjack_status" |
Definition for system-event of ear-jack : status of ear-jack connection.
#define SYSTEM_EVENT_FONT_SET "tizen.system.event.font_set" |
#define SYSTEM_EVENT_GPS_ENABLE_STATE "tizen.system.event.gps_enable_state" |
Definition for system-event of location : enable state of gps.
#define SYSTEM_EVENT_HOUR_FORMAT "tizen.system.event.hour_format" |
#define SYSTEM_EVENT_INCOMING_MSG "tizen.system.event.incoming_msg" |
Definition for system-event of message : incoming msg.
#define SYSTEM_EVENT_LANGUAGE_SET "tizen.system.event.language_set" |
Definition for system-event of setting : language setting.
#define SYSTEM_EVENT_LOCATION_ENABLE_STATE "tizen.system.event.location_enable_state" |
Definition for system-event of location : enable state of location.
#define SYSTEM_EVENT_LOW_MEMORY "tizen.system.event.low_memory" |
#define SYSTEM_EVENT_MOBILE_DATA_STATE "tizen.system.event.mobile_data_state" |
Definition for system-event of setting : state of mobile data.
#define SYSTEM_EVENT_NETWORK_STATUS "tizen.system.event.network_status" |
Definition for system-event of network : status of network.
#define SYSTEM_EVENT_NPS_ENABLE_STATE "tizen.system.event.nps_enable_state" |
Definition for system-event of location : enable state of nps.
#define SYSTEM_EVENT_OUTGOING_MSG "tizen.system.event.outgoing_msg" |
Definition for system-event of message : outgoing msg.
#define SYSTEM_EVENT_REGION_FORMAT "tizen.system.event.region_format" |
#define SYSTEM_EVENT_SCREEN_AUTOROTATE_STATE "tizen.system.event.screen_autorotate_state" |
Definition for system-event of setting : state of screen's auto-rotation.
#define SYSTEM_EVENT_SILENT_MODE "tizen.system.event.silent_mode" |
#define SYSTEM_EVENT_SYSTEM_SHUTDOWN "tizen.system.event.system_shutdown" |
Definition for system-event of system : shutdown.
#define SYSTEM_EVENT_TIME_CHANGED "tizen.system.event.time_changed" |
Definition for system-event of setting : time changed.
#define SYSTEM_EVENT_TIME_ZONE "tizen.system.event.time_zone" |
#define SYSTEM_EVENT_USB_STATUS "tizen.system.event.usb_status" |
Definition for system-event of USB : status of USB connection.
#define SYSTEM_EVENT_VIBRATION_STATE "tizen.system.event.vibration_state" |
Definition for system-event of setting : state of vibration.
#define SYSTEM_EVENT_WIFI_STATE "tizen.system.event.wifi_state" |
Definition for system-event of wifi : state of wifi.
Event callback.
[in] | event_name | The interested event name |
[in] | event_data | The data of interested event |
[in] | user_data | The user data set by event_add_event_handler() |
typedef struct event_handler* event_handler_h |
Event handle.
enum event_error_e |
int event_add_event_handler | ( | const char * | event_name, |
event_cb | callback, | ||
void * | user_data, | ||
event_handler_h * | event_handler | ||
) |
Adds the event handler for receiving event-data of interested events.
[in] | event_name | The interested event name |
[in] | callback | The event callback called when the event occurs |
[in] | user_data | The user data for passing to callback |
[out] | event_handler | The event handler |
0
on success, otherwise a negative error value EVENT_ERROR_NONE | Successful |
EVENT_ERROR_PERMISSION_DENIED | Permission denied |
EVENT_ERROR_INVALID_PARAMETER | Invalid parameter |
EVENT_ERROR_IO_ERROR | Adding handler failed |
EVENT_ERROR_OUT_OF_MEMORY | Out of memory |
int event_keep_last_event_data | ( | const char * | event_name | ) |
Keeps last User-Event data for receiver applications.
[in] | event_name | The event's name to keep last event data |
0
on success, otherwise a negative error value EVENT_ERROR_NONE | Successful |
EVENT_ERROR_INVALID_PARAMETER | Invalid parameter |
EVENT_ERROR_IO_ERROR | Sending operation failed |
EVENT_ERROR_OUT_OF_MEMORY | Out of memory |
int event_publish_app_event | ( | const char * | event_name, |
bundle * | event_data | ||
) |
Sends the User-Event to receiver applications.
[in] | event_name | The event's name to send |
[in] | event_data | The event's data to send |
0
on success, otherwise a negative error value EVENT_ERROR_NONE | Successful |
EVENT_ERROR_INVALID_PARAMETER | Invalid parameter |
EVENT_ERROR_IO_ERROR | Sending operation failed |
int event_publish_trusted_app_event | ( | const char * | event_name, |
bundle * | event_data | ||
) |
Sends the User-Event to trusted receiver-applications.
[in] | event_name | The event's name to send |
[in] | event_data | The event's data to send |
0
on success, otherwise a negative error value EVENT_ERROR_NONE | Successful |
EVENT_ERROR_INVALID_PARAMETER | Invalid parameter |
EVENT_ERROR_IO_ERROR | Sending operation failed |
int event_remove_event_handler | ( | event_handler_h | event_handler | ) |
Removes the registered event handler.
[in] | event_handler | The event handler |
0
on success, otherwise a negative error value EVENT_ERROR_NONE | Successful |
EVENT_ERROR_INVALID_PARAMETER | Invalid parameter |