#include "MsgException.h"
#include "MsgCppTypes.h"
#include "MsgUtilFunction.h"
+#include "MsgUtilStorage.h"
#include "MsgStorageHandler.h"
#include "MsgPluginManager.h"
#include "MsgTransManager.h"
return 0;
}
+ err = MsgStocheckMemoryStatus();
+ if (err != MSG_SUCCESS)
+ return MsgMakeEvent(NULL, 0, MSG_EVENT_ADD_MSG, err, (void**)ppEvent);
+
char* encodedData = NULL;
unique_ptr<char*, void(*)(char**)> buf(&encodedData, unique_ptr_deleter);
return 0;
}
+ err = MsgStocheckMemoryStatus();
+ if (err != MSG_SUCCESS)
+ return MsgMakeEvent(NULL, 0, MSG_EVENT_ADD_SYNCML_MSG, err, (void**)ppEvent);
+
char* encodedData = NULL;
unique_ptr<char*, void(*)(char**)> buf(&encodedData, unique_ptr_deleter);
#define MSG_READ_REPORT_STATUS_ICON "reserved://indicator/icons/read_report_message"
#define MSG_VOICE_MSG_STATUS_ICON "reserved://indicator/icons/notify_voicemail"
#define MSG_SIM_FULL_STATUS_ICON "reserved://indicator/icons/sim_card_full"
+#define MSG_STORAGE_FULL_STATUS_ICON "/usr/apps/org.tizen.indicator/res/resource/icons/Storage/b03_storage_memoryfull.png"
#ifndef TIZEN_I586_ENABLED
/* system string */
#define SIM_MSG_NOTI_PRIV_ID "db/private/msg-service/sim_msg_noti_priv_id"
#define MSG_SENTFAIL_NOTI_ID "db/private/msg-service/sentfail_noti_id"
#define SIM_FULL_NOTI_PRIV_ID "db/private/msg-service/sim_full_noti_id"
+#define STORAGE_FULL_NOTI_PRIV_ID "db/private/msg-service/storage_full_noti_id"
#define MSG_SETTING_NOTIFICATION "db/private/msg-service/general/notification"
#define MSG_SETTING_VIBRATION "db/private/msg-service/general/vibration"
MSG_MGR_NOTI_TYPE_MMS_READ_REPORT_SENT,
MSG_MGR_NOTI_TYPE_SIM_FULL,
+ MSG_MGR_NOTI_TYPE_STORAGE_FULL,
};
notification_set_launch_option(noti_h, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, noti_info->svc_h);
break;
}
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL: {
+ notification_set_launch_option(noti_h, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, noti_info->svc_h);
+ break;
+ }
case MSG_MGR_NOTI_TYPE_VOICE_1:
case MSG_MGR_NOTI_TYPE_VOICE_2:
case MSG_MGR_NOTI_TYPE_MWI:
setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_CONTENT, "Not enough memory. Delete some items.", SMS_MESSAGE_MEMORY_FULL);
break;
}
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL: {
+ setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_TITLE, "Not enough space", NULL);
+ setNotiText(noti_h, NOTIFICATION_TEXT_TYPE_CONTENT, "Couldn't receive new messages", NULL);
+ setNotiTime(noti_h, time(NULL));
+ break;
+ }
default:
MSG_MGR_DEBUG("No matching type [%d]", noti_info->type);
break;
setNotiImage(noti_h, NOTIFICATION_IMAGE_TYPE_ICON, MSG_NORMAL_ICON_PATH);
setNotiImage(noti_h, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, MSG_SIM_FULL_STATUS_ICON);
break;
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL: {
+ char *msg_icon_path = NULL;
+ if (getAppIcon(MSG_DEFAULT_APP_ID, &msg_icon_path) == 0) {
+ setNotiImage(noti_h, NOTIFICATION_IMAGE_TYPE_ICON, msg_icon_path);
+ g_free(msg_icon_path);
+ } else {
+ MSG_MGR_ERR("fail to get message-app icon");
+ }
+ setNotiImage(noti_h, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, MSG_STORAGE_FULL_STATUS_ICON);
+ break;
+ }
default:
MSG_MGR_DEBUG("No matching type for MsgNotiSetImage [%d]", noti_info->type);
break;
break;
}
case MSG_MGR_NOTI_TYPE_SIM_FULL:
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL:
break;
default:
MSG_MGR_DEBUG("No matching type [%d]", noti_info->type);
case MSG_MGR_NOTI_TYPE_SIM_FULL:
vconf_get_int(SIM_FULL_NOTI_PRIV_ID, ¬i_id);
break;
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL:
+ vconf_get_int(STORAGE_FULL_NOTI_PRIV_ID, ¬i_id);
+ break;
default:
MSG_MGR_DEBUG("No matching noti type [%d]", noti_type);
break;
case MSG_MGR_NOTI_TYPE_SIM_FULL:
err = vconf_set_int(SIM_FULL_NOTI_PRIV_ID, noti_id);
break;
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL:
+ err = vconf_set_int(STORAGE_FULL_NOTI_PRIV_ID, noti_id);
+ break;
default:
MSG_MGR_DEBUG("No matching type [%d]", noti_type);
break;
noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_INDICATOR;
break;
}
+ case MSG_MGR_NOTI_TYPE_STORAGE_FULL: {
+ noti_info->layout = NOTIFICATION_LY_NOTI_EVENT_SINGLE;
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_INDICATOR|NOTIFICATION_DISPLAY_APP_TICKER;
+ }
default:
break;
}
if (g_strcmp0(pLocaleTickerMsg, SMS_MESSAGE_SENDING_FAIL) != 0 &&
g_strcmp0(pLocaleTickerMsg, SENDING_MULTIMEDIA_MESSAGE_FAILED) != 0 &&
+ g_strcmp0(pLocaleTickerMsg, SMS_MESSAGE_MEMORY_FULL) != 0 &&
g_strcmp0(pLocaleTickerMsg, MESSAGE_RETRIEVED) != 0) {
if (g_strcmp0(pLocaleTickerMsg, notiMsg) == 0) {
notification_status_message_post(pTickerMsg);
MSG_MGR_DEBUG("MsgRefreshSimFullNoti err=[%d]", err);
}
#endif
+ } else if (g_strcmp0(pLocaleTickerMsg, SMS_MESSAGE_MEMORY_FULL) == 0) {
+ err = MsgMgrRefreshNotification(MSG_MGR_NOTI_TYPE_STORAGE_FULL, true, MSG_MGR_ACTIVE_NOTI_TYPE_NONE);
+ if (err != 0) {
+ MSG_MGR_DEBUG("MsgRefreshFailedNoti err=[%d]", err);
+ }
} else {
MsgMgrSoundPlayStart(NULL, MSG_MGR_SOUND_PLAY_DEFAULT);
}