messagingapp/msgservices/msgserviceapp/src/msgstorehandler.cpp
changeset 38 4e4b6adb1024
parent 37 518b245aa84c
child 41 25fe1fe642e3
equal deleted inserted replaced
37:518b245aa84c 38:4e4b6adb1024
   153 //----------------------------------------------------------------------------
   153 //----------------------------------------------------------------------------
   154 void MsgStoreHandler::deleteMessage(int msgId)
   154 void MsgStoreHandler::deleteMessage(int msgId)
   155     {
   155     {
   156     iMsvSession->RemoveEntry(msgId);
   156     iMsvSession->RemoveEntry(msgId);
   157     }
   157     }
       
   158 
       
   159 //----------------------------------------------------------------------------
       
   160 // MsgStoreHandler::isDraftMessage
       
   161 // @see header
       
   162 //----------------------------------------------------------------------------
       
   163 bool MsgStoreHandler::isDraftMessage(int msgId)
       
   164 {       
       
   165     bool draftmsg = false;
       
   166     CMsvEntry* cEntry = NULL;
       
   167     TRAPD(err, cEntry = iMsvSession->GetEntryL(msgId));
       
   168     if ( err == KErrNone)
       
   169     {
       
   170         TMsvEntry msvEntry = cEntry->Entry();
       
   171         TMsvId parent = msvEntry.Parent();
       
   172         if(parent == KMsvDraftEntryIdValue)
       
   173         {
       
   174             draftmsg = true;  
       
   175         }
       
   176     }
       
   177 
       
   178     delete cEntry;
       
   179     return draftmsg;
       
   180 }
   158 // End of file
   181 // End of file