summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhyunho <hhstark.kang@samsung.com>2020-03-05 15:51:14 +0900
committerhyunho <hhstark.kang@samsung.com>2020-03-05 17:47:18 +0900
commit833040afc89050dc6900573779475201707bd380 (patch)
treefdfc2de43a29f9d75c3296d945beae5163a71378
parent74853d1141118fdda7d147bab7e49bda48cb7077 (diff)
downloadapplication-833040afc89050dc6900573779475201707bd380.tar.gz
application-833040afc89050dc6900573779475201707bd380.tar.bz2
application-833040afc89050dc6900573779475201707bd380.zip
Modify aod event to broadcasing event
Change-Id: I7b7cb72293c7b957186e569c377056e31bc6352c Signed-off-by: hyunho <hhstark.kang@samsung.com>
-rw-r--r--appcore_ui_app_ambient/include/ui_app_ambient.h8
-rw-r--r--appcore_ui_app_ambient/src/ui_app_ambient.c14
2 files changed, 6 insertions, 16 deletions
diff --git a/appcore_ui_app_ambient/include/ui_app_ambient.h b/appcore_ui_app_ambient/include/ui_app_ambient.h
index 9d3702b..4193eb6 100644
--- a/appcore_ui_app_ambient/include/ui_app_ambient.h
+++ b/appcore_ui_app_ambient/include/ui_app_ambient.h
@@ -43,8 +43,7 @@ typedef enum {
*/
typedef enum {
UI_APP_AMBIENT_EVENT_PREPARE,
- UI_APP_AMBIENT_EVENT_READY,
- UI_APP_AMBIENT_EVENT_CHANGED,
+ UI_APP_AMBIENT_EVENT_READY
} ui_app_ambient_event_e;
/**
@@ -115,15 +114,14 @@ int ui_app_ambient_set_update_period(ui_app_ambient_update_period_e period);
int ui_app_ambient_get_update_period(ui_app_ambient_update_period_e *period);
/**
- * @brief Sends event with bundle data to the @a receiver.
+ * @brief Notifies event with bundle data to the @a receiver.
* @remark This function only for internal applications
- * @param[in] receiver application id of receiver
* @param[in] event ambient event type
* @param[in] extra extra bundle data
* @return @c 0 on success,
* otherwise a negative error value
*/
-int ui_app_ambient_send_event(const char *receiver, ui_app_ambient_event_e event, bundle *extra);
+int ui_app_ambient_notify_event(ui_app_ambient_event_e event, bundle *extra);
#ifdef __cplusplus
}
diff --git a/appcore_ui_app_ambient/src/ui_app_ambient.c b/appcore_ui_app_ambient/src/ui_app_ambient.c
index 21a3d84..f621a53 100644
--- a/appcore_ui_app_ambient/src/ui_app_ambient.c
+++ b/appcore_ui_app_ambient/src/ui_app_ambient.c
@@ -291,20 +291,13 @@ int ui_app_ambient_get_update_period(ui_app_ambient_update_period_e *period)
return 0;
}
-int ui_app_ambient_send_event(const char *receiver,
- ui_app_ambient_event_e event, bundle *extra)
+int ui_app_ambient_notify_event(ui_app_ambient_event_e event, bundle *extra)
{
char buf[32];
- char endpoint[APPID_BUFFER_MAX];
char appid_buf[APPID_BUFFER_MAX] = {0, };
int ret;
bundle *envelope;
- if (!receiver) {
- LOGE("receiver should not be null");
- return -1;
- }
-
if (extra == NULL) {
LOGE("extra data is null");
envelope = bundle_create();
@@ -339,14 +332,13 @@ int ui_app_ambient_send_event(const char *receiver,
return -1;
}
- snprintf(endpoint, sizeof(endpoint), "send_extra_data:%s", receiver);
-
- ret = aul_app_com_send(endpoint, envelope);
+ ret = aul_app_com_send("aod.ambientevent", envelope);
if (ret != AUL_R_OK) {
LOGE("Failed aul_app_com_send");
bundle_free(envelope);
return -1;
}
+ LOGI("Send AOD Event(%d) done", event);
bundle_free(envelope);
return 0;