*
* Copyright 2012 Samsung Electronics Co., Ltd
-* Licensed under the Flora License, Version 1.0 (the "License");
+* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
#include <notification_internal.h>
#include <notification_text_domain.h>
#include <bundle_internal.h>
+#include <app_control.h>
+#include <app.h>
#include <wifi-direct.h>
const char *space = " ";
int len = strlen(filewithpath);
- if (len > 20) {
+ if (len >= 20) {
strptr = (char *) filewithpath + (len - 20);
start = 0;
} else if (len < 20) {
}
strncpy((char *) filename, space, strlen(space));
- strncpy((char *) filename + start, strptr, 50);
+ if(strptr)
+ strncpy((char *) filename + start, strptr, 50);
return (char *) filename;
#endif
{
__WFD_APP_FUNC_ENTER__;
- if(result == APP_CONTROL_RESULT_FAILED) {
+ if (result == APP_CONTROL_RESULT_FAILED) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "User cancel to reconnect screen mirroring\n");
#ifdef WFD_SCREEN_MIRRORING_ENABLED
ad->screen_mirroring_state = WFD_POP_SCREEN_MIRROR_NONE;
__WFD_APP_FUNC_EXIT__;
}
-static void _move_data_to_app_control(const char *key, const char *val, void *data)
+static void _move_data_to_app_control(const char *key, const int type,
+ const bundle_keyval_t *kv, void *data)
{
__WFD_APP_FUNC_ENTER__;
+ void *ptr = NULL;
+ char *buff = NULL;
+ size_t size = 0;
- WFD_RET_IF(data == NULL || key == NULL || val == NULL, , "Invialid parameter!");
+
+ WFD_RET_IF(data == NULL || key == NULL || type == 0, "Invialid parameter!");
app_control_h control = data;
- app_control_add_extra_data(control, key, val);
+
+ if (type == BUNDLE_TYPE_STR) {
+ bundle_keyval_get_basic_val((bundle_keyval_t *) kv, &ptr, &size);
+ buff = malloc(sizeof(char) * size + 1);
+ if (buff == NULL) {
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to allocate memory");
+ __WFD_APP_FUNC_EXIT__;
+ return;
+ }
+ snprintf(buff, size + 1, "%s", ((char*) ptr));
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Found STR -KEY: %s, VAL: %s, SIZE: %d", key, buff, size);
+
+ app_control_add_extra_data(control, key, buff);
+ free(buff);
+ } else if (type == BUNDLE_TYPE_BYTE) {
+ bundle_keyval_get_basic_val((bundle_keyval_t *) kv, &ptr, &size);
+ buff = malloc(sizeof(char) * size + 1);
+ if (buff == NULL) {
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to allocate memory");
+ __WFD_APP_FUNC_EXIT__;
+ return;
+ }
+ snprintf(buff, size + 1, "%s", ((char*) ptr));
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Found STR -KEY: %s, VAL: %s, SIZE: %d", key, buff, size);
+
+ app_control_add_extra_data(control, key, buff);
+ free(buff);
+ } else if (type == BUNDLE_TYPE_STR_ARRAY) {
+ int i = 0;
+ void ** array;
+ unsigned int len = 0;
+ size_t *element_size = NULL;
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Found STR_ARRAY -KEY: %s", key);
+ bundle_keyval_get_array_val((bundle_keyval_t *) kv, &array, &len, &element_size);
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "-Array len: %d", len);
+ for (i = 0; i < len; i++) {
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "-%s", (char*)array[i]);
+
+ app_control_add_extra_data(control, key, (char*)array[i]);
+ }
+ }
__WFD_APP_FUNC_EXIT__;
}
app_control_set_operation(control, APP_CONTROL_OPERATION_DEFAULT);
app_control_set_app_id(control, app_id);
- bundle_iterate((bundle *)data, _move_data_to_app_control, control);
+ bundle_foreach((bundle *)data, _move_data_to_app_control, control);
- char *launch_type = (char*)bundle_get_val(data, "-t");
- if (!strcmp(launch_type, "reconnect_by_connecting_wifi_ap")) {
+ char *launch_type = NULL;
+ bundle_get_str(data, "-t", &launch_type);
+ if (!strcmp(launch_type, "reconnect_by_connecting_wifi_ap"))
ret = app_control_send_launch_request(control, __launch_app_result_cb, NULL);
- } else {
+ else
ret = app_control_send_launch_request(control, NULL, NULL);
- }
if (ret != APP_CONTROL_ERROR_NONE) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "app_control_send_launch_request() is failed : %d", ret);
ad->noti_screen_mirroring_play = NULL;
}
- if(ad->noti_screen_mirroring_on != NULL) {
+ if (ad->noti_screen_mirroring_on != NULL) {
noti_err = notification_free(ad->noti_screen_mirroring_on);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
}
- ad->noti_screen_mirroring_on = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ ad->noti_screen_mirroring_on = notification_create(NOTIFICATION_TYPE_ONGOING);
WFD_RET_IF(NULL == ad->noti_screen_mirroring_on, "NULL parameters.\n");
noti_err = notification_set_image(ad->noti_screen_mirroring_on, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, SCREEN_MIRRIONG_INDICATOR_ICON_PATH);
ad->noti_screen_mirroring_on = NULL;
}
- if(ad->noti_screen_mirroring_play != NULL) {
+ if (ad->noti_screen_mirroring_play != NULL) {
noti_err = notification_free(ad->noti_screen_mirroring_play);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
}
- ad->noti_screen_mirroring_play = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ ad->noti_screen_mirroring_play = notification_create(NOTIFICATION_TYPE_ONGOING);
WFD_RET_IF(NULL == ad->noti_screen_mirroring_play, "NULL parameters.\n");
char msg[WFD_MAX_SIZE] = {0};
app_control_set_package(control, package_name);
app_control_add_extra_data(control, "-t", "notification");
- res = app_control_to_bundle(control, &b);
- if (res != APP_CONTROL_ERROR_NONE) {
- WFD_APP_LOG(WFD_APP_LOG_ERROR, "app_control_to_bundle() return error : %d", res);
- app_control_destroy(control);
- return;
- }
- res = notification_set_execute_option(ad->noti_screen_mirroring_play, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, /*Button Text*/NULL, NULL, b);
+ res = notification_set_launch_option(ad->noti_screen_mirroring_play, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, control);
if (res != NOTIFICATION_ERROR_NONE) {
- WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to notification_set_execute_option. [%d]", res);
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to otification_set_launch_option. [%d]", res);
app_control_destroy(control);
return;
}
/* set the title and content */
wfd_app_get_connected_peers(ad);
- noti_err = notification_set_text(ad->noti_screen_mirroring_play, NOTIFICATION_TEXT_TYPE_TITLE, _("IDS_SMR_BODY_SCREEN_MIRRORING_IS_ENABLED"),
+ noti_err = notification_set_text(ad->noti_screen_mirroring_play, NOTIFICATION_TEXT_TYPE_TITLE, D_("IDS_SMR_BODY_SCREEN_MIRRORING_IS_ENABLED"),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_set_text. [%d]", noti_err);
- snprintf(msg, WFD_MAX_SIZE, _("IDS_WIFI_BODY_CONNECTED_TO_PS"), ad->raw_connected_peers[0].ssid);
+ snprintf(msg, WFD_MAX_SIZE, D_("IDS_WIFI_BODY_CONNECTED_TO_PS"), ad->raw_connected_peers[0].ssid);
noti_err = notification_set_text(ad->noti_screen_mirroring_play, NOTIFICATION_TEXT_TYPE_CONTENT,
msg, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_set_text. [%d]", noti_err);
#ifdef WFD_SCREEN_MIRRORING_ENABLED
/* checking Screen Mirroring */
if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
- {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
- }
+
WFD_APP_LOG(WFD_APP_LOG_LOW, "screen_mirroring_status: %d\n", screen_mirroring_status);
- if(screen_mirroring_status > VCONFKEY_SCREEN_MIRRORING_DEACTIVATED) {
+ if (screen_mirroring_status > VCONFKEY_SCREEN_MIRRORING_DEACTIVATED) {
res = vconf_set_int(VCONFKEY_SCREEN_MIRRORING_STATE, VCONFKEY_SCREEN_MIRRORING_DEACTIVATED);
- if (res < 0) {
+ if (res < 0)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to set vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
- }
}
#endif
return;
}
- if(vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
+ if (vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU\n");
return;
}
- if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0)
- {
+ if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PSMODE\n");
return;
}
cup_limit_mode){
bundle *b = NULL;
b = bundle_create();
- bundle_add(b, "-t", "notification_power_saving_on");
+ bundle_add_str(b, "-t", "notification_power_saving_on");
_launch_app(PACKAGE_ALLSHARE_CAST, b);
bundle_free(b);
}
return;
}
- if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0)
- {
+ if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_mode) < 0) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PSMODE\n");
return;
}
WFD_APP_LOG(WFD_APP_LOG_LOW, "Ultra power saving mode on\n");
bundle *b = NULL;
b = bundle_create();
- bundle_add(b, "-t", "quit_by_ultra_power_saving_on");
+ bundle_add_str(b, "-t", "quit_by_ultra_power_saving_on");
_launch_app(PACKAGE_ALLSHARE_CAST, b);
bundle_free(b);
} else if (power_mode == SETTING_PSMODE_POWERFUL ||
power_mode == SETTING_PSMODE_ADVISOR){
- if(vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
+ if (vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &cup_limit_mode) < 0) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU\n");
return;
}
if (cup_limit_mode) {
bundle *b = NULL;
b = bundle_create();
- bundle_add(b, "-t", "notification_power_saving_on");
+ bundle_add_str(b, "-t", "notification_power_saving_on");
_launch_app(PACKAGE_ALLSHARE_CAST, b);
bundle_free(b);
}
}
#endif
- if (vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_status) < 0)
- {
+ if (vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_status) < 0) {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_WIFI_STATE\n");
return;
}
ad->screen_mirroring_state = WFD_POP_SCREEN_MIRROR_DISCONNECT_BY_RECONNECT_WIFI_AP;
bundle *b = NULL;
b = bundle_create();
- bundle_add(b, "-t", "reconnect_by_connecting_wifi_ap");
+ bundle_add_str(b, "-t", "reconnect_by_connecting_wifi_ap");
_launch_app(PACKAGE_ALLSHARE_CAST, b);
bundle_free(b);
/*
* Currently, WiFi Direct OFF is handled at net-config.
* Also, this patch is added to support ON-DEMAND launch destroy popup.
- * This patch will handle 5sec deadlock of popup destory from
+ * This patch will handle 5sec deadlock of popup destroy from
* wfd-manager.
*/
/* wfd_app_client_switch_off(ad); */
WFD_RET_IF(NULL == ad, "NULL parameters.\n");
if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
- {
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
- }
WFD_APP_LOG(WFD_APP_LOG_ERROR, "VCONFKEY_SCREEN_MIRRORING_STATE:%d\n", screen_mirroring_status);
return EINA_FALSE;
}
- if (!strcmp(ev->keyname, KEY_SELECT)) {
+ if (!strcmp(ev->keyname, "XF86Home")) {
WFD_APP_LOG(WFD_APP_LOG_HIGH, "[KEY]KEY_SELECT pressed");
WFD_APP_LOG(WFD_APP_LOG_HIGH, "Mac : %s", ad->mac_addr_connecting);
if (strnlen(ad->mac_addr_connecting, MACSTR_LENGTH) > 0) {
res = wifi_direct_reject_connection(ad->mac_addr_connecting);
- if (res != WIFI_DIRECT_ERROR_NONE) {
+ if (res != WIFI_DIRECT_ERROR_NONE)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to reject connection(%d)", res);
- }
}
memset(ad->mac_addr_connecting, 0x00, MACSTR_LENGTH);
wfd_destroy_popup();
/* remove callback for flight mode */
ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, _wfd_flight_mode_changed);
- if (ret == -1) {
+ if (ret == -1)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for flight mode\n");
- }
#ifdef WFD_SCREEN_MIRRORING_ENABLED
/* remove callback for allshare cast */
ret = vconf_ignore_key_changed(VCONFKEY_SCREEN_MIRRORING_STATE, _wfd_allshare_cast_status_changed);
- if (ret == -1) {
+ if (ret == -1)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for allshare cast\n");
- }
#endif
/* remove callback for wifi */
ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wfd_wifi_status_changed);
- if (ret == -1) {
+ if (ret == -1)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for wifi\n");
- }
/* remove callback for power mode */
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE, _wfd_power_saving_mode_changed);
- if (ret == -1) {
+ if (ret == -1)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for power mode\n");
- }
/* remove callback for cpu limit mode */
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, _wfd_cpu_limit_mode_changed);
- if (ret == -1) {
+ if (ret == -1)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to ignore vconf key callback for cpu limit mode\n");
- }
return 0;
}
/* delete the notification */
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
- noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING);
+ noti_err = notification_delete_all(NOTIFICATION_TYPE_ONGOING);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_delete_all_by_type.(%d)\n", noti_err);
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_delete_all.(%d)\n", noti_err);
return;
}
if (ad->noti_screen_mirroring_on) {
noti_err = notification_free(ad->noti_screen_mirroring_on);
ad->noti_screen_mirroring_on = NULL;
- if (noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
- }
}
if (ad->noti_screen_mirroring_play) {
noti_err = notification_free(ad->noti_screen_mirroring_play);
ad->noti_screen_mirroring_play = NULL;
- if (noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
- }
}
#endif
if (ad->noti_wifi_direct_on) {
noti_err = notification_free(ad->noti_wifi_direct_on);
ad->noti_wifi_direct_on = NULL;
- if (noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
- }
}
#endif
if (ad->noti_wifi_direct_connected) {
noti_err = notification_free(ad->noti_wifi_direct_connected);
ad->noti_wifi_direct_connected = NULL;
- if (noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
- }
}
__WFD_APP_FUNC_EXIT__;
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
WFD_RET_IF(ad->noti_wifi_direct_on, "Indicator already exists");
- if(ad->noti_wifi_direct_on != NULL) {
+ if (ad->noti_wifi_direct_on != NULL) {
noti_err = notification_free(ad->noti_wifi_direct_on);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
}
- ad->noti_wifi_direct_on = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ ad->noti_wifi_direct_on = notification_create(NOTIFICATION_TYPE_ONGOING);
WFD_RET_IF(NULL == ad->noti_wifi_direct_on, "NULL parameters.\n");
noti_err = notification_set_image(ad->noti_wifi_direct_on, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, WFD_ACTIVATED_NOTI_ICON_PATH);
return;
}
- if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0) {
+ if (vconf_get_int(VCONFKEY_SCREEN_MIRRORING_STATE, &screen_mirroring_status) < 0)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to get vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
- }
WFD_APP_LOG(WFD_APP_LOG_LOW, "screen_mirroring_status: %d\n", screen_mirroring_status);
/* Set the vconf value to DEACTIVATED only when the previous vconf value is CONNECTED.
If the previous vconf value is ACTIVATED, it means that the Screen Mirroring UG changed that key already. So no need to change it. */
- if(screen_mirroring_status == VCONFKEY_SCREEN_MIRRORING_CONNECTED) {
+ if (screen_mirroring_status == VCONFKEY_SCREEN_MIRRORING_CONNECTED) {
result = vconf_set_int(VCONFKEY_SCREEN_MIRRORING_STATE, VCONFKEY_SCREEN_MIRRORING_DEACTIVATED);
- if (result < 0) {
+ if (result < 0)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to set vconf VCONFKEY_SCREEN_MIRRORING_STATE\n");
- }
- notification_status_message_post(_("IDS_SMR_POP_SCREEN_MIRRORING_HAS_BEEN_DISABLED"));
+
+ notification_status_message_post(D_("IDS_SMR_POP_SCREEN_MIRRORING_HAS_BEEN_DISABLED"));
}
__WFD_APP_FUNC_EXIT__;
/* delete all notifications */
wfd_app_util_del_notification(ad);
- if(ad->noti_wifi_direct_connected!= NULL) {
+ if (ad->noti_wifi_direct_connected != NULL) {
noti_err = notification_free(ad->noti_wifi_direct_connected);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_free. [%d]", noti_err);
}
- ad->noti_wifi_direct_connected = (notification_h) notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ ad->noti_wifi_direct_connected = (notification_h) notification_create(NOTIFICATION_TYPE_ONGOING);
WFD_RET_IF(NULL == ad->noti_wifi_direct_connected, "NULL parameters.\n");
- bundle *b = NULL;
app_control_h control;
res = app_control_create(&control);
WFD_RET_IF(res != APP_CONTROL_ERROR_NONE, "app_control_create() return error : %d", res);
- app_control_set_package(control, PACKAGE);
+ app_control_set_app_id(control, PACKAGE);
app_control_add_extra_data(control, NOTIFICATION_BUNDLE_PARAM, NOTIFICATION_BUNDLE_VALUE);
- res = app_control_to_bundle(control, &b);
- if (res != APP_CONTROL_ERROR_NONE) {
- WFD_APP_LOG(WFD_APP_LOG_ERROR, "app_control_to_bundle() return error : %d", res);
- app_control_destroy(control);
- return;
- }
- noti_err = notification_set_execute_option(ad->noti_wifi_direct_connected, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, /*Button Text*/NULL, NULL, b);
+ noti_err = notification_set_launch_option(ad->noti_wifi_direct_connected, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, control);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to notification_set_execute_option. [%d]", noti_err);
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "Failed to notification_set_launch_option. [%d]", noti_err);
app_control_destroy(control);
return;
}
/* set the title and content */
noti_err = notification_set_text(ad->noti_wifi_direct_connected, NOTIFICATION_TEXT_TYPE_TITLE,
- _("IDS_WIFI_BODY_WI_FI_DIRECT_ABB"), "IDS_WIFI_BODY_WI_FI_DIRECT_ABB", NOTIFICATION_VARIABLE_TYPE_NONE);
+ D_("IDS_WIFI_BODY_WI_FI_DIRECT_ABB"), "IDS_WIFI_BODY_WI_FI_DIRECT_ABB", NOTIFICATION_VARIABLE_TYPE_NONE);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_set_text. [%d]", noti_err);
noti_err = notification_set_text(ad->noti_wifi_direct_connected, NOTIFICATION_TEXT_TYPE_CONTENT,
- _("IDS_WIFI_BODY_DISABLE_WI_FI_DIRECT_AFTER_USE_ABB"),
+ D_("IDS_WIFI_BODY_DISABLE_WI_FI_DIRECT_AFTER_USE_ABB"),
"IDS_WIFI_BODY_DISABLE_WI_FI_DIRECT_AFTER_USE_ABB", NOTIFICATION_VARIABLE_TYPE_NONE);
WFD_RET_IF(noti_err != NOTIFICATION_ERROR_NONE, "Failed to notification_set_text. [%d]", noti_err);
if (ad->noti_wifi_direct_connected) {
noti_err = notification_free(ad->noti_wifi_direct_connected);
ad->noti_wifi_direct_connected = NULL;
- if (noti_err != NOTIFICATION_ERROR_NONE) {
+ if (noti_err != NOTIFICATION_ERROR_NONE)
WFD_APP_LOG(WFD_APP_LOG_ERROR, "Fail to notification_free.(%d)\n", noti_err);
- }
}
__WFD_APP_FUNC_EXIT__;