Update change log and spec for wrt-plugins-tizen_0.2.75
authorKisub Song <kisubs.song@samsung.com>
Fri, 31 Aug 2012 15:14:00 +0000 (00:14 +0900)
committerKisub Song <kisubs.song@samsung.com>
Fri, 31 Aug 2012 15:14:00 +0000 (00:14 +0900)
Changed Modules : Download, Messaging, Systeminfo and Contact

[Version] 0.2.75
[Project] GT-I8800, Public
[Title] SEL Verification
[Team] WebAPI
[BinType] PDA
[Customer] Open

[Issue#] N/A
[Problem] Messaging - crash when mms sending fails
[Cause] mms sending fail bug
[Solution] mms sending fail bug fix

[Issue#] N_SE-4523
[Problem] Systeminfo - device property value is not correct
[Cause] codes are wrong
[Solution] change code about get property value

[Issue] N/A
[Problem] Messaging - mms sending fails
[Cause] mms sending fail bug
[Solution] mms sending fail bug fix

[Issue] N/A
[Problem] Messaging - add Address type on sms for consistency
[Cause] add Address type on sms for consistency
[Solution] add Address type on sms for consistency

[Issue#] N/A
[Problem] Contact - Some field show wrong values
[Cause] Field matching rules are wrongly defined
[Solution] Fixed matching codes

[SCMRequest] N/A

debian/changelog
packaging/wrt-plugins-tizen.spec
src/platform/Tizen/Download/DownloadManager.cpp
src/platform/Tizen/Messaging/Mms.cpp
src/platform/Tizen/Messaging/Sms.cpp
src/platform/Tizen/Systeminfo/Systeminfo.cpp

index 571ebd9..929430a 100644 (file)
@@ -1,3 +1,11 @@
+wrt-plugins-tizen (0.2.75) unstable; urgency=low
+
+  * Bug fix on Messaging, Download, Systeminfo and Contact
+  * Git : slp/pkgs/w/wrt-plugins-tizen
+  * Tag : wrt-plugins-tizen_0.2.74
+
+ -- Kisub Song <kisubs.song@samsung.com>  Sat, 01 Sep 2012 00:10:05 +0900
+
 wrt-plugins-tizen (0.2.74) unstable; urgency=low
 
   * Bug fix on Messaging
index df7cae6..af7a58d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.2.74
+Version:    0.2.75
 Release:    0
 Group:      TO_BE_FILLED
 License:    TO_BE_FILLED
index f27aae6..cd8e8c3 100755 (executable)
@@ -47,7 +47,9 @@ static void on_url_download_started(url_download_h download, const char *content
         eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_QUEUED);
         eventPtr->setResult(true);
 
-        thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        if (thisDownloadManager->m_changeEmitters[download]) {
+            thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        }
     }
     Catch (Exception)
     {
@@ -68,7 +70,9 @@ static void on_url_download_paused(url_download_h download, void *user_data)
         eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_PAUSED);
         eventPtr->setResult(true);
 
-        thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        if (thisDownloadManager->m_changeEmitters[download]) {
+            thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        }
     }
     Catch (Exception)
     {
@@ -119,7 +123,9 @@ static void on_url_download_completed(url_download_h download, const char * path
         eventPtr->setDownloadState(TIZEN_ENUM_DOWNLOAD_STATE_COMPLETED);
         eventPtr->setResult(true);
 
-        thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        if (thisDownloadManager->m_changeEmitters[download]) {
+            thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        }
         thisDownloadManager->m_changeEmitters.erase(download);
 
         ret = url_download_destroy(download);
@@ -181,7 +187,9 @@ static void on_url_download_stopped(url_download_h download, url_download_error_
         eventPtr->setExceptionCode(ExceptionCodes::UnknownException);
     }
 
-    thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+    if (thisDownloadManager->m_changeEmitters[download]) {
+        thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+    }
     thisDownloadManager->m_changeEmitters.erase(download);
 
     ret = url_download_destroy(download);
@@ -205,7 +213,9 @@ static void on_url_download_progress(url_download_h download, unsigned long long
         eventPtr->setTotalSize(total);
         eventPtr->setResult(true);
 
-        thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        if (thisDownloadManager->m_changeEmitters[download]) {
+            thisDownloadManager->m_changeEmitters[download]->emit(eventPtr);
+        }
     }
     Catch (Exception)
     {
@@ -257,27 +267,25 @@ void DownloadManager::OnRequestReceived(const IEventStartDownloadPtr &event)
             }
         }
 
-        if(event->getEmitter()) {
-            ret = url_download_set_started_cb(download, on_url_download_started, this);
-            if (ret != URL_DOWNLOAD_ERROR_NONE) {
-                ThrowMsg(PlatformException, "Platform error while setting started cb: "<<ret);
-            }
-            ret = url_download_set_paused_cb(download, on_url_download_paused, this);
-            if (ret != URL_DOWNLOAD_ERROR_NONE) {
-                ThrowMsg(PlatformException, "Platform error while setting paused cb: "<<ret);
-            }
-            ret = url_download_set_stopped_cb(download, on_url_download_stopped, this);
-            if (ret != URL_DOWNLOAD_ERROR_NONE) {
-                ThrowMsg(PlatformException, "Platform error while setting stopped cb: "<<ret);
-            }
-            ret = url_download_set_completed_cb(download, on_url_download_completed, this);
-            if (ret != URL_DOWNLOAD_ERROR_NONE) {
-                ThrowMsg(PlatformException, "Platform error while setting completed cb: "<<ret);
-            }
-            ret = url_download_set_progress_cb(download, on_url_download_progress, this);
-            if (ret != URL_DOWNLOAD_ERROR_NONE) {
-                ThrowMsg(PlatformException, "Platform error while setting progress cb: "<<ret);
-            }
+        ret = url_download_set_started_cb(download, on_url_download_started, this);
+        if (ret != URL_DOWNLOAD_ERROR_NONE) {
+            ThrowMsg(PlatformException, "Platform error while setting started cb: "<<ret);
+        }
+        ret = url_download_set_paused_cb(download, on_url_download_paused, this);
+        if (ret != URL_DOWNLOAD_ERROR_NONE) {
+            ThrowMsg(PlatformException, "Platform error while setting paused cb: "<<ret);
+        }
+        ret = url_download_set_stopped_cb(download, on_url_download_stopped, this);
+        if (ret != URL_DOWNLOAD_ERROR_NONE) {
+            ThrowMsg(PlatformException, "Platform error while setting stopped cb: "<<ret);
+        }
+        ret = url_download_set_completed_cb(download, on_url_download_completed, this);
+        if (ret != URL_DOWNLOAD_ERROR_NONE) {
+            ThrowMsg(PlatformException, "Platform error while setting completed cb: "<<ret);
+        }
+        ret = url_download_set_progress_cb(download, on_url_download_progress, this);
+        if (ret != URL_DOWNLOAD_ERROR_NONE) {
+            ThrowMsg(PlatformException, "Platform error while setting progress cb: "<<ret);
         }
 
         ret = url_download_start(download, &id);
index efd6c29..9083371 100644 (file)
@@ -516,8 +516,9 @@ void Mms::updatePriority()
         LogError("Wrong priority");
         Throw(WrtDeviceApis::Commons::PlatformException);
     }
+    LogInfo("priority : " << priority);
+
     if (MSG_SUCCESS !=
-//        msg_set_priority_info(m_messageData, MSG_MESSAGE_PRIORITY_LOW)) {
        msg_set_int_value(m_messageData, MSG_MESSAGE_PRIORITY_INT, priority)){
         
         LogError("Error during setting priority");
@@ -577,6 +578,8 @@ void Mms::updateRecipientList()
                        }
                        LogDebug("adding to[" << i << "]=" << to[i]);
 
+                       msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
                        if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, 
                                MSG_RECIPIENTS_TYPE_TO) != MSG_SUCCESS) 
                        {
@@ -612,6 +615,8 @@ void Mms::updateRecipientList()
                        }
                        LogDebug("adding cc[" << i << "]=" << cc[i]);
 
