emailuis/nmailuiengine/src/nmdatamanager.cpp
changeset 27 9ba4404ef423
parent 23 2dc6caa42ec3
child 30 759dc5235cdb
equal deleted inserted replaced
23:2dc6caa42ec3 27:9ba4404ef423
   278     }
   278     }
   279     return folderId;
   279     return folderId;
   280 }
   280 }
   281 
   281 
   282 
   282 
   283 
   283 /*!
       
   284     Returns folder type by id
       
   285 
       
   286     \param mailboxId The ID of the mailbox containing the folder
       
   287 
       
   288     \param folderId The ID of the folder 
       
   289 
       
   290     \return Folder type
       
   291 */
       
   292 NmFolderType NmDataManager::folderTypeById(NmId mailboxId, NmId folderId)
       
   293 {
       
   294     NmFolderType folderType(NmFolderOther);
       
   295     if (getStandardFolderId(mailboxId,NmFolderInbox)==folderId){
       
   296         folderType=NmFolderInbox;
       
   297     }
       
   298     else if (getStandardFolderId(mailboxId,NmFolderOutbox)==folderId){
       
   299         folderType=NmFolderOutbox; 
       
   300     }
       
   301     else if (getStandardFolderId(mailboxId,NmFolderDrafts)==folderId){
       
   302         folderType=NmFolderDrafts;
       
   303     }
       
   304     else if (getStandardFolderId(mailboxId,NmFolderSent)==folderId){
       
   305         folderType=NmFolderSent; 
       
   306     }    
       
   307     else if (getStandardFolderId(mailboxId,NmFolderDeleted)==folderId){
       
   308         folderType=NmFolderDeleted;  
       
   309     }    
       
   310     return folderType;
       
   311 }