emailuis/emailui/src/FreestyleEmailUiAppui.cpp
changeset 4 e7aa27f58ae1
parent 3 a4d6f1ea0416
child 8 e1b6206813b4
equal deleted inserted replaced
3:a4d6f1ea0416 4:e7aa27f58ae1
  2037 												  TFSMailMsgId& aFoundNextMsgId,
  2037 												  TFSMailMsgId& aFoundNextMsgId,
  2038 												  TFSMailMsgId& aFoundNextMsgFolder )
  2038 												  TFSMailMsgId& aFoundNextMsgFolder )
  2039 	{
  2039 	{
  2040     FUNC_LOG;
  2040     FUNC_LOG;
  2041 	TBool ret(EFalse);
  2041 	TBool ret(EFalse);
  2042 	if ( !iNavigationHistory->IsEmpty() )
  2042     if( iNavigationHistory )
  2043 	    {
  2043         {
  2044 	    ret = iNavigationHistory->Head()->IsNextMsgAvailable( aCurrentMsgId, aFoundNextMsgId, aFoundNextMsgFolder );
  2044         if ( !iNavigationHistory->IsEmpty() )
  2045 	    }
  2045             {
       
  2046             ret = iNavigationHistory->Head()->IsNextMsgAvailable( aCurrentMsgId, aFoundNextMsgId, aFoundNextMsgFolder );
       
  2047             }
       
  2048         }
  2046 	return ret;
  2049 	return ret;
  2047 	}
  2050 	}
  2048 
  2051 
  2049 // For checking whether previous msg is available
  2052 // For checking whether previous msg is available
  2050 TBool CFreestyleEmailUiAppUi::IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId,
  2053 TBool CFreestyleEmailUiAppUi::IsPreviousMsgAvailable( TFSMailMsgId aCurrentMsgId,
  2051 													  TFSMailMsgId& aFoundPreviousMsgId,
  2054 													  TFSMailMsgId& aFoundPreviousMsgId,
  2052 													  TFSMailMsgId& aFoundPrevMsgFolder )
  2055 													  TFSMailMsgId& aFoundPrevMsgFolder )
  2053 	{
  2056 	{
  2054     FUNC_LOG;
  2057     FUNC_LOG;
  2055 	TBool ret(EFalse);
  2058 	TBool ret(EFalse);
  2056 	if ( !iNavigationHistory->IsEmpty() )
  2059     if( iNavigationHistory )
  2057 	    {
  2060         {
  2058 	    ret = iNavigationHistory->Head()->IsPreviousMsgAvailable( aCurrentMsgId, aFoundPreviousMsgId, aFoundPrevMsgFolder );
  2061         if ( !iNavigationHistory->IsEmpty() )
  2059 	    }
  2062             {
       
  2063             ret = iNavigationHistory->Head()->IsPreviousMsgAvailable( aCurrentMsgId, aFoundPreviousMsgId, aFoundPrevMsgFolder );
       
  2064             }
       
  2065         }
  2060 	return ret;
  2066 	return ret;
  2061 	}
  2067 	}
  2062 
  2068 
  2063 // Move to next msg
  2069 // Move to next msg
  2064 TInt CFreestyleEmailUiAppUi::MoveToNextMsgL( TFSMailMsgId aCurrentMsgId,
  2070 TInt CFreestyleEmailUiAppUi::MoveToNextMsgL( TFSMailMsgId aCurrentMsgId,
  2491     if (self->AppUiExitOngoing())
  2497     if (self->AppUiExitOngoing())
  2492         {
  2498         {
  2493         return KErrNone;
  2499         return KErrNone;
  2494         }
  2500         }
  2495 
  2501 
  2496     if (self->iMainUiGridVisualiser)
  2502     if (!self->iMainUiGridVisualiser || self->iMainUiGridVisualiser->UiOperationLaunched())
  2497         {
  2503         {
  2498         if (self->iMainUiGridVisualiser->UiOperationLaunched())
  2504         return KErrNone;
  2499             {
       
  2500             return KErrNone;
       
  2501             }
       
  2502         }
  2505         }
  2503 
  2506 
  2504     TRAPD( err, self->DisplayCreateMailboxQueryL() );
  2507     TRAPD( err, self->DisplayCreateMailboxQueryL() );
  2505 
  2508 
  2506     if (err == KLeaveExit)
  2509     if (err == KLeaveExit)
  2748 // -----------------------------------------------------------------------------
  2751 // -----------------------------------------------------------------------------
  2749 //
  2752 //
  2750 void CFSEmailUiAutosyncMonitor::StartMonitoring()
  2753 void CFSEmailUiAutosyncMonitor::StartMonitoring()
  2751     {
  2754     {
  2752     FUNC_LOG;
  2755     FUNC_LOG;
       
  2756     if ( IsActive() )
       
  2757         {
  2753         Cancel();
  2758         Cancel();
       
  2759         }
  2754 #ifdef __WINS__ // do not try to connect on the emulator
  2760 #ifdef __WINS__ // do not try to connect on the emulator
  2755     iRegisterationStatus = RMobilePhone::ERegisteredOnHomeNetwork;
  2761     iRegisterationStatus = RMobilePhone::ERegisteredOnHomeNetwork;
  2756     TRequestStatus* status = &iStatus;
  2762     TRequestStatus* status = &iStatus;
  2757     User::RequestComplete( status, KErrNone );
  2763     User::RequestComplete( status, KErrNone );
  2758 #else
  2764 #else