+                       msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
                        if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, 
                                MSG_RECIPIENTS_TYPE_CC) != MSG_SUCCESS) 
                        {
@@ -646,6 +651,8 @@ void Mms::updateRecipientList()
                        }
                        LogDebug("adding bcc[" << i << "]=" << bcc[i]);
 
+                       msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
                        if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, 
                                MSG_RECIPIENTS_TYPE_BCC) != MSG_SUCCESS) 
                        {
@@ -1272,16 +1279,18 @@ void Mms::sendingCallback(msg_struct_t sent_status)
 //     msg_get_int_value(request_data, MSG_REQUEST_REQUESTID_INT, &tempInt);
        int status = MSG_NETWORK_SEND_FAIL;
        msg_get_int_value(sent_status, MSG_SENT_STATUS_NETWORK_STATUS_INT, &status);
+       
+       LogDebug("status : " << status);
+       
        if (MSG_NETWORK_SEND_SUCCESS == status) {
-        LogDebug("sending ok");
-        setSendingStatusOk();
-       setMessageStatus(MESSAGE_STATUS_SENT);
-    } else {
-        LogError("sending failed: " <<
-               static_cast<unsigned int>(status));
-        setSendingStatusFailed();
-          setMessageStatus(MESSAGE_STATUS_FAILED);
-    }
+               LogDebug("sending ok");
+               setSendingStatusOk();
+               setMessageStatus(MESSAGE_STATUS_SENT);
+       } else {
+               LogError("sending failed: " << static_cast<unsigned int>(status));
+               setSendingStatusFailed();
+               setMessageStatus(MESSAGE_STATUS_FAILED);
+       }
 }
 
 void Mms::sendCancel(int handle)
