messagingapp/msgui/msguiutils/src/mmsconformancecheck.cpp
changeset 44 36f374c67aa8
parent 43 35b64624a9e7
child 47 5b14749788d7
child 52 12db4185673b
equal deleted inserted replaced
43:35b64624a9e7 44:36f374c67aa8
   133                     iConfStatus &= ~EMmsConfNokFreeModeOnly;
   133                     iConfStatus &= ~EMmsConfNokFreeModeOnly;
   134                     iConfStatus &= ~EMmsConfNokScalingNeeded;
   134                     iConfStatus &= ~EMmsConfNokScalingNeeded;
   135                 }
   135                 }
   136                 else if (showNote)
   136                 else if (showNote)
   137                 {
   137                 {
   138                     HbMessageBox::question(INSERT_QUERY_CONFRM, this, SLOT(onDialogInsertMedia(HbAction*)));
   138                     HbMessageBox::question(INSERT_QUERY_CONFRM, this,
       
   139                                            SLOT(onDialogInsertMedia(HbAction*)),
       
   140                                            HbMessageBox::Yes | HbMessageBox::No);
   139                 }
   141                 }
   140                 else
   142                 else
   141                 {
   143                 {
   142                     //query not accepted. Stop insertion.
   144                     //query not accepted. Stop insertion.
   143                     return EInsertQueryAbort;
   145                     return EInsertQueryAbort;
   179 bool MmsConformanceCheck::validateMsgForForward(int messageId)
   181 bool MmsConformanceCheck::validateMsgForForward(int messageId)
   180 {
   182 {
   181     UniDataModelLoader* pluginLoader = new UniDataModelLoader();
   183     UniDataModelLoader* pluginLoader = new UniDataModelLoader();
   182     UniDataModelPluginInterface* pluginInterface =
   184     UniDataModelPluginInterface* pluginInterface =
   183             pluginLoader->getDataModelPlugin(ConvergedMessage::Mms);
   185             pluginLoader->getDataModelPlugin(ConvergedMessage::Mms);
   184     pluginInterface->setMessageId(messageId);
   186     int error = pluginInterface->setMessageId(messageId);
   185 
   187 
   186     //Check if slide count is greater than 1
   188     //Check if invalid id and slide count is greater than 1
   187     if (pluginInterface->slideCount() > 1)
   189     if ( (error != KErrNone) || pluginInterface->slideCount() > 1)
   188     {
   190     {
   189         delete pluginLoader;
   191         delete pluginLoader;
   190         return false;
   192         return false;
   191     }
   193     }
   192 
   194 
   193     //Check if message size is inside max mms composition limits
   195     //Check if message size is inside max mms composition limits
   194     if (pluginInterface->messageSize() > iMaxMmsSize)
   196     if (pluginInterface->messageSize() > iMaxMmsSize)
   195     {
   197     {
       
   198         delete pluginLoader;
   196         return false;
   199         return false;
   197     }
   200     }
   198 
   201 
   199     //If there is restricted content then return false
   202     //If there is restricted content then return false
   200     UniMessageInfoList slideContentList = pluginInterface->slideContent(0);
   203     UniMessageInfoList slideContentList = pluginInterface->slideContent(0);
   216         }
   219         }
   217 
   220 
   218     if (!retValue)
   221     if (!retValue)
   219     {
   222     {
   220         delete pluginLoader;
   223         delete pluginLoader;
   221 
       
   222         return false;
   224         return false;
   223     }
   225     }
   224 
   226 
   225     UniMessageInfoList modelAttachmentList = pluginInterface->attachmentList();
   227     UniMessageInfoList modelAttachmentList = pluginInterface->attachmentList();
   226 
   228 
   238         {
   240         {
   239             delete attachment;
   241             delete attachment;
   240         }
   242         }
   241 
   243 
   242     delete pluginLoader;
   244     delete pluginLoader;
   243 
       
   244     return retValue;
   245     return retValue;
   245 }
   246 }
   246 
   247 
   247 // -----------------------------------------------------------------------------
   248 // -----------------------------------------------------------------------------
   248 // MmsConformanceCheck::onDialogInsertMedia
   249 // MmsConformanceCheck::onDialogInsertMedia