{
msg_error_t err = MSG_SUCCESS;
+ if (pMsgInfo->msgPort.valid == true) {
+ *pSendNoti = false;
+ *bOnlyNoti = false;
+ return MSG_SUCCESS;
+ }
if (pMsgInfo->msgType.subType == MSG_NORMAL_SMS) {
if (MsgCheckFilter(&dbHandle, pMsgInfo) == true) {
// Move to SpamBox
MSG_DEBUG("MsgStoUpdateConversation() Error : [%d]", err);
*pSendNoti = false;
+ *bOnlyNoti = false;
}
} else if ((pMsgInfo->msgType.subType >= MSG_WAP_SI_SMS) && (pMsgInfo->msgType.subType <= MSG_WAP_CO_SMS)) {
MSG_DEBUG("Starting WAP Message Incoming.");
if (sendNoti == true) {
MsgTransactionManager::instance()->broadcastIncomingMsgCB(err, &msgInfo);
MsgTransactionManager::instance()->broadcastStorageChangeCB(err, MSG_STORAGE_CHANGE_INSERT, &msgIdList);
- } else if (msgInfo.folderId == MSG_SPAMBOX_ID) {
+ } else if(msgInfo.msgPort.valid)
+ {
+ MsgTransactionManager::instance()->broadcastIncomingMsgCB(err, &msgInfo);
+ }
+ else if (msgInfo.folderId == MSG_SPAMBOX_ID) {
MsgTransactionManager::instance()->broadcastStorageChangeCB(err, MSG_STORAGE_CHANGE_INSERT, &msgIdList);
}
int MsgIncomingPushMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent)
{
MSG_BEGIN();
+
+ int eventSize = 0;
+
// input check
if (!pCmd || !ppEvent)
THROW(MsgException::INVALID_PARAM, "pCmd or ppEvent is null");
// Get Incoming Message
memcpy(&pushData, (void*)((char*)pCmd+sizeof(MSG_CMD_TYPE_T)+MAX_COOKIE_LEN), sizeof(MSG_PUSH_MESSAGE_DATA_S));
- int eventSize = 0;
+
// broadcast to listener threads, here
MsgTransactionManager::instance()->broadcastPushMsgCB(MSG_SUCCESS, &pushData);
int listenerFd;
MSG_MAIN_TYPE_T msgType;
char appId[MAX_WAPPUSH_ID_LEN+1];
+ char content_type[MAX_WAPPUSH_CONTENT_TYPE_LEN+1];
} MSG_CMD_REG_INCOMING_PUSH_MSG_CB_S;
typedef struct
int pushBodyLen;
char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1];
char pushAppId[MAX_WAPPUSH_ID_LEN + 1];
+ char pushContentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1];
}MSG_PUSH_MESSAGE_DATA_S;
/**
}
}
-void SmsPluginEventHandler::handlePushMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen, char *application_id)
+void SmsPluginEventHandler::handlePushMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen, char *application_id, char *content_type)
{
MSG_PUSH_MESSAGE_DATA_S pushData;
memcpy(pushData.pushBody, pPushBody, pushBodyLen);
memcpy(pushData.pushAppId, application_id, MAX_WAPPUSH_ID_LEN);
+ memcpy(pushData.pushContentType, content_type, MAX_WAPPUSH_CONTENT_TYPE_LEN);
/** Callback to MSG FW */
listener.pfPushMsgIncomingCb(&pushData);
}
-msg_error_t SmsPluginStorage::getRegisteredPushEvent(char* pPushHeader, int *count, char *application_id)
+msg_error_t SmsPluginStorage::getRegisteredPushEvent(char* pPushHeader, int *count, char *application_id, char *contentType)
{
msg_error_t err = MSG_SUCCESS;
pInfo.appcode = appcode;
MSG_DEBUG("appcode: %d, app_id: %s", pInfo.appcode, app_id);
strcpy(application_id, app_id);
+ strcpy(contentType, content_type);
pushAppInfoList.push_back(pInfo);
(*count)++;
found = true;
PUSH_APPLICATION_INFO_S pInfo = {0, };
pInfo.appcode = default_appcode;
strcpy(application_id, app_id);
+ strcpy(contentType, content_type);
pushAppInfoList.push_back(pInfo);
*count = 1;
}
msg_error_t err = MSG_SUCCESS;
int pushEvt_cnt = 0;
char app_id[MAX_WAPPUSH_ID_LEN] = {0,};
+ char content_type[MAX_WAPPUSH_CONTENT_TYPE_LEN] = {0,};
SmsPluginStorage *storageHandler = SmsPluginStorage::instance();
- err = storageHandler->getRegisteredPushEvent(pPushHeader, &pushEvt_cnt, app_id);
+ err = storageHandler->getRegisteredPushEvent(pPushHeader, &pushEvt_cnt, app_id, content_type);
MSG_DEBUG("pushEvt_cnt: %d", pushEvt_cnt);
if(err != MSG_SUCCESS) {
MSG_DEBUG("Fail to get registered push event");
break;
default:
- SmsPluginEventHandler::instance()->handlePushMsgIncoming(pPushHeader, pPushBody, PushBodyLen, app_id);
+ SmsPluginEventHandler::instance()->handlePushMsgIncoming(pPushHeader, pPushBody, PushBodyLen, app_id, content_type);
break;
}
}
void handleMsgIncoming(SMS_TPDU_S *pTpdu);
void handleSyncMLMsgIncoming(msg_syncml_message_type_t msgType, char* pPushBody, int PushBodyLen, char* pWspHeader, int WspHeaderLen);
void handleLBSMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen);
- void handlePushMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen, char *app_id);
+ void handlePushMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen, char *app_id, char *content_type);
msg_error_t callbackMsgIncoming(MSG_MESSAGE_INFO_S *pMsgInfo);
msg_error_t callbackCBMsgIncoming(MSG_CB_MSG_S *pCbMsg);
msg_error_t deleteSmsMessage(msg_message_id_t MsgId);
- msg_error_t getRegisteredPushEvent(char* pPushHeader, int *count, char *app_id);
+ msg_error_t getRegisteredPushEvent(char* pPushHeader, int *count, char *app_id, char *content_type);
msg_error_t getnthPushEvent(int index, int *appcode);
msg_error_t releasePushEvent();
private: