82 CVRRecViewModel::CVRRecViewModel() |
82 CVRRecViewModel::CVRRecViewModel() |
83 : iStateArray( 2 ), |
83 : iStateArray( 2 ), |
84 iLabelSets( 2 ), |
84 iLabelSets( 2 ), |
85 iPreviousCallState( EPSCTsyCallStateNone ), |
85 iPreviousCallState( EPSCTsyCallStateNone ), |
86 iCanHandleCommands( ETrue ), |
86 iCanHandleCommands( ETrue ), |
87 iCBAEnabled( ETrue ) |
87 iCBAEnabled( ETrue ), |
|
88 iIsDriveReady( ETrue ) |
88 { |
89 { |
89 } |
90 } |
90 |
91 |
91 |
92 |
92 // --------------------------------------------------------------------------- |
93 // --------------------------------------------------------------------------- |
802 // special cases (end and the beginning of the clip) can be handled here. |
803 // special cases (end and the beginning of the clip) can be handled here. |
803 // --------------------------------------------------------------------------- |
804 // --------------------------------------------------------------------------- |
804 // |
805 // |
805 TInt CVRRecViewModel::ButtonState( TInt aButtonId ) const |
806 TInt CVRRecViewModel::ButtonState( TInt aButtonId ) const |
806 { |
807 { |
807 if(CVRUSBStateHanlder::IsUsbActive()) |
808 if(CVRUSBStateHanlder::IsUsbActive() || !iIsDriveReady) |
808 { |
809 { |
809 return EDimmed; |
810 return EDimmed; |
810 } |
811 } |
811 // Disable rewind button if there's nothing to rewind |
812 // Disable rewind button if there's nothing to rewind |
812 if ( aButtonId == EButtonRewind && |
813 if ( aButtonId == EButtonRewind && |
2430 if ( ( ( storageDrive == VRUtils::GetRemovableMassStorageL()) || |
2431 if ( ( ( storageDrive == VRUtils::GetRemovableMassStorageL()) || |
2431 ( iMemo != NULL && iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL() ) ) && |
2432 ( iMemo != NULL && iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL() ) ) && |
2432 ( !CVRUSBStateHanlder::IsUsbActive() ) ) |
2433 ( !CVRUSBStateHanlder::IsUsbActive() ) ) |
2433 { |
2434 { |
2434 //exit for mmc dismount |
2435 //exit for mmc dismount |
2435 TWsEvent event; |
2436 SendExitEvent(); |
2436 event.SetType( EAknSoftkeyExit ); |
2437 } |
2437 event.SetTimeNow(); |
2438 } |
2438 event.SetHandle( CCoeEnv::Static()->WsSession().WsHandle() ); |
2439 |
2439 CCoeEnv::Static()->WsSession().SendEventToWindowGroup( CEikonEnv::Static()->RootWin().Identifier(), event ); |
2440 // --------------------------------------------------------------------------- |
2440 return; |
2441 // CVRRecViewModel::SendExitEvent |
2441 } |
2442 // |
2442 } |
2443 // --------------------------------------------------------------------------- |
|
2444 // |
|
2445 void CVRRecViewModel::SendExitEvent() |
|
2446 { |
|
2447 TWsEvent event; |
|
2448 event.SetType( EAknSoftkeyExit ); |
|
2449 event.SetTimeNow(); |
|
2450 event.SetHandle( CCoeEnv::Static()->WsSession().WsHandle() ); |
|
2451 CCoeEnv::Static()->WsSession().SendEventToWindowGroup( CEikonEnv::Static()->RootWin().Identifier(), event ); |
|
2452 return; |
|
2453 } |
|
2454 |
|
2455 // --------------------------------------------------------------------------- |
|
2456 // CVRRecViewModel::SetIsDriveReady |
|
2457 // |
|
2458 // --------------------------------------------------------------------------- |
|
2459 // |
|
2460 void CVRRecViewModel::SetIsDriveReady(TBool aIsDriveReady) |
|
2461 { |
|
2462 iIsDriveReady = aIsDriveReady; |
|
2463 } |
|
2464 |
|
2465 // --------------------------------------------------------------------------- |
|
2466 // CVRRecViewModel::GetIsDriveReady |
|
2467 // |
|
2468 // --------------------------------------------------------------------------- |
|
2469 // |
|
2470 TBool CVRRecViewModel::GetIsDriveReady() |
|
2471 { |
|
2472 return iIsDriveReady; |
|
2473 } |
2443 |
2474 |
2444 |
2475 |
2445 // End of file |
2476 // End of file |