@@ -1335,22 +1344,23 @@ void Mms::setSendingStatusFailed()
        else 
        {
                ReqReceiverMessage *requestReceiver = getRequestReceiver();
+               EventMessagingServicePtr event = getMessagingServiceEvent();
                if (requestReceiver) 
                {
                        LogError("calling JS error callback");
-                       EventSendMessagePtr event = getSendMessageEvent();
                        event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
-
                        msg_get_list_handle(m_messageData, MSG_MESSAGE_ADDR_LIST_STRUCT, (void **)&addr_list);
-                
                        nToCnt = addr_list->nCount;
-               
+
+                       LogDebug("nToCnt : " << nToCnt);
+
                        for ( int index=0; index < nToCnt; index++)
                        {
                                msg_get_str_value(addr_list->msg_struct_info[index], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, strNumber, MAX_ADDRESS_VAL_LEN);
                                event->m_failRecipients.push_back(strNumber);
                        }
                }
+               requestReceiver->WrtDeviceApis::Commons::EventRequestReceiver< EventMessagingService >::ManualAnswer(event);
        }
 }
 
index d31a094..9a3dbdf 100644 (file)
@@ -547,23 +547,21 @@ void Sms::updateBody()
 void Sms::updateTo()
 {
        // check if abstraction recipient value has been changed
-    if (getToRecipients().isValid()) {
-        return;
-    }
+       if (getToRecipients().isValid()) {
+               return;
+       }
 
        LogInfo("SMS updating platform recipients");
 
-       // reset addresses in platform structure
-//       msg_reset_address(m_messageData);
        msg_struct_list_s *addr_list = NULL;
        msg_get_list_handle(m_messageData, MSG_MESSAGE_ADDR_LIST_STRUCT, (void **)&addr_list);
        int nToCnt = addr_list->nCount;
 
        LogInfo("nToCnt size  " << nToCnt);
-       
-       if (nToCnt > 0)         
-       {               
-               for (int i = 0; i < nToCnt; i++) {      
+
+       if (nToCnt > 0)
+       {
+               for (int i = 0; i < nToCnt; i++) {
                        msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, "", 0);
                        msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_DISPLAYNAME_STR, "", 0);
                        msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
@@ -574,32 +572,34 @@ void Sms::updateTo()
                addr_list->nCount = nToCnt;
        }
 
-    vector<string> to = getToRecipients().getRecipients();
+       vector<string> to = getToRecipients().getRecipients();
        // update addresses in platform structure
-       if (to.size()) 
+       if (to.size())
        {
-    LogInfo("updating to");
-               for (size_t i = 0; i < to.size(); i++) 
+               LogInfo("updating to");
+               for (size_t i = 0; i < to.size(); i++)
                {
                        string tmpAddr = to[i];
                        if(validatePhoneNumber(tmpAddr))
                        {
-                               if (i >= MAX_TO_ADDRESS_CNT) 
+                               if (i >= MAX_TO_ADDRESS_CNT)
                                {
-            LogError("max number of recipient exceeded");
-            break;
-        }
-        LogDebug("adding to[" << i << "]=" << to[i]);
-                               
-                               if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT, 
-                                       MSG_RECIPIENTS_TYPE_TO) != MSG_SUCCESS) 
+                                       LogError("max number of recipient exceeded");
+                                       break;
+                               }
+                               LogDebug("adding to[" << i << "]=" << to[i]);
+
+                               msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_TYPE_INT, MSG_ADDRESS_TYPE_PLMN);
+
+                               if (msg_set_int_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_RECIPIENT_TYPE_INT,
+                               MSG_RECIPIENTS_TYPE_TO) != MSG_SUCCESS)
                                {
                                        LogError("problem with adding to address");
                                        ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Problem with adding to address");
                                }
 
-                               if(msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR, 
-                                       const_cast<char*>(to[i].c_str()), to[i].size()) != MSG_SUCCESS) 
+                               if(msg_set_str_value(addr_list->msg_struct_info[i], MSG_ADDRESS_INFO_ADDRESS_VALUE_STR,
+                               const_cast<char*>(to[i].c_str()), to[i].size()) != MSG_SUCCESS)
                                {
                                        LogError("problem with adding to address");
                                        ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Problem with adding to address");
@@ -607,16 +607,16 @@ void Sms::updateTo()
 
                                addr_list->nCount ++;
                                LogDebug("addr_list->nCount =" << addr_list->nCount);
-            }
+                       }
                        else
                        {
-            LogError("wrong phone number format");
+                               LogError("wrong phone number format");
                        }
-        }
-    }
+               }
+       }
+
+       setToValidity(true);
 
-    setToValidity(true);
-       
 }
 
 void Sms::updateFrom()
index c54d879..34ca9a5 100755 (executable)
@@ -1074,14 +1074,13 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Device) {
     std::ifstream file("/usr/etc/info.ini");
     std::string line;
     std::string result = "";    
-    std::string result2 = "";
 
     if(!file) {
         LogDebug("version info file not found");
     } else {
         while ((std::getline(file, line).rdstate() & (std::ifstream::failbit | std::ifstream::eofbit)) == 0) {
-            if (pcrecpp::RE("Build=(\\w+)-(\\w+)").PartialMatch(line, &result, &result2)) {
-                device->version = result + "-" + result2;
+            if (pcrecpp::RE("Build=(\\w+)").PartialMatch(line, &result)) {
+                device->version = result;
                 LogDebug("version : " << device->version);
                 break;
             }