#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#include <notification.h>
+#include <vconf.h>
+
#include "wfd-app.h"
#include "wfd-app-util.h"
#include "wfd-app-strings.h"
-#include <vconf.h>
/**
* This function let the app make a callback for connected peer
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECTED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
} else if (error_code == WIFI_DIRECT_ERROR_AUTH_FAILED) {
WDPOP_LOGD(
"Error Code - WIFI_DIRECT_ERROR_AUTH_FAILED\n");
- wfd_tickernoti_popup(_("IDS_WFD_POP_PIN_INVALID"));
+ notification_status_message_post(_("IDS_WFD_POP_PIN_INVALID"));
} else {
if (error_code == WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT) {
WDPOP_LOGD(
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECT_FAILED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
}
break;
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_DISCONNECTED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
break;
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_DISCONNECTED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
break;
case WIFI_DIRECT_CONNECTION_IN_PROGRESS:
{
WDPOP_LOGD( "event ------------------ WIFI_DIRECT_CONNECTION_IN_PROGRESS\n");
/* tickernoti popup */
- wfd_tickernoti_popup(_("IDS_WFD_POP_CONNECTING"));
+ notification_status_message_post(_("IDS_WFD_POP_CONNECTING"));
}
break;
case WIFI_DIRECT_INVITATION_REQ:
}
__WDPOP_LOG_FUNC_EXIT__;
-
if (ret == WIFI_DIRECT_ERROR_NONE) {
return TRUE;
} else {
#include <libintl.h>
#include <glib.h>
+#include <notification.h>
+
#include "wifi-direct.h"
#include "wfd-app.h"
#include "wfd-app-strings.h"
extern unsigned char g_wfd_peer_name[32];
static Ecore_Timer *pb_timer = NULL;
-void wfd_tickernoti_popup(char *msg);
/**
* This function let the ug make a callback for click the button in popup
result);
if (result == WIFI_DIRECT_ERROR_NONE) {
/* tickernoti popup */
- wfd_tickernoti_popup(_("IDS_WFD_POP_CONNECTING"));
+ notification_status_message_post(_("IDS_WFD_POP_CONNECTING"));
} else {
WDPOP_LOGE(
"wifi_direct_accept_connection() FAILED!!\n");
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECT_FAILED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
}
break;
result);
if (result == WIFI_DIRECT_ERROR_NONE) {
/* tickernoti popup */
- wfd_tickernoti_popup(_("IDS_WFD_POP_CONNECTING"));
+ notification_status_message_post(_("IDS_WFD_POP_CONNECTING"));
} else {
WDPOP_LOGE(
"wifi_direct_connect() FAILED!!\n");
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECT_FAILED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
break;
"wifi_direct_accept_connection() failed. result=[%d]\n", result);
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECT_FAILED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
}
break;
if (len != 8) {
if (len > 8)
- wfd_tickernoti_popup(_("IDS_CST_BODY_PASSWORD_TOO_LONG"));
+ notification_status_message_post(_("IDS_CST_BODY_PASSWORD_TOO_LONG"));
else
- wfd_tickernoti_popup(_("IDS_ST_BODY_PASSWORD_TOO_SHORT"));
+ notification_status_message_post(_("IDS_ST_BODY_PASSWORD_TOO_SHORT"));
wfd_prepare_popup(WFD_POP_PROG_CONNECT_WITH_KEYPAD, (void *) NULL);
return;
}
if (result != WIFI_DIRECT_ERROR_NONE) {
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECT_FAILED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
return;
}
/* tickernoti popup */
snprintf(msg, WFD_POP_STR_MAX_LEN, IDS_WFD_POP_CONNECT_FAILED, ad->peer_name);
- wfd_tickernoti_popup(msg);
+ notification_status_message_post(msg);
}
}
break;
__WDPOP_LOG_FUNC_EXIT__;
return;
-}
-
-/**
- * This function let the app create a tickernoti syspopup
- * @return void
- * @param[in] msg the pointer to message of tickernoti
- */
-void wfd_tickernoti_popup(char *msg)
-{
- __WDPOP_LOG_FUNC_ENTER__;
-
- int ret = -1;
- bundle *b = NULL;
-
- b = bundle_create();
- if (!b) {
- WDPOP_LOGD( "FAIL: bundle_create()\n");
- return;
- }
-
- /* tickernoti style */
- ret = bundle_add(b, "0", "info");
- if (ret) {
- WDPOP_LOGD( "Fail to add tickernoti style\n");
- bundle_free(b);
- return;
- }
-
- /* popup text */
- ret = bundle_add(b, "1", msg);
- if (ret) {
- WDPOP_LOGD( "Fail to add popup text\n");
- bundle_free(b);
- return;
- }
-
- /* orientation of tickernoti */
- ret = bundle_add(b, "2", "0");
- if (ret) {
- WDPOP_LOGD( "Fail to add orientation of tickernoti\n");
- bundle_free(b);
- return;
- }
-
- /* timeout(second) of tickernoti */
- ret = bundle_add(b, "3", "3");
- if (ret) {
- WDPOP_LOGD( "Fail to add timeout of tickernoti\n");
- bundle_free(b);
- return;
- }
-
- /* launch tickernoti */
- ret = syspopup_launch(TICKERNOTI_SYSPOPUP, b);
- if (ret) {
- WDPOP_LOGD( "Fail to launch syspopup\n");
- }
-
- bundle_free(b);
- __WDPOP_LOG_FUNC_EXIT__;
-}
-
+}
\ No newline at end of file