mmsharing/mmshui/src/musuilivesharingcontroller.cpp
branchRCL_3
changeset 19 95754dcd27ad
parent 18 0da2e08216b6
child 21 ce86b6d44a6d
equal deleted inserted replaced
18:0da2e08216b6 19:95754dcd27ad
   778 //
   778 //
   779 void CMusUiLiveSharingController::SessionEstablished()
   779 void CMusUiLiveSharingController::SessionEstablished()
   780     {
   780     {
   781     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionEstablished" );
   781     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionEstablished" );
   782     
   782     
       
   783     iSessionEstablished = ETrue;
       
   784     
   783     TRAPD( error, iResourceHandler->RequestCameraL( ETrue ) );
   785     TRAPD( error, iResourceHandler->RequestCameraL( ETrue ) );
   784     if ( error != KErrNone )
   786     if ( error != KErrNone )
   785         {
   787         {
   786         MUS_LOG1( "mus: [MUSUI ]     RequestCameraL leave code: %d", error )
   788         MUS_LOG1( "mus: [MUSUI ]     RequestCameraL leave code: %d", error )
   787         }
   789         }
   819 //
   821 //
   820 // -----------------------------------------------------------------------------
   822 // -----------------------------------------------------------------------------
   821 //
   823 //
   822 void CMusUiLiveSharingController::SessionTerminated()
   824 void CMusUiLiveSharingController::SessionTerminated()
   823     {
   825     {
   824     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionTerminated" );
   826     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionTerminated" );    
       
   827     iSessionEstablished = EFalse;
   825     if ( !ExitOccured() )
   828     if ( !ExitOccured() )
   826         {
   829         {
   827         DismissWaitDialog();
   830         DismissWaitDialog();
   828         
   831         
   829         TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
   832         TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
   837 // -----------------------------------------------------------------------------
   840 // -----------------------------------------------------------------------------
   838 //
   841 //
   839 void CMusUiLiveSharingController::SessionConnectionLost()
   842 void CMusUiLiveSharingController::SessionConnectionLost()
   840     {
   843     {
   841     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionConnectionLost" );
   844     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionConnectionLost" );
       
   845     iSessionEstablished = EFalse;
   842     DismissWaitDialog();
   846     DismissWaitDialog();
   843     if ( !ExitOccured() )
   847     if ( !ExitOccured() )
   844         {
   848         {
   845         TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
   849         TRAP_IGNORE( MusUiDialogUtil::ShowGlobalErrorDialogL( 
   846                             R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) );
   850                             R_MUS_LIVE_SHARING_VIEW_NOTE_CONNECTION_LOST ) );
   857 // -----------------------------------------------------------------------------
   861 // -----------------------------------------------------------------------------
   858 //
   862 //
   859 void CMusUiLiveSharingController::SessionFailed()
   863 void CMusUiLiveSharingController::SessionFailed()
   860     {
   864     {
   861     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionFailed" );
   865     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingController::SessionFailed" );
       
   866     iSessionEstablished = EFalse;
   862     if ( !ExitOccured() )
   867     if ( !ExitOccured() )
   863         {
   868         {
   864         DismissWaitDialog();
   869         DismissWaitDialog();
   865        
   870        
   866         TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
   871         TRAP_IGNORE( iCallbackService->AsyncEventL( EMusUiAsyncHandleExit ) );
   959         }
   964         }
   960     MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::HandleAsyncEventL" );
   965     MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingController::HandleAsyncEventL" );
   961     
   966     
   962     }
   967     }
   963 
   968 
       
   969 // -----------------------------------------------------------------------------
       
   970 // Determines whether Session established or not
       
   971 // -----------------------------------------------------------------------------
       
   972 //
       
   973 TBool CMusUiLiveSharingController::IsSessionEstablished()
       
   974 	{
       
   975 	return iSessionEstablished;
       
   976 	}
   964 
   977 
   965 // End of file
   978 // End of file
   966 
   979