messagingapp/msgui/unifiededitor/src/msgunieditorview.cpp
changeset 41 25fe1fe642e3
parent 38 4e4b6adb1024
child 48 4f501b74aeb1
equal deleted inserted replaced
40:224522e33db9 41:25fe1fe642e3
   300     }
   300     }
   301     
   301     
   302     mCanSaveToDrafts = false;  
   302     mCanSaveToDrafts = false;  
   303 }
   303 }
   304 
   304 
   305 void MsgUnifiedEditorView::forwardMessage(ConvergedMessageId& messageId,
   305 void MsgUnifiedEditorView::fetchMessageFromStore(
   306     ConvergedMessage::MessageType messageType )
   306         ConvergedMessageId& messageId,
       
   307         ConvergedMessage::MessageType messageType,
       
   308         int editorOperation)
   307 {
   309 {
   308     if(!mPluginLoader)
   310     if(!mPluginLoader)
   309     {
   311     {
   310         mPluginLoader = new UniEditorPluginLoader(this);
   312         mPluginLoader = new UniEditorPluginLoader(this);
   311   
       
   312     }
   313     }
   313     UniEditorPluginInterface* pluginInterface = NULL;
   314     UniEditorPluginInterface* pluginInterface = NULL;
   314     if( messageType == ConvergedMessage::Mms )
   315     if( messageType == ConvergedMessage::Mms )
   315     {
   316     {
   316         pluginInterface =
   317         pluginInterface =
   323     }
   324     }
   324 
   325 
   325     //Fetch the converged message from the msgId
   326     //Fetch the converged message from the msgId
   326     ConvergedMessage* msg;
   327     ConvergedMessage* msg;
   327     msg = pluginInterface->convertFrom(messageId.getId(),
   328     msg = pluginInterface->convertFrom(messageId.getId(),
   328         UniEditorPluginInterface::Forward);
   329                     (UniEditorPluginInterface::EditorOperation)editorOperation);
   329 
       
   330     if( msg != NULL )
   330     if( msg != NULL )
   331     {
   331     {
   332         //Populate the content inside editor
   332         //Populate the content inside editor
   333         populateContentIntoEditor(*msg);
   333         populateContentIntoEditor(*msg);
   334         delete msg;
   334         delete msg;
   365             contactsFetched(editorData.at(2));
   365             contactsFetched(editorData.at(2));
   366         }
   366         }
   367         break;
   367         break;
   368         case MsgBaseView::FORWARD_MSG:
   368         case MsgBaseView::FORWARD_MSG:
   369         {
   369         {
   370             forwardMessage(*messageDetails->id(), messageDetails->messageType());
   370             fetchMessageFromStore(*messageDetails->id(),
       
   371                                    messageDetails->messageType(),
       
   372                                    UniEditorPluginInterface::Forward);
       
   373         }
       
   374         break;
       
   375         case MsgBaseView::REPLY_MSG:
       
   376         {
       
   377             fetchMessageFromStore(*messageDetails->id(),
       
   378                                    messageDetails->messageType(),
       
   379                                    UniEditorPluginInterface::Reply);
       
   380         }
       
   381         break;
       
   382         case MsgBaseView::REPLY_ALL_MSG:
       
   383         {
       
   384             fetchMessageFromStore(*messageDetails->id(),
       
   385                                    messageDetails->messageType(),
       
   386                                    UniEditorPluginInterface::ReplyAll);
   371         }
   387         }
   372         break;
   388         break;
   373         default:
   389         default:
   374         break;
   390         break;
   375     }
   391     }