apply modified manifest
authorChangseok Oh <seok.oh@samsung.com>
Thu, 27 Dec 2012 05:48:07 +0000 (14:48 +0900)
committerChangseok Oh <seok.oh@samsung.com>
Thu, 27 Dec 2012 05:48:07 +0000 (14:48 +0900)
framework/deliver-handler/MsgDeliverHandler.cpp
framework/transaction-manager/MsgCmdHandlerTransport.cpp
include/common/MsgInternalTypes.h
include/common/MsgTypes.h
plugin/sms_plugin/SmsPluginEventHandler.cpp
plugin/sms_plugin/SmsPluginStorage.cpp
plugin/sms_plugin/SmsPluginWapPushHandler.cpp
plugin/sms_plugin/include/SmsPluginEventHandler.h
plugin/sms_plugin/include/SmsPluginStorage.h

index cd8f36c..f28858f 100755 (executable)
@@ -205,6 +205,11 @@ msg_error_t MsgHandleSMS(MSG_MESSAGE_INFO_S *pMsgInfo, bool *pSendNoti, bool *bO
 {
        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
@@ -223,6 +228,7 @@ msg_error_t MsgHandleSMS(MSG_MESSAGE_INFO_S *pMsgInfo, bool *pSendNoti, bool *bO
                                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.");
index dcf03e9..8d50355 100755 (executable)
@@ -413,7 +413,11 @@ int MsgIncomingMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent)
        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);
        }
 
@@ -568,6 +572,9 @@ __BYPASS_UPDATE:
 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");
@@ -578,7 +585,7 @@ int MsgIncomingPushMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent)
        // 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);
index 0d30587..bd68ff2 100755 (executable)
@@ -429,6 +429,7 @@ typedef struct
        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
index a15aaa4..f3da489 100755 (executable)
@@ -295,6 +295,7 @@ 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;
 
 /**
index f618934..e28bd2c 100755 (executable)
@@ -208,7 +208,7 @@ void SmsPluginEventHandler::handleMsgIncoming(SMS_TPDU_S *pTpdu)
        }
 }
 
-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;
 
@@ -221,6 +221,7 @@ void SmsPluginEventHandler::handlePushMsgIncoming(char* pPushHeader, char* pPush
        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);
index 354ec14..9c02b33 100755 (executable)
@@ -1149,7 +1149,7 @@ msg_error_t SmsPluginStorage::updateAllAddress()
 }
 
 
-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;
 
@@ -1201,6 +1201,7 @@ msg_error_t SmsPluginStorage::getRegisteredPushEvent(char* pPushHeader, int *cou
                                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;
@@ -1214,6 +1215,7 @@ msg_error_t SmsPluginStorage::getRegisteredPushEvent(char* pPushHeader, int *cou
                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;
        }
index 63a95a5..1e03364 100755 (executable)
@@ -1141,9 +1141,10 @@ void SmsPluginWapPushHandler::handleWapPushCallback(char* pPushHeader, char* pPu
        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");
@@ -1284,7 +1285,7 @@ void SmsPluginWapPushHandler::handleWapPushCallback(char* pPushHeader, char* pPu
                        break;
 
                default:
-                       SmsPluginEventHandler::instance()->handlePushMsgIncoming(pPushHeader, pPushBody, PushBodyLen, app_id);
+                       SmsPluginEventHandler::instance()->handlePushMsgIncoming(pPushHeader, pPushBody, PushBodyLen, app_id, content_type);
                        break;
                }
        }
index 63efda2..af43a3d 100755 (executable)
@@ -40,7 +40,7 @@ public:
        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);
index df8029a..94608c4 100755 (executable)
@@ -54,7 +54,7 @@ public:
 
        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: