voicerecorder/RecViewSrc/CVRRecViewModel.cpp
branchRCL_3
changeset 10 bb90e4148332
parent 8 49233e24b2ab
child 13 4e5b531d23cb
equal deleted inserted replaced
9:45ab7373901d 10:bb90e4148332
    52 #include "TVRState.h"
    52 #include "TVRState.h"
    53 #include "CVRMdaRecorder.h"
    53 #include "CVRMdaRecorder.h"
    54 #include "VRConsts.h"
    54 #include "VRConsts.h"
    55 #include "CVRSystemEventHandler.h"
    55 #include "CVRSystemEventHandler.h"
    56 #include "CVRUSBEventHandler.h"
    56 #include "CVRUSBEventHandler.h"
       
    57 #include "CVRMediaRemovalMonitor.h"
    57 #include "VRUtils.h"
    58 #include "VRUtils.h"
    58 #include "CVRRecViewModel.h"
    59 #include "CVRRecViewModel.h"
    59 #include <csxhelp/vorec.hlp.hrh>
    60 #include <csxhelp/vorec.hlp.hrh>
    60 
    61 
    61 
    62 
   113 		delete iCurrentCallHandler;
   114 		delete iCurrentCallHandler;
   114 		}
   115 		}
   115 
   116 
   116 	delete iCurrentUSBHandler;
   117 	delete iCurrentUSBHandler;
   117 	
   118 	
       
   119 	delete iCurrentMMCEjectHandler;
       
   120 	
   118 	}
   121 	}
   119 
   122 
   120 
   123 
   121 // ---------------------------------------------------------------------------
   124 // ---------------------------------------------------------------------------
   122 // CVRRecViewModel::ConstructFromResourceL
   125 // CVRRecViewModel::ConstructFromResourceL
   133     // for USB
   136     // for USB
   134     iCurrentUSBHandler = CVRUSBEventHandler::NewL();
   137     iCurrentUSBHandler = CVRUSBEventHandler::NewL();
   135 	iCurrentUSBHandler->Listen( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality,
   138 	iCurrentUSBHandler->Listen( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality,
   136 								 this );
   139 								 this );
   137 
   140 
       
   141 	//listen MMC eject
       
   142 	iCurrentMMCEjectHandler = CVRMediaRemovalMonitor::NewL(EDriveF, CEikonEnv::Static()->FsSession(), this);
   138 
   143 
   139 	if ( FeatureManager::FeatureSupported( KFeatureIdKeypadNoVoiceKey ) &&
   144 	if ( FeatureManager::FeatureSupported( KFeatureIdKeypadNoVoiceKey ) &&
   140 		FeatureManager::FeatureSupported( 
   145 		FeatureManager::FeatureSupported( 
   141 						KFeatureIdApplicationControllableAudioRouting ) )
   146 						KFeatureIdApplicationControllableAudioRouting ) )
   142 		{
   147 		{
  2443 
  2448 
  2444 	}
  2449 	}
  2445 
  2450 
  2446 
  2451 
  2447 // End of file
  2452 // End of file
       
  2453 
       
  2454 
       
  2455 // ---------------------------------------------------------------------------
       
  2456 // CVRRecViewModel::HandleMMCEjectEventL
       
  2457 // 
       
  2458 // ---------------------------------------------------------------------------
       
  2459 //
       
  2460 void CVRRecViewModel::HandleMMCEjectEventL()
       
  2461 	{
       
  2462 	
       
  2463 	// Actions to take when recording
       
  2464 	TInt storageDrive = VRUtils::MemoDriveL();   	 
       
  2465     if ( storageDrive == EDriveF)
       
  2466 		{
       
  2467         //exit for mmc dismount	
       
  2468         TWsEvent event;
       
  2469         event.SetType( EAknSoftkeyExit );
       
  2470         event.SetTimeNow();
       
  2471         event.SetHandle( CCoeEnv::Static()->WsSession().WsHandle() );
       
  2472         CCoeEnv::Static()->WsSession().SendEventToWindowGroup( CEikonEnv::Static()->RootWin().Identifier(), event );
       
  2473         return;       
       
  2474 		}
       
  2475 	}
       
  2476 
       
  2477 
       
  2478 // End of file