emailuis/emailui/src/FreestyleEmailUiAppui.cpp
branchRCL_3
changeset 10 f5907b1a1053
parent 8 e1b6206813b4
child 11 0396474f30f5
equal deleted inserted replaced
8:e1b6206813b4 10:f5907b1a1053
    85 #include <featmgr.h>                    // For FeatureManager
    85 #include <featmgr.h>                    // For FeatureManager
    86 //<cmail>
    86 //<cmail>
    87 #include <data_caging_path_literals.hrh> // hardcoded paths removal from cmail
    87 #include <data_caging_path_literals.hrh> // hardcoded paths removal from cmail
    88 #include "cfsccontactactionmenu.h"
    88 #include "cfsccontactactionmenu.h"
    89 //</cmail>
    89 //</cmail>
       
    90 #include <layoutmetadata.cdl.h>         // for Layout_Meta_Data
    90 
    91 
    91 // INTERNAL INCLUDE FILES
    92 // INTERNAL INCLUDE FILES
    92 #include "FreestyleEmailUiContactHandler.h"
    93 #include "FreestyleEmailUiContactHandler.h"
    93 #include "FreestyleEmailUiAppui.h"
    94 #include "FreestyleEmailUiAppui.h"
    94 #include "FreestyleEmailUi.hrh"
    95 #include "FreestyleEmailUi.hrh"
   104 #include "ncsconstants.h"
   105 #include "ncsconstants.h"
   105 #include "ncscomposeview.h"
   106 #include "ncscomposeview.h"
   106 #include "FreestyleEmailUiAttachmentsListModel.h"
   107 #include "FreestyleEmailUiAttachmentsListModel.h"
   107 #include "FreestyleEmailUiAttachmentsListVisualiser.h"
   108 #include "FreestyleEmailUiAttachmentsListVisualiser.h"
   108 #include "FreestyleEmailUiAttachmentsListControl.h"
   109 #include "FreestyleEmailUiAttachmentsListControl.h"
   109 #include "FreestyleEmailCenRepHandler.h"
   110 #include "freestyleemailcenrephandler.h"
   110 #include "FreestyleEmailUiSettingsListView.h"
   111 #include "FreestyleEmailUiSettingsListView.h"
   111 #include "FreestyleEmailUiGlobalSettingsListView.h"
   112 #include "FreestyleEmailUiGlobalSettingsListView.h"
   112 #include "FreestyleEmailUiDownloadManagerModel.h"
   113 #include "FreestyleEmailUiDownloadManagerModel.h"
   113 #include "FreestyleEmailUiDownloadManagerVisualiser.h"
   114 #include "FreestyleEmailUiDownloadManagerVisualiser.h"
   114 #include "FreestyleEmailUiDownloadManagerControl.h"
   115 #include "FreestyleEmailUiDownloadManagerControl.h"
   153 const TUint KConnectionStatusIconRotationInterval = 100;
   154 const TUint KConnectionStatusIconRotationInterval = 100;
   154 const TInt KConnectionStatusIconRotationAmount = 18;
   155 const TInt KConnectionStatusIconRotationAmount = 18;
   155 // Length of the drive letter descriptor (e.g. "c:")
   156 // Length of the drive letter descriptor (e.g. "c:")
   156 const TInt KDriveDescLength = 2;
   157 const TInt KDriveDescLength = 2;
   157 
   158 
       
   159 
       
   160 // TDisplayImagesCache
       
   161 
       
   162 // ---------------------------------------------------------------------------
       
   163 // TDisplayImagesCache::~TDisplayImagesCache
       
   164 // ---------------------------------------------------------------------------
       
   165 //
       
   166 TDisplayImagesCache::~TDisplayImagesCache()
       
   167     {
       
   168     iCache.Reset();
       
   169     }
       
   170 
       
   171 // ---------------------------------------------------------------------------
       
   172 // TDisplayImagesCache::AddMessageL
       
   173 // ---------------------------------------------------------------------------
       
   174 //
       
   175 void TDisplayImagesCache::AddMessageL( const CFSMailMessageBase& aMsg )
       
   176     {
       
   177     AddMessageL(aMsg.GetMailBoxId(), aMsg.GetMessageId());
       
   178     }
       
   179 
       
   180 // ---------------------------------------------------------------------------
       
   181 // TDisplayImagesCache::RemoveMessage
       
   182 // ---------------------------------------------------------------------------
       
   183 //
       
   184 void TDisplayImagesCache::RemoveMessage( const CFSMailMessageBase& aMsg )
       
   185     {
       
   186     RemoveMessage(aMsg.GetMailBoxId(), aMsg.GetMessageId());
       
   187     }
       
   188 
       
   189 // ---------------------------------------------------------------------------
       
   190 // TDisplayImagesCache::Contains
       
   191 // ---------------------------------------------------------------------------
       
   192 //
       
   193 TBool TDisplayImagesCache::Contains( const CFSMailMessageBase& aMsg ) const
       
   194     {
       
   195     return Contains(aMsg.GetMailBoxId(), aMsg.GetMessageId());
       
   196     }
       
   197 
       
   198 // ---------------------------------------------------------------------------
       
   199 // TDisplayImagesCache::AddMessageL
       
   200 // ---------------------------------------------------------------------------
       
   201 //
       
   202 void TDisplayImagesCache::AddMessageL( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId )
       
   203     {
       
   204     TInt index(MailBoxIndex(aBoxId));
       
   205     if (index == KErrNotFound)
       
   206         {
       
   207         AddMailBoxL(aBoxId, index);
       
   208         }
       
   209     iCache[index].AddMessageL(aMsgId);
       
   210     }
       
   211 
       
   212 // ---------------------------------------------------------------------------
       
   213 // TDisplayImagesCache::RemoveMessage
       
   214 // ---------------------------------------------------------------------------
       
   215 //
       
   216 void TDisplayImagesCache::RemoveMessage( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId )
       
   217     {
       
   218     const TInt index(MailBoxIndex(aBoxId));
       
   219     if (index != KErrNotFound)
       
   220         {
       
   221         iCache[index].RemoveMessage(aMsgId);
       
   222         }
       
   223     }
       
   224 
       
   225 // ---------------------------------------------------------------------------
       
   226 // TDisplayImagesCache::RemoveMailbox
       
   227 // ---------------------------------------------------------------------------
       
   228 //
       
   229 void TDisplayImagesCache::RemoveMailbox( const TFSMailMsgId& aBoxId )
       
   230     {
       
   231     const TInt index(MailBoxIndex(aBoxId));
       
   232     if (index != KErrNotFound)
       
   233         {
       
   234         iCache.Remove(index);
       
   235         }
       
   236     }
       
   237 
       
   238 // ---------------------------------------------------------------------------
       
   239 // TDisplayImagesCache::Contains
       
   240 // ---------------------------------------------------------------------------
       
   241 //
       
   242 TBool TDisplayImagesCache::Contains( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId ) const
       
   243     {
       
   244     const TInt index(MailBoxIndex(aBoxId));
       
   245     if (index != KErrNotFound)
       
   246         {
       
   247         return iCache[index].Contains(aMsgId);
       
   248         }
       
   249     return EFalse;
       
   250     }
       
   251 
       
   252 // ---------------------------------------------------------------------------
       
   253 // TDisplayImagesCache::MailBoxIndex
       
   254 // ---------------------------------------------------------------------------
       
   255 //
       
   256 TInt TDisplayImagesCache::MailBoxIndex( const TFSMailMsgId& aBoxId ) const
       
   257     {
       
   258     return iCache.FindInOrder(TItem(aBoxId), TLinearOrder<TItem>(TItem::CompareItem));
       
   259     }
       
   260 
       
   261 // ---------------------------------------------------------------------------
       
   262 // TDisplayImagesCache::AddMailBoxL
       
   263 // ---------------------------------------------------------------------------
       
   264 //
       
   265 void TDisplayImagesCache::AddMailBoxL( const TFSMailMsgId& aBoxId, TInt& aCacheIndex )
       
   266     {
       
   267     aCacheIndex = KErrNotFound;
       
   268     iCache.InsertInOrderL(TItem(aBoxId), TLinearOrder<TItem>(TItem::CompareItem));
       
   269     aCacheIndex = MailBoxIndex(aBoxId);
       
   270     }
       
   271 
       
   272 // ---------------------------------------------------------------------------
       
   273 // TDisplayImagesCache::TItem::TItem
       
   274 // ---------------------------------------------------------------------------
       
   275 //
       
   276 TDisplayImagesCache::TItem::TItem( const TFSMailMsgId& aBoxId )
       
   277     : iMailBoxId( aBoxId )
       
   278     {
       
   279     }
       
   280 
       
   281 // ---------------------------------------------------------------------------
       
   282 // TDisplayImagesCache::TItem::~TItem
       
   283 // ---------------------------------------------------------------------------
       
   284 //
       
   285 TDisplayImagesCache::TItem::~TItem()
       
   286     {
       
   287     iMessageIds.Reset();
       
   288     }
       
   289 
       
   290 // ---------------------------------------------------------------------------
       
   291 // TDisplayImagesCache::TItem::Contains
       
   292 // ---------------------------------------------------------------------------
       
   293 //
       
   294 TBool TDisplayImagesCache::TItem::Contains( const TFSMailMsgId& aMsgId ) const
       
   295     {
       
   296     return MessageIndex(aMsgId) != KErrNotFound;
       
   297     }
       
   298 
       
   299 // ---------------------------------------------------------------------------
       
   300 // TDisplayImagesCache::TItem::AddMessageL
       
   301 // ---------------------------------------------------------------------------
       
   302 //
       
   303 void TDisplayImagesCache::TItem::AddMessageL( const TFSMailMsgId& aMsgId )
       
   304     {
       
   305     if (!Contains(aMsgId))
       
   306         {
       
   307         iMessageIds.InsertInOrderL(aMsgId, TLinearOrder<TFSMailMsgId>(TItem::CompareMsgId));
       
   308         }
       
   309     }
       
   310 
       
   311 // ---------------------------------------------------------------------------
       
   312 // TDisplayImagesCache::TItem::RemoveMessage
       
   313 // ---------------------------------------------------------------------------
       
   314 //
       
   315 void TDisplayImagesCache::TItem::RemoveMessage( const TFSMailMsgId& aMsgId )
       
   316     {
       
   317     const TInt index(MessageIndex(aMsgId));
       
   318     if (index != KErrNotFound)
       
   319         {
       
   320         iMessageIds.Remove(index);
       
   321         }
       
   322     }
       
   323 
       
   324 // ---------------------------------------------------------------------------
       
   325 // TDisplayImagesCache::TItem::MessageIndex
       
   326 // ---------------------------------------------------------------------------
       
   327 //
       
   328 TInt TDisplayImagesCache::TItem::MessageIndex( const TFSMailMsgId& aMsgId ) const
       
   329     {
       
   330     return iMessageIds.FindInOrder(aMsgId, TLinearOrder<TFSMailMsgId>(TItem::CompareMsgId));
       
   331     }
       
   332 
       
   333 // ---------------------------------------------------------------------------
       
   334 // TDisplayImagesCache::TItem::CompareItem
       
   335 // ---------------------------------------------------------------------------
       
   336 //
       
   337 TInt TDisplayImagesCache::TItem::CompareItem( const TItem& aItem1, const TItem& aItem2 )
       
   338     {
       
   339     return CompareMsgId(aItem1.iMailBoxId, aItem2.iMailBoxId);
       
   340     }
       
   341 
       
   342 // ---------------------------------------------------------------------------
       
   343 // TDisplayImagesCache::TItem::CompareMsgId
       
   344 // ---------------------------------------------------------------------------
       
   345 //
       
   346 TInt TDisplayImagesCache::TItem::CompareMsgId( const TFSMailMsgId& aId1, const TFSMailMsgId& aId2 )
       
   347     {
       
   348     TInt result(aId1.PluginId().iUid - aId2.PluginId().iUid);
       
   349     if (!result)
       
   350         {
       
   351         result = TInt(aId1.Id() - aId2.Id());
       
   352         }
       
   353     return result;
       
   354     }
       
   355 
   158 // ---------------------------------------------------------------------------
   356 // ---------------------------------------------------------------------------
   159 // C++ constructor.
   357 // C++ constructor.
   160 // ---------------------------------------------------------------------------
   358 // ---------------------------------------------------------------------------
   161 //
   359 //
   162 CFreestyleEmailUiAppUi::CFreestyleEmailUiAppUi( CAlfEnv& aEnv )
   360 CFreestyleEmailUiAppUi::CFreestyleEmailUiAppUi( CAlfEnv& aEnv )
   163     : CAknViewAppUi(),
   361     : CAknViewAppUi(),
   164     iIsForeground( EFalse ), // init foreground flag to "not on foreground"
   362     iIsForeground( EFalse ), // init foreground flag to "not on foreground"
   165     iIsCaptured( EFalse ), // init "end key captured" to false
   363     iIsCaptured( EFalse ), // init "end key captured" to false
   166     iAutomatedMailBoxOnline( EFalse ),
   364     iAutomatedMailBoxOnline( EFalse ),
   167     iMsgReaderIsSupported( KErrGeneral ),
   365     iMsgReaderIsSupported( KErrGeneral ),
   168     iSwitchingToBackground( EFalse )
   366     iSwitchingToBackground( EFalse ),
       
   367     iHasEmbeddedApp( EFalse ),
       
   368     iPreviousAppEmbedded( EFalse ),
       
   369     iEditorStartedFromEmbeddedApp( EFalse )
   169     {
   370     {
   170     FUNC_LOG;
   371     FUNC_LOG;
   171     iEnv = &aEnv;
   372     iEnv = &aEnv;
   172     TIMESTAMP( "Application starting" );
   373     TIMESTAMP( "Application starting" );
   173     }
   374     }
   244     // Create the 'Back' stack
   445     // Create the 'Back' stack
   245     iNavigationHistory = new (ELeave) CStack<CFsEmailUiViewBase, EFalse>();
   446     iNavigationHistory = new (ELeave) CStack<CFsEmailUiViewBase, EFalse>();
   246 
   447 
   247     // Enable Avkon skins.
   448     // Enable Avkon skins.
   248     BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
   449     BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
       
   450 
       
   451     // This MUST be after BaseConstructL
       
   452     MTouchFeedback* touchFeedback(MTouchFeedback::Instance());
       
   453     if (touchFeedback == NULL)
       
   454         {
       
   455         touchFeedback = MTouchFeedback::CreateInstanceL();
       
   456         iTouchFeedbackCreated = ETrue;
       
   457         }
       
   458     touchFeedback->SetFeedbackEnabledForThisApp(touchFeedback->TouchFeedbackSupported());
       
   459 
       
   460 
   249     // Create instance for Central repository handler
   461     // Create instance for Central repository handler
   250     iCRHandler = CFSEmailCRHandler::InstanceL();
   462     iCRHandler = CFSEmailCRHandler::InstanceL();
   251 
   463 
   252     // Initialize the flip state and the observer for listening to the flip
   464     // Initialize the flip state and the observer for listening to the flip
   253     // state changed events. The initial state will be reported in construction
   465     // state changed events. The initial state will be reported in construction
   531     CFSEmailDownloadInfoMediator::Destroy();
   743     CFSEmailDownloadInfoMediator::Destroy();
   532 
   744 
   533     delete iNaviDecorator2MailViewer;
   745     delete iNaviDecorator2MailViewer;
   534 
   746 
   535     delete iConnectionStatusIconAnimTimer;
   747     delete iConnectionStatusIconAnimTimer;
       
   748 
       
   749 
       
   750     MTouchFeedback* touchFeedback( MTouchFeedback::Instance() );
       
   751     if (touchFeedback && touchFeedback->TouchFeedbackSupported())
       
   752         {
       
   753         touchFeedback->SetFeedbackEnabledForThisApp(EFalse);
       
   754         }
       
   755 
       
   756     if (iTouchFeedbackCreated)
       
   757         {
       
   758         MTouchFeedback::DestroyInstance();
       
   759         }
       
   760 
   536     TIMESTAMP( "Application exit" );
   761     TIMESTAMP( "Application exit" );
   537     }
   762     }
   538 
   763 
   539 
   764 
   540 void CFreestyleEmailUiAppUi::EnterFsEmailViewL( TUid aViewId )
   765 void CFreestyleEmailUiAppUi::EnterFsEmailViewL( TUid aViewId )
   637             iCurrentActiveView = iNavigationHistory->Pop();
   862             iCurrentActiveView = iNavigationHistory->Pop();
   638             }
   863             }
   639         }
   864         }
   640     // may be tricky; added here to handle activation of composer view from external app when email is plugin settings view
   865     // may be tricky; added here to handle activation of composer view from external app when email is plugin settings view
   641     // in this case also duplictaed view needs to be poped up, but iSettingsViewActive is already set to EFalse
   866     // in this case also duplictaed view needs to be poped up, but iSettingsViewActive is already set to EFalse
   642     // other solution would need to expand api of this class to handle directly this case 
   867     // other solution would need to expand api of this class to handle directly this case
   643     else
   868     else
   644     	if ( iPreviousActiveView->Id() == SettingsViewId  || iPreviousActiveView->Id() == MailListId )
   869     	if ( iPreviousActiveView->Id() == SettingsViewId  || iPreviousActiveView->Id() == MailListId )
   645     		{
   870     		{
   646     		iCurrentActiveView = iNavigationHistory->Pop();
   871     		iCurrentActiveView = iNavigationHistory->Pop();
   647     		}
   872     		}
  1237     //if( aType == KAknsMessageSkinChange && iConstructComplete )
  1462     //if( aType == KAknsMessageSkinChange && iConstructComplete )
  1238     //    {
  1463     //    {
  1239     //    CAlfEnv::Static()->NotifySkinChangedL();
  1464     //    CAlfEnv::Static()->NotifySkinChangedL();
  1240     //    }
  1465     //    }
  1241 
  1466 
  1242 
  1467     if( aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange )
  1243     if( aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange)
  1468         {
  1244         {
  1469         // Changing layout for status pane (just in case it is not switched
       
  1470         // correctly), fix for HMNN-82BAGR error
       
  1471         TBool landscape(Layout_Meta_Data::IsLandscapeOrientation());
       
  1472         CEikStatusPane* statusPane = StatusPane();
       
  1473         if(landscape)
       
  1474         	{
       
  1475 			if( statusPane->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT)
       
  1476 				{
       
  1477 				statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT);
       
  1478 				}
       
  1479         	}
       
  1480         else
       
  1481         	{
       
  1482 			if( statusPane->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT)
       
  1483 				{
       
  1484 				statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT);
       
  1485 				}
       
  1486         	}
       
  1487 
  1245 	  	TRect screenRect;
  1488 	  	TRect screenRect;
  1246 	 	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, screenRect );
  1489 	 	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, screenRect );
  1247         //<cmail> layout manager call removed </cmail>
  1490         //<cmail> layout manager call removed </cmail>
  1248         // Notify layouthandler of changed screen resolution.
  1491         // Notify layouthandler of changed screen resolution.
  1249         iLayoutHandler->ScreenResolutionChanged();
  1492         iLayoutHandler->ScreenResolutionChanged();
  1250   		StatusPane()->DrawNow();
  1493   		StatusPane()->DrawNow();
  1251         TRect rect;
       
  1252         AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
       
  1253         if(iEnv)
  1494         if(iEnv)
  1254             {
  1495             {
  1255 			Display().SetVisibleArea( screenRect );
  1496 			Display().SetVisibleArea( screenRect );
  1256             }
  1497             }
  1257          }
  1498          }
  1405     {
  1646     {
  1406     FUNC_LOG;
  1647     FUNC_LOG;
  1407     return iEikonEnv->ScreenDevice()->DisplayMode();
  1648     return iEikonEnv->ScreenDevice()->DisplayMode();
  1408     }
  1649     }
  1409 
  1650 
       
  1651 // ---------------------------------------------------------------------------
       
  1652 // Returns display images cache
       
  1653 // ---------------------------------------------------------------------------
       
  1654 //
       
  1655 TDisplayImagesCache& CFreestyleEmailUiAppUi::DisplayImagesCache()
       
  1656     {
       
  1657     return iDisplayImagesCache;
       
  1658     }
       
  1659 
  1410 
  1660 
  1411 // ---------------------------------------------------------------------------
  1661 // ---------------------------------------------------------------------------
  1412 // Returns the current flip status.
  1662 // Returns the current flip status.
  1413 // ---------------------------------------------------------------------------
  1663 // ---------------------------------------------------------------------------
  1414 //
  1664 //
  1585             }
  1835             }
  1586         // Request auto sync if allowed in the current network mode and
  1836         // Request auto sync if allowed in the current network mode and
  1587         // autosyncmonitor has been succesfully created
  1837         // autosyncmonitor has been succesfully created
  1588         if ( iAutoSyncMonitor )
  1838         if ( iAutoSyncMonitor )
  1589             {
  1839             {
       
  1840             TIMESTAMP( "Starting auto sync" );
  1590             iAutoSyncMonitor->StartMonitoring();
  1841             iAutoSyncMonitor->StartMonitoring();
  1591             }
  1842             }
  1592         }
  1843         }
  1593     }
  1844     }
  1594 
  1845 
  1856 
  2107 
  1857     switch ( aEvent )
  2108     switch ( aEvent )
  1858     	{
  2109     	{
  1859     	case TFSEventMailboxDeleted:
  2110     	case TFSEventMailboxDeleted:
  1860     		{
  2111     		{
       
  2112     		iDisplayImagesCache.RemoveMailbox(aMailbox);
  1861     		gridContentsChanged = ETrue;
  2113     		gridContentsChanged = ETrue;
  1862     		if ( iActiveMailbox && iActiveMailbox->GetId().Id() == aMailbox.Id() &&
  2114     		if ( iActiveMailbox && iActiveMailbox->GetId().Id() == aMailbox.Id() &&
  1863     			 iCurrentActiveView->Id() != SettingsViewId )
  2115     			 iCurrentActiveView->Id() != SettingsViewId )
  1864     			{
  2116     			{
  1865 				EnterFsEmailViewL( AppGridId );
  2117 				EnterFsEmailViewL( AppGridId );
  1987                 iActiveMailbox = NULL;
  2239                 iActiveMailbox = NULL;
  1988                 iActiveMailbox = iMailClient->GetMailBoxByUidL( aMailbox );
  2240                 iActiveMailbox = iMailClient->GetMailBoxByUidL( aMailbox );
  1989                 }
  2241                 }
  1990             }
  2242             }
  1991             break;
  2243             break;
  1992    		case TFSEventMailboxSettingsChanged:
  2244         case TFSEventMailboxCapabilityChanged:
       
  2245             // Refresh grid if mailbox capabilities have changed
       
  2246         case TFSEventMailboxSettingsChanged:
  1993 			// Refresh grid if mailbox settings are changed,
  2247 			// Refresh grid if mailbox settings are changed,
  1994 			// name/branding might have changed.
  2248 			// name/branding might have changed.
  1995 	   	 	gridContentsChanged = ETrue;
  2249 	   	 	gridContentsChanged = ETrue;
  1996 			break;
  2250 			break;
       
  2251         case TFSEventMailDeleted:
       
  2252             {
       
  2253             RArray<TFSMailMsgId>* entries = reinterpret_cast<RArray<TFSMailMsgId>*>(aParam1);
       
  2254             for (TInt i = entries->Count() - 1; i >= 0; i--)
       
  2255                 {
       
  2256                 iDisplayImagesCache.RemoveMessage(aMailbox, entries->operator[](i));
       
  2257                 }
       
  2258             }
       
  2259    		    break;
  1997         default:
  2260         default:
  1998             {
  2261             {
  1999             }
  2262             }
  2000         }
  2263         }
  2001 	// Forward events to mail list
  2264 	// Forward events to mail list
  2562         LaunchWizardL();
  2825         LaunchWizardL();
  2563 	    }
  2826 	    }
  2564 	}
  2827 	}
  2565 
  2828 
  2566 // -----------------------------------------------------------------------------
  2829 // -----------------------------------------------------------------------------
  2567 // CFreestyleEmailUiAppUi::SendToBackgroundL
  2830 // CFreestyleEmailUiAppUi::SendToBackground
  2568 // Send self to background.
  2831 // Send self to background.
  2569 // -----------------------------------------------------------------------------
  2832 // -----------------------------------------------------------------------------
  2570 void CFreestyleEmailUiAppUi::SendToBackground()
  2833 void CFreestyleEmailUiAppUi::SendToBackground()
  2571     {
  2834     {
  2572     FUNC_LOG;
  2835     FUNC_LOG;
  2578         // Send self to background
  2841         // Send self to background
  2579         task.SendToBackground();
  2842         task.SendToBackground();
  2580         }
  2843         }
  2581 
  2844 
  2582     iSwitchingToBackground = EFalse;
  2845     iSwitchingToBackground = EFalse;
       
  2846     }
       
  2847 
       
  2848 // -----------------------------------------------------------------------------
       
  2849 // CFreestyleEmailUiAppUi::SetEmbeddedApp
       
  2850 // Set flag for judging if there is a embedded app in FSEmail.
       
  2851 // -----------------------------------------------------------------------------
       
  2852 void CFreestyleEmailUiAppUi::SetEmbeddedApp( TBool aEmbeddedApp )
       
  2853     {
       
  2854     iHasEmbeddedApp = aEmbeddedApp;
       
  2855     }
       
  2856 
       
  2857 // -----------------------------------------------------------------------------
       
  2858 // CFreestyleEmailUiAppUi::EmbeddedApp
       
  2859 // Get embedded app flag.
       
  2860 // -----------------------------------------------------------------------------
       
  2861 TBool CFreestyleEmailUiAppUi::EmbeddedApp() const
       
  2862     {
       
  2863     return iHasEmbeddedApp;
       
  2864     }
       
  2865 
       
  2866 // -----------------------------------------------------------------------------
       
  2867 // CFreestyleEmailUiAppUi::SetEmbeddedAppToPreviousApp
       
  2868 // -----------------------------------------------------------------------------
       
  2869 void CFreestyleEmailUiAppUi::SetEmbeddedAppToPreviousApp( TBool aEmbeddedApp )
       
  2870     {
       
  2871     iPreviousAppEmbedded = aEmbeddedApp;
       
  2872     }
       
  2873 
       
  2874 // -----------------------------------------------------------------------------
       
  2875 // CFreestyleEmailUiAppUi::EmbeddedAppIsPreviousApp
       
  2876 // -----------------------------------------------------------------------------
       
  2877 TBool CFreestyleEmailUiAppUi::EmbeddedAppIsPreviousApp() const
       
  2878     {
       
  2879     return iPreviousAppEmbedded;
       
  2880     }
       
  2881 
       
  2882 // -----------------------------------------------------------------------------
       
  2883 // CFreestyleEmailUiAppUi::SetEditorStartedFromEmbeddedApp
       
  2884 // -----------------------------------------------------------------------------
       
  2885 void CFreestyleEmailUiAppUi::SetEditorStartedFromEmbeddedApp( TBool aEmbeddedApp )
       
  2886     {
       
  2887     iEditorStartedFromEmbeddedApp = aEmbeddedApp;
       
  2888     }
       
  2889 
       
  2890 // -----------------------------------------------------------------------------
       
  2891 // CFreestyleEmailUiAppUi::EditorStartedFromEmbeddedApp
       
  2892 // -----------------------------------------------------------------------------
       
  2893 TBool CFreestyleEmailUiAppUi::EditorStartedFromEmbeddedApp() const
       
  2894     {
       
  2895     return iEditorStartedFromEmbeddedApp;
  2583     }
  2896     }
  2584 
  2897 
  2585 // -----------------------------------------------------------------------------
  2898 // -----------------------------------------------------------------------------
  2586 //
  2899 //
  2587 // -----------------------------------------------------------------------------
  2900 // -----------------------------------------------------------------------------