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 ) |
|
89 { |
88 { |
90 } |
89 } |
91 |
90 |
92 |
91 |
93 // --------------------------------------------------------------------------- |
92 // --------------------------------------------------------------------------- |
803 // special cases (end and the beginning of the clip) can be handled here. |
802 // special cases (end and the beginning of the clip) can be handled here. |
804 // --------------------------------------------------------------------------- |
803 // --------------------------------------------------------------------------- |
805 // |
804 // |
806 TInt CVRRecViewModel::ButtonState( TInt aButtonId ) const |
805 TInt CVRRecViewModel::ButtonState( TInt aButtonId ) const |
807 { |
806 { |
808 if(CVRUSBStateHanlder::IsUsbActive() || !iIsDriveReady) |
807 if(CVRUSBStateHanlder::IsUsbActive()) |
809 { |
808 { |
810 return EDimmed; |
809 return EDimmed; |
811 } |
810 } |
812 // Disable rewind button if there's nothing to rewind |
811 // Disable rewind button if there's nothing to rewind |
813 if ( aButtonId == EButtonRewind && |
812 if ( aButtonId == EButtonRewind && |
2431 if ( ( ( storageDrive == VRUtils::GetRemovableMassStorageL()) || |
2430 if ( ( ( storageDrive == VRUtils::GetRemovableMassStorageL()) || |
2432 ( iMemo != NULL && iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL() ) ) && |
2431 ( iMemo != NULL && iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL() ) ) && |
2433 ( !CVRUSBStateHanlder::IsUsbActive() ) ) |
2432 ( !CVRUSBStateHanlder::IsUsbActive() ) ) |
2434 { |
2433 { |
2435 //exit for mmc dismount |
2434 //exit for mmc dismount |
2436 SendExitEvent(); |
2435 TWsEvent event; |
2437 } |
2436 event.SetType( EAknSoftkeyExit ); |
2438 } |
2437 event.SetTimeNow(); |
2439 |
2438 event.SetHandle( CCoeEnv::Static()->WsSession().WsHandle() ); |
2440 // --------------------------------------------------------------------------- |
2439 CCoeEnv::Static()->WsSession().SendEventToWindowGroup( CEikonEnv::Static()->RootWin().Identifier(), event ); |
2441 // CVRRecViewModel::SendExitEvent |
2440 return; |
2442 // |
2441 } |
2443 // --------------------------------------------------------------------------- |
2442 } |
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 } |
|
2474 |
2443 |
2475 |
2444 |
2476 // End of file |
2445 // End of file |