emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp
changeset 3 a4d6f1ea0416
parent 2 5253a20d2a1e
child 4 e7aa27f58ae1
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp	Mon Jan 18 20:08:26 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp	Tue Jan 26 11:45:42 2010 +0200
@@ -705,6 +705,11 @@
 //            HandleNewMailboxEventL( aMailbox );
             break;
             }
+        case TFSEventMailboxRenamed:
+            {
+            HandleMailboxRenamedEventL( aMailbox );
+            break;
+            }
         case TFSEventMailboxDeleted:
             {
             HandleMailboxDeletedEventL( aMailbox );
@@ -788,6 +793,28 @@
     }
 
 // ---------------------------------------------------------
+// CMailCpsHandler::HandleMailborRenamedEventL
+// ---------------------------------------------------------
+//
+void CMailCpsHandler::HandleMailboxRenamedEventL( const TFSMailMsgId aMailbox )
+    {
+    for ( TInt ii = iAccountsArray.Count() - 1; ii >= 0; --ii )
+        {
+        if ( iAccountsArray[ii]->iMailboxId.Id() == aMailbox.Id() )
+            {
+            CFSMailBox* mailbox = NULL;
+            mailbox = MailClient().GetMailBoxByUidL( aMailbox );
+            if ( mailbox )
+                {
+                iAccountsArray[ii]->SetMailboxName( mailbox->GetName() );
+                }
+            delete mailbox;
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------
 // CMailCpsHandler::HandleMailboxDeletedEventL
 // ---------------------------------------------------------
 //