Update change log and spec for wrt-plugins-tizen_0.2.74
authorKisub Song <kisubs.song@samsung.com>
Wed, 29 Aug 2012 02:03:55 +0000 (11:03 +0900)
committerKisub Song <kisubs.song@samsung.com>
Wed, 29 Aug 2012 02:07:59 +0000 (11:07 +0900)
Changed Modules : Messaging

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

[Issue#] N_SE-7085
[Problem] email account initialize fail with Active sync mail account
[Cause] incoming user name is not exist but it is not checked
[Solution] check incoming user name when initialize accounts

[SCMRequest] N/A

Change-Id: Icc0c38193ccd44f29d7a6705929acf334f1d925c

debian/changelog
packaging/wrt-plugins-tizen.spec
src/platform/API/Messaging/ReqReceiverMessage.cpp
src/platform/Tizen/Messaging/Messaging.cpp

index b7a836c..571ebd9 100644 (file)
@@ -1,3 +1,11 @@
+wrt-plugins-tizen (0.2.74) unstable; urgency=low
+
+  * Bug fix on Messaging
+  * Git : slp/pkgs/w/wrt-plugins-tizen
+  * Tag : wrt-plugins-tizen_0.2.74
+
+ -- Kisub Song <kisubs.song@samsung.com>  Wed, 29 Aug 2012 10:59:18 +0900
+
 wrt-plugins-tizen (0.2.73) unstable; urgency=low
 
   * Bug fix on Messaging
index 31f4269..df7cae6 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.2.73
+Version:    0.2.74
 Release:    0
 Group:      TO_BE_FILLED
 License:    TO_BE_FILLED
index b812fda..7553418 100644 (file)
@@ -429,8 +429,6 @@ void ReqReceiverMessage::OnRequestReceived(const EventQueryMessagesPtr& event)
                }
                else
                {
-//                     LogDebug("enter");              
-//                     tmp = IMessaging::getInstance().findMessages(event->getFilter(), event->getSortMode(), event->getLimit(), event->getOffset());
                        Throw(WrtDeviceApis::Commons::InvalidArgumentException);
                }
 
@@ -444,6 +442,10 @@ void ReqReceiverMessage::OnRequestReceived(const EventQueryMessagesPtr& event)
                MsgLogError("InvalidArgumentException");
                event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::InvalidArgumentException);
        }
+       Catch (exception) {
+               MsgLogError("platform exception");
+               event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::UnknownException);
+       }
 }
 
 void ReqReceiverMessage::OnRequestReceived(const EventGetConversationIdPtr& event)
index 9edf411..65bb885 100644 (file)
@@ -855,38 +855,62 @@ vector<string> Messaging::getEmailIds(FolderType folder)
 */
 vector<EmailAccountInfo> Messaging::getEmailAccounts() const
 {
-    email_account_t* accounts = NULL;
-    int count = 0;
-    Try {
-        if (!email_get_account_list(&accounts, &count)) {
-            ThrowMsg(WrtDeviceApis::Commons::PlatformException,
-                     "Couldn't get e-mail accounts.");
-        }
+       LogError("enter");
+       email_account_t* accounts = NULL;
+       int count = 0;
+       Try {
+               if (!email_get_account_list(&accounts, &count)) {
+                       ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Couldn't get e-mail accounts.");
+               }
 
-        if (0 == count) {
-            ThrowMsg(WrtDeviceApis::Commons::PlatformException, "No e-mail account found.");
-        }
+               LogError(       "count : " << count);
 
-        vector<Api::Messaging::EmailAccountInfo> result;
-        for (int i = 0; i < count; ++i) {
-            Api::Messaging::EmailAccountInfo account(accounts[i].account_id,
-                                          accounts[i].incoming_server_user_name,
-                                          accounts[i].user_email_address);
-            result.push_back(account);
-        }
+               if (0 == count) {
+                       ThrowMsg(WrtDeviceApis::Commons::PlatformException, "No e-mail account found.");
+               }
 
-        if (accounts != NULL) {
-            email_free_account(&accounts, count);
-        }
+               vector<Api::Messaging::EmailAccountInfo> result;
+               for (int i = 0; i < count; ++i) 
+               {
+                       if(accounts[i].incoming_server_user_name  !=  NULL)
+                       {
+                               LogError("server user name is NULL");
+                               Api::Messaging::EmailAccountInfo account(accounts[i].account_id,
+                                                                                       accounts[i].incoming_server_user_name,
+                                                                                       accounts[i].user_email_address);
+                               result.push_back(account);
+                       }
+                       else
+                       {
+                               LogError("normal case");
+                               std::string Unknown = "UNKNOWN";
+                               Api::Messaging::EmailAccountInfo account(accounts[i].account_id,
+                                                                                       Unknown,
+                                                                                       accounts[i].user_email_address);
+                               result.push_back(account);
+                       }
+               }
 
-        return result;
-    }
-    Catch(WrtDeviceApis::Commons::PlatformException) {
-        if (accounts != NULL) {
-            email_free_account(&accounts, count);
-        }
-        throw;
-    }
+               if (accounts != NULL) {
+                       email_free_account(&accounts, count);
+               }
+               LogError("end");
+               return result;
+       }
+       Catch(WrtDeviceApis::Commons::PlatformException) {
+               if (accounts != NULL) {
+                       email_free_account(&accounts, count);
+               }
+               LogError("PlatformException");
+               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "No e-mail account found.");
+       }
+       Catch(WrtDeviceApis::Commons::UnknownException) {
+               if (accounts != NULL) {
+                       email_free_account(&accounts, count);
+               }
+               LogError("UnknownException");
+               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Couldn't convert e-mail account id");
+       }
 }
 
 int Messaging::getEmailAccountId(const std::string& account)