{
EM_DEBUG_FUNC_BEGIN();
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
-
noti_err = notification_set_layout(noti, NOTIFICATION_LY_NOTI_EVENT_SINGLE);
if (noti_err != NOTIFICATION_ERROR_NONE) {
EM_DEBUG_EXCEPTION("notification_set_layout NOTI_EVENT_SINGLE failed [%d]", noti_err);
}
#endif
+static int __emcore_show_new_mail_noti(void)
+{
+ EM_DEBUG_FUNC_BEGIN();
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ int err = EMAIL_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ if (noti == NULL) {
+ EM_DEBUG_EXCEPTION("notification_new failed");
+ err = EMAIL_ERROR_SYSTEM_FAILURE;
+ goto FINISH_OFF;
+ }
+ if ((noti_err = notification_set_pkgname(noti, NATIVE_EMAIL_APPLICATION_PKG)) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_set_pkgname failed [%d]", noti_err);
+ err = EMAIL_ERROR_SYSTEM_FAILURE;
+ goto FINISH_OFF;
+ }
+
+ if ((noti_err = notification_set_text_domain(noti, NATIVE_EMAIL_DOMAIN, tzplatform_mkpath(TZ_SYS_RO_APP,"org.tizen.email/res/locale"))) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_set_text_domain failed [%d]", noti_err);
+ err = EMAIL_ERROR_SYSTEM_FAILURE;
+ goto FINISH_OFF;
+ }
+
+
+ if ((noti_err = notification_set_layout(noti, NOTIFICATION_LY_NOTI_EVENT_SINGLE)) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_set_layout failed [%d]", noti_err);
+ err = EMAIL_ERROR_NOTI;
+ goto FINISH_OFF;
+ }
+
+ if ((noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, EMAIL_NOTI_ICON_PATH)) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_set_image failed [%d]", noti_err);
+ err = EMAIL_ERROR_NOTI;
+ goto FINISH_OFF;
+ }
+
+ if ((noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, "New email", "IDS_EMAIL_TPOP_NEW_EMAIL_RECEIVED_ABB", NOTIFICATION_VARIABLE_TYPE_NONE)) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_set_text failed [%d]", noti_err);
+ err = EMAIL_ERROR_SYSTEM_FAILURE;
+ goto FINISH_OFF;
+ }
+
+
+ if ((noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_TICKER)) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_insert failed [%d]", noti_err);
+ err = EMAIL_ERROR_SYSTEM_FAILURE;
+ goto FINISH_OFF;
+ }
+
+ if ((noti_err = notification_insert(noti, NULL)) != NOTIFICATION_ERROR_NONE) {
+ EM_DEBUG_EXCEPTION("notification_insert failed [%d]", noti_err);
+ err = EMAIL_ERROR_SYSTEM_FAILURE;
+ goto FINISH_OFF;
+ }
+
+FINISH_OFF:
+ if (noti)
+ notification_free(noti);
+
+ EM_DEBUG_FUNC_END("ret [%d]", err);
+ return err;
+}
+
+
INTERNAL_FUNC int emcore_add_notification(char *multi_user_name, int account_id, int mail_id, int unread_mail_count, int vip_unread_mail_count, int input_play_alert_tone, int sending_error, unsigned long display)
{
}
unseen = unread_mail_count_t;
+
display_status = account_tbl->options.display_content_status;
/* Load the previous noti */
/* err = EMAIL_ERROR_PRIORITY_SENDER_MAIL_NOT_FOUND;*/ /*there is no mail for priority sender*/
}
- if ((noti_err = notification_set_display_applist(noti, display)) != NOTIFICATION_ERROR_NONE) {
+ if ((noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_LOCK )) != NOTIFICATION_ERROR_NONE) {
EM_DEBUG_EXCEPTION("notification_insert failed [%d]", noti_err);
err = EMAIL_ERROR_SYSTEM_FAILURE;
goto FINISH_OFF;
}
+ if ((err = __emcore_show_new_mail_noti()) != EMAIL_ERROR_NONE){
+ EM_DEBUG_EXCEPTION("notification new_mail ticker failed!!");
+
+ }
+
+
if (new_noti) {
if ((noti_err = notification_insert(noti, &private_id)) != NOTIFICATION_ERROR_NONE) {
EM_DEBUG_EXCEPTION("notification_insert failed [%d]", noti_err);
EM_DEBUG_FUNC_BEGIN("account_id: %d, mail_id: %d, action:%d", account_id, mail_id, action);
int err = EMAIL_ERROR_NONE;
#ifdef __FEATURE_NOTIFICATION_ENABLE__
- int private_id = 0;
void *join_zone = NULL;
char *mailbox_name = NULL;
/* char *dgettext_string = NULL; */
- char vconf_private_id[MAX_PATH] = {0, };
notification_h noti = NULL;
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
emstorage_mail_tbl_t *p_mail_data = NULL;