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 cd8f36cc6246b6224a26c547147025a60daa0eb3..f28858f27ab3ecc806a068d37d073884b5c18f5a 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 dcf03e98f4cc7c94823b96d3d2a7b950498da3ca..8d5035552f6660c70a2fb5b163ffc7f19f1d3ece 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 0d3058714d2436389446a0494d75c4dfdabac314..bd68ff20191b0800b8be594ac4d6937438086da4 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 a15aaa401548860a8f6c9767f3b73c690de176af..f3da4899efd6a10970bff0392ab2223169a8d37d 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 f61893462937f653a57e17d296ab1da31ca8bef7..e28bd2cba1fb0728aa06f2341bdc58eecff18b40 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 354ec1420114226be03de63d66b24ea6eb32028b..9c02b3310def889e0737514e6d013003b007db5a 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 63a95a5adde47f82f2dc30f504d023bd9de9e5ca..1e03364abefe63bc16715c5b51e628e0688fb9ca 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 63efda24b15bc1a9d6f871fc0a426da61dfaeeb8..af43a3dec4e3bd499fee9d11ac6581313f72a973 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 df8029a7c70d2d64998ea61b2604d08373b56902..94608c45a64883931555d207e3b28e0db21c5c87 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: