harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp
changeset 20 6dfc5f825351
parent 1 acef663c1218
child 40 910a23996aa0
child 54 a3cc46f37772
equal deleted inserted replaced
3:b73a2e62868f 20:6dfc5f825351
    62 //
    62 //
    63 CMessageMonitorPlugin::~CMessageMonitorPlugin() 
    63 CMessageMonitorPlugin::~CMessageMonitorPlugin() 
    64 	{
    64 	{
    65 	WRITELOG("ENTER ~CMessageMonitorPlugin");
    65 	WRITELOG("ENTER ~CMessageMonitorPlugin");
    66     delete iMsvSession;
    66     delete iMsvSession;
       
    67     delete iMessageScannerAO;
    67 	WRITELOG("END ~CMessageMonitorPlugin");	
    68 	WRITELOG("END ~CMessageMonitorPlugin");	
    68 	}
    69 	}
    69 
    70 
    70 
    71 
    71 // -----------------------------------------------------------------------------
    72 // -----------------------------------------------------------------------------
   332             
   333             
   333                
   334                
   334 #ifdef __WINSCW__
   335 #ifdef __WINSCW__
   335 		else if (!err && KMsvDraftEntryId == aFolderId2 && KMsvGlobalOutBoxIndexEntryId == aFolderId1 )
   336 		else if (!err && KMsvDraftEntryId == aFolderId2 && KMsvGlobalOutBoxIndexEntryId == aFolderId1 )
   336 			{
   337 			{
   337 			CClientMtmRegistry* clientMtmReg;
   338 		    if( entry.iMtm.iUid != KUidMsgTypeMultimedia.iUid )
   338 			clientMtmReg = CClientMtmRegistry::NewL(*iMsvSession);
   339 		        {
   339 			CleanupStack::PushL(clientMtmReg);
   340                 CClientMtmRegistry* clientMtmReg;
   340 			
   341                 clientMtmReg = CClientMtmRegistry::NewL(*iMsvSession);
   341 			
   342                 CleanupStack::PushL(clientMtmReg);
   342 			CSmsClientMtm* smsMtm = static_cast<CSmsClientMtm*>(clientMtmReg->NewMtmL(KUidMsgTypeSMS));	
   343             
   343 			CleanupStack::PushL(smsMtm);
   344                 CSmsClientMtm* smsMtm = static_cast<CSmsClientMtm*>(clientMtmReg->NewMtmL(KUidMsgTypeSMS)); 
   344 			smsMtm->SwitchCurrentEntryL( msgId );
   345                 CleanupStack::PushL(smsMtm);
   345 			
   346                 smsMtm->SwitchCurrentEntryL( msgId );
   346 			TMsvSelectionOrdering selection;
   347             
   347 			selection.SetShowInvisibleEntries(ETrue);
   348                 TMsvSelectionOrdering selection;
   348 			
   349                 selection.SetShowInvisibleEntries(ETrue);
   349 			CMsvEntry* parentEntry = CMsvEntry::NewL( smsMtm->Session(),
   350             
   350                 smsMtm->Entry().Entry().Parent(), selection );
   351                 CMsvEntry* parentEntry = CMsvEntry::NewL( smsMtm->Session(),
       
   352                     smsMtm->Entry().Entry().Parent(), selection );
   351              
   353              
   352              CleanupStack::PushL(parentEntry);
   354                 CleanupStack::PushL(parentEntry);
   353         	// Move the message
   355                 // Move the message
   354         	TRAP_IGNORE( parentEntry->MoveL( msgId, KMsvSentEntryId ) );
   356                 TRAP_IGNORE( parentEntry->MoveL( msgId, KMsvSentEntryId ) );
   355         	CleanupStack::PopAndDestroy(3,clientMtmReg); // parentEntry
   357                 CleanupStack::PopAndDestroy(3,clientMtmReg); // parentEntry
   356         				
   358 		        }
   357 
       
   358 			
       
   359 			}
   359 			}
   360 #endif             
   360 #endif             
   361 		
   361 		
   362         }
   362         }
   363 	WRITELOG("END CMessageMonitorPlugin::HandleMsgMovedL");	        
   363 	WRITELOG("END CMessageMonitorPlugin::HandleMsgMovedL");