harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp
changeset 1 acef663c1218
parent 0 c53acadfccc6
child 3 6752808b2036
equal deleted inserted replaced
0:c53acadfccc6 1:acef663c1218
    29 #include <msvuids.h>
    29 #include <msvuids.h>
    30 #include <mmsconst.h>
    30 #include <mmsconst.h>
    31 #include <mtclreg.h>
    31 #include <mtclreg.h>
    32 #include <smsclnt.h>
    32 #include <smsclnt.h>
    33 #include <driveinfo.h>
    33 #include <driveinfo.h>
    34 #include <PathInfo.h>
    34 #include <pathinfo.h>
    35 
    35 
    36 // CONSTANTS
    36 // CONSTANTS
    37 #ifdef _DEBUG
    37 #ifdef _DEBUG
    38 _LIT( KMsgMonitorHarvesterMsvPanic, "Message monitor harvester: Message server terminated" );
    38 _LIT( KMsgMonitorHarvesterMsvPanic, "Message monitor harvester: Message server terminated" );
    39 #endif
    39 #endif
   326             CleanupStack::Pop( uri );
   326             CleanupStack::Pop( uri );
   327             hd->SetEventType( EHarvesterAdd );
   327             hd->SetEventType( EHarvesterAdd );
   328             hd->SetTakeSnapshot( EFalse );
   328             hd->SetTakeSnapshot( EFalse );
   329             hd->SetBinary( EFalse );
   329             hd->SetBinary( EFalse );
   330             iMonitorPluginObserver->MonitorEvent( hd );
   330             iMonitorPluginObserver->MonitorEvent( hd );
   331             }          
   331             }
       
   332             
       
   333                
       
   334 #ifdef __WINSCW__
       
   335 		else if (!err && KMsvDraftEntryId == aFolderId2 && KMsvGlobalOutBoxIndexEntryId == aFolderId1 )
       
   336 			{
       
   337 			CClientMtmRegistry* clientMtmReg;
       
   338 			clientMtmReg = CClientMtmRegistry::NewL(*iMsvSession);
       
   339 			CleanupStack::PushL(clientMtmReg);
       
   340 			
       
   341 			
       
   342 			CSmsClientMtm* smsMtm = static_cast<CSmsClientMtm*>(clientMtmReg->NewMtmL(KUidMsgTypeSMS));	
       
   343 			CleanupStack::PushL(smsMtm);
       
   344 			smsMtm->SwitchCurrentEntryL( msgId );
       
   345 			
       
   346 			TMsvSelectionOrdering selection;
       
   347 			selection.SetShowInvisibleEntries(ETrue);
       
   348 			
       
   349 			CMsvEntry* parentEntry = CMsvEntry::NewL( smsMtm->Session(),
       
   350                 smsMtm->Entry().Entry().Parent(), selection );
       
   351              
       
   352              CleanupStack::PushL(parentEntry);
       
   353         	// Move the message
       
   354         	TRAP_IGNORE( parentEntry->MoveL( msgId, KMsvSentEntryId ) );
       
   355         	CleanupStack::PopAndDestroy(3,clientMtmReg); // parentEntry
       
   356         				
       
   357 
       
   358 			
       
   359 			}
       
   360 #endif             
       
   361 		
   332         }
   362         }
   333 	WRITELOG("END CMessageMonitorPlugin::HandleMsgMovedL");	        
   363 	WRITELOG("END CMessageMonitorPlugin::HandleMsgMovedL");	        
   334 	}
   364 	}
   335 
   365 
   336 
   366