emailuis/emailui/inc/FreestyleEmailUiAppui.h
branchRCL_3
changeset 18 6b8f3b30d0ec
parent 17 67369d1b217f
child 23 dcf0eedfc1a3
--- a/emailuis/emailui/inc/FreestyleEmailUiAppui.h	Tue May 25 12:23:16 2010 +0300
+++ b/emailuis/emailui/inc/FreestyleEmailUiAppui.h	Wed Jun 09 09:22:57 2010 +0300
@@ -45,17 +45,10 @@
 #include "cmailcustomstatuspaneindicators.h"
 
 // INTERNAL INCLUDES
+#include "cconnectionstatusqueryext.h"
 #include "FreestyleEmailUiPropertySubscriber.h"
 #include "FreestyleEmailUiConstants.h"
 
-enum TForcedStatus
-	{
-    ENoForce = 0,
-    EForceToSync,
-    EForceToConnected,
-    EForceToDisconnected
-    };
-
 // FORWARD DECLARATIONS
 class CFreestyleEmailUiView;
 class CFSEmailUiViewerControl;
@@ -120,17 +113,17 @@
 
 /**
  * TDisplayImagesCache
- * 
+ *
  * Non-persistant cache for display images per message. When user allows images to be downloaded
- * for a message, that message's id will be stored into the cache. Later if the message is re-opened 
- * and it is found in cache, images are allowed to be downloaded no matter what the global setting 
+ * for a message, that message's id will be stored into the cache. Later if the message is re-opened
+ * and it is found in cache, images are allowed to be downloaded no matter what the global setting
  * is. Message is added to cache only when the user presses the button, it will be removed from cache
  * if the mailbox or the message itself is deleted.
  */
 class TDisplayImagesCache
     {
 public:
-    
+
     /**
      * Destructor
      */
@@ -140,29 +133,29 @@
      * Add message to cache.
      */
     void AddMessageL( const CFSMailMessageBase& aMsg );
-    
+
     /**
      * Remove message from cache.
      */
     void RemoveMessage( const CFSMailMessageBase& aMsg );
-    
+
     /**
      * Check if the message is in cache. Returns ETrue if the message is found.
      */
-    TBool Contains( const CFSMailMessageBase& aMsg ) const;    
-    
+    TBool Contains( const CFSMailMessageBase& aMsg ) const;
+
     /**
      * Removes message from cache.
      */
     void RemoveMessage( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId );
-    
+
     /**
      * Removes mailbox from cache.
      */
     void RemoveMailbox( const TFSMailMsgId& aBoxId );
 
 private: // internal methods
-    
+
     /**
      * Adds message to cache.
      */
@@ -171,37 +164,37 @@
     /**
      * Check if the message is in cache. Returns ETrue if the message is found.
      */
-    TBool Contains( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId ) const;    
+    TBool Contains( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId ) const;
 
     /**
      * Returns index for given mailbox in cache or KErrNotFound if the mailbox cannot
      * be found.
      */
     TInt MailBoxIndex( const TFSMailMsgId& aBoxId ) const;
-    
+
     /**
      * Adds new mailbox and returns index in cache.
      */
     void AddMailBoxL( const TFSMailMsgId& aBoxId, TInt& aCacheIndex );
 
-private:    
-    
+private:
+
     /**
      * Cache item.
      */
-    class TItem  
+    class TItem
         {
     public:
         /**
          * Constructor
-         */        
+         */
         TItem( const TFSMailMsgId& aBoxId );
-        
+
         /**
          * Destructor
          */
         ~TItem();
-        
+
         /**
          * Returns ETrue if given message Id is found in this box.
          */
@@ -216,35 +209,35 @@
          * Removes message from box.
          */
         void RemoveMessage( const TFSMailMsgId& aMsgId );
-    
+
         /**
          * Comparator for TLinearOrder, compares two items
          */
         static TInt CompareItem( const TItem& aItem1, const TItem& aItem2 );
-    
-    private:       
+
+    private:
 
         /**
          * Comparator for TLinearOrder, compares two message Ids
          */
         static TInt CompareMsgId( const TFSMailMsgId& aId1, const TFSMailMsgId& aId2 );
-        
+
         /**
          * Returns index of the message in box or KErrNotFound.
          */
         TInt MessageIndex( const TFSMailMsgId& aMsgId ) const;
-    
+
     private:
-        
-        // Mailbox Id        
+
+        // Mailbox Id
         TFSMailMsgId iMailBoxId;
-        
+
         // Message Ids
-        RArray<TFSMailMsgId> iMessageIds; 
+        RArray<TFSMailMsgId> iMessageIds;
         };
-    
+
     // Cache
-    RArray<TItem> iCache;    
+    RArray<TItem> iCache;
     };
 
 
@@ -416,6 +409,7 @@
     void ShowTitlePaneConnectionStatus();
     // Set connection status icon of title pane to hided
     void HideTitlePaneConnectionStatus();
+    void GetConnectionStatusL( CConnectionStatusQueryExtension::TConnectionStatus& aConnStatus );
     // Draw connection status icon into title pane if set as visible.
     // It is also possible to force connection indicator to wanted value
     // to achieve better user experience.
@@ -468,9 +462,9 @@
     TDisplayMode DisplayMode() const;
     // </cmail>
 
-    
-	
-	
+
+
+
 	/**
      * Returns the current flip status.
      * @return True if the flip is open, false otherwise.
@@ -481,30 +475,30 @@
 
     // Set flag for judging if there is a embedded app in FSEmail.
     void SetEmbeddedApp( TBool aEmbeddedApp );
-    
+
     // Return embedded app.
     TBool EmbeddedApp() const;
-    
+
     // Set flag for judging if previous app is embedded.
     void SetEmbeddedAppToPreviousApp( TBool aEmbeddedApp );
-    
+
     // if previous app is embedded.
     TBool EmbeddedAppIsPreviousApp() const;
-    
+
     // Set flag for judging if email editor started from embedded app.
     void SetEditorStartedFromEmbeddedApp( TBool aEmbeddedApp );
-    
+
     // if email editor started from embedded app.
     TBool EditorStartedFromEmbeddedApp() const;
 
     // returns last seen pointer position
     const TPoint& LastSeenPointerPosition() const;
-    
+
     // Runs fake sync animation (needed for better user experience as
     // otherwise in some connection/sync states pressing "send & receive"
     // wouldn't have any visible effect.
     void RunFakeSyncAnimL();
-    
+
 public: //from MFSMailEventObserver
     /**
      * Framework event message.
@@ -820,7 +814,7 @@
     // Set true, when application is going to be switched to backgound
     // after the view deactivation.
     TBool iSwitchingToBackground;
-    
+
     TDisplayImagesCache iDisplayImagesCache;
 
     // For handling the flip state.
@@ -833,13 +827,13 @@
 
     // Embedded app flag.
     TBool iHasEmbeddedApp;
-    
+
     // Flag for judging if previous app is embedded app.
     TBool iPreviousAppEmbedded;
-    
+
     // Flag for judging if email editor started from embedded app.
     TBool iEditorStartedFromEmbeddedApp;
-    
+
     TPoint iLastPointerPosition;
     };