TizenRefApp-7096 fixed MessageMmsPrivate::getExpired(), remove outdated TODO 42/87842/5
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 9 Sep 2016 14:31:39 +0000 (17:31 +0300)
committerDmytro Dragan <dm.dragan@samsung.com>
Mon, 12 Sep 2016 09:14:08 +0000 (02:14 -0700)
Change-Id: Ifd8bb7e65453578a4434c841dcb8cd881804acab
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Common/MsgEngine/inc/MsgStorage.h
src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp
src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp

index 20a4fe9466c520c264bb13d38cac0e30d2dc2665..a16415aa4683b100c175cf780902d6e4d3d8664f 100644 (file)
@@ -189,8 +189,19 @@ namespace Msg
              */
             virtual MsgReportListRef getMsgReportList(MsgId msgId) = 0;
 
-            virtual bool isReadReportChecked(MsgId msgId) = 0; // TODO: remove to MmsMessage
-            virtual bool isDeliverReportChecked(MsgId msgId) = 0;  //TODO: remove to MmsMessage
+            /**
+             * @brief Gets whether it requests read report or not
+             * @param[in] msgId message-id.
+             * @return true requests, false otherwise.
+             */
+            virtual bool isReadReportChecked(MsgId msgId) = 0;
+
+            /**
+             * @brief Gets whether it requests delivery report or not
+             * @param[in] msgId message-id.
+             * @return true requests, false otherwise.
+             */
+            virtual bool isDeliverReportChecked(MsgId msgId) = 0;
 
             // Conversation:
             /**
index 7eb31b76dcb4c3de562300482a56b453042bf490..06fb4674a6ea346a26f2db5c51af4543756e6496 100644 (file)
@@ -161,7 +161,6 @@ MsgAttachmentPrivate &MessageMmsPrivate::addAttachment()
 time_t MessageMmsPrivate::getExpired() const
 {
     int msgExpiry = 0;
-    //TODO: Check MSG_STRUCT_SENDOPT
-    msg_get_int_value(m_MmsStruct, MSG_MMS_SENDOPTION_EXPIRY_TIME_INT, &msgExpiry);
+    msg_get_int_value(m_MmsStruct, MSG_MMS_HEADER_EXPIRY_TIME_INT, &msgExpiry);
     return msgExpiry;
 }
index e207bf3e0c35c19abad4f40011116d9c9add8541..e522e93278d4dee0da12ccd57d98962f051b8cd1 100644 (file)
@@ -386,7 +386,8 @@ bool MsgStoragePrivate::isReadReportChecked(MsgId msgId)
 
     msg_get_message(m_ServiceHandle, msgId, msgInfo, sendOpt);
     msg_get_struct_handle(sendOpt, MSG_SEND_OPT_MMS_OPT_HND, &mmsSendOpt);
-    msg_get_bool_value(mmsSendOpt, MSG_MMS_SENDOPTION_READ_REQUEST_BOOL, &readFlag);
+    if(mmsSendOpt)
+        msg_get_bool_value(mmsSendOpt, MSG_MMS_SENDOPTION_READ_REQUEST_BOOL, &readFlag);
 
     msg_release_struct(&msgInfo);
     msg_release_struct(&sendOpt);