--- a/emailuis/nmailuiengine/src/nmdatamanager.cpp Fri May 14 04:17:40 2010 +0300
+++ b/emailuis/nmailuiengine/src/nmdatamanager.cpp Fri May 14 04:41:45 2010 +0300
@@ -280,4 +280,32 @@
}
+/*!
+ Returns folder type by id
+ \param mailboxId The ID of the mailbox containing the folder
+
+ \param folderId The ID of the folder
+
+ \return Folder type
+*/
+NmFolderType NmDataManager::folderTypeById(NmId mailboxId, NmId folderId)
+{
+ NmFolderType folderType(NmFolderOther);
+ if (getStandardFolderId(mailboxId,NmFolderInbox)==folderId){
+ folderType=NmFolderInbox;
+ }
+ else if (getStandardFolderId(mailboxId,NmFolderOutbox)==folderId){
+ folderType=NmFolderOutbox;
+ }
+ else if (getStandardFolderId(mailboxId,NmFolderDrafts)==folderId){
+ folderType=NmFolderDrafts;
+ }
+ else if (getStandardFolderId(mailboxId,NmFolderSent)==folderId){
+ folderType=NmFolderSent;
+ }
+ else if (getStandardFolderId(mailboxId,NmFolderDeleted)==folderId){
+ folderType=NmFolderDeleted;
+ }
+ return folderType;
+}