emailuis/emailui/inc/ncscomposeview.h
changeset 2 5253a20d2a1e
parent 1 12c456ceeff2
child 8 e1b6206813b4
equal deleted inserted replaced
1:12c456ceeff2 2:5253a20d2a1e
    18 
    18 
    19 
    19 
    20 #ifndef __CNCSCOMPOSEVIEW_H__
    20 #ifndef __CNCSCOMPOSEVIEW_H__
    21 #define __CNCSCOMPOSEVIEW_H__
    21 #define __CNCSCOMPOSEVIEW_H__
    22 
    22 
    23 //<cmail>
       
    24 #include "CFSMailCommon.h"
    23 #include "CFSMailCommon.h"
    25 #include "MFSMailRequestObserver.h"
    24 #include "MFSMailRequestObserver.h"
    26 #include <alf/alfenv.h>
    25 #include <alf/alfenv.h>
    27 #include "AknServerApp.h"
    26 #include "AknServerApp.h"
    28 #include <AknProgressDialog.h>
    27 #include <AknProgressDialog.h>
    29 #include <MsgAttachmentUtils.h>
    28 #include <MsgAttachmentUtils.h>
    30 //</cmail>
       
    31 
    29 
    32 #include "FreestyleEmailUiViewBase.h"
    30 #include "FreestyleEmailUiViewBase.h"
    33 #include"FreestyleEmailUiConstants.h"
    31 #include "FreestyleEmailUiConstants.h"
    34 #include"FSComposerFetchLogic.h"
    32 #include "FSComposerFetchLogic.h"
    35 #include "FreestyleEmailUi.hrh"
    33 #include "FreestyleEmailUi.hrh"
    36 #include "cmailcustomstatuspaneindicators.h"
    34 #include "cmailcustomstatuspaneindicators.h"
    37 
    35 
    38 class CNcsComposeViewContainer;
    36 class CNcsComposeViewContainer;
    39 class CFSMailClient;
    37 class CFSMailClient;
    49 class CAlfEnv;
    47 class CAlfEnv;
    50 class CFreestyleEmailUiSendAttachmentsListControl;
    48 class CFreestyleEmailUiSendAttachmentsListControl;
    51 class CMsvSession;
    49 class CMsvSession;
    52 class CAknsLayeredBackgroundControlContext;
    50 class CAknsLayeredBackgroundControlContext;
    53 class CFsAutoSaver;
    51 class CFsAutoSaver;
    54 class CAknWaitDialog; //<cmail>
    52 class CAknWaitDialog;
    55 class CActiveHelper; //<cmail>
    53 class CActiveHelper;
       
    54 class CAknStylusPopUpMenu;
    56 
    55 
    57 
    56 
    58 const TInt KErrNcsComposeViewNotReady = KErrNotReady - 1000;
    57 const TInt KErrNcsComposeViewNotReady = KErrNotReady - 1000;
    59 
    58 
    60 /**
    59 /**
   119     * HandleCommandL
   118     * HandleCommandL
   120     * From CAknView, takes care of command handling.
   119     * From CAknView, takes care of command handling.
   121     * @param aCommand Command to be handled
   120     * @param aCommand Command to be handled
   122     */
   121     */
   123     void HandleCommandL( TInt aCommand );
   122     void HandleCommandL( TInt aCommand );
   124         
       
   125     // <cmail> Toolbar
       
   126     /**
       
   127     * DoActivateL
       
   128     * From CAknView, activate an AknView.
       
   129     * @param aPrevViewId The id of the previous view
       
   130     * @param aCustomMessageId message identifier
       
   131     * @param aCustomMessage custom message provided when the view is changed
       
   132     */
       
   133     /*void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
       
   134                       const TDesC8& aCustomMessage );*/
       
   135     // </cmail> Toolbar
       
   136 
   123 
   137     /**
   124     /**
   138     * ChildDoDeactivate
   125     * ChildDoDeactivate
   139     * Deactivate an AknView
   126     * Deactivate an AknView
   140     * Remove the container class instance from the App UI's stack and
   127     * Remove the container class instance from the App UI's stack and
   153 
   140 
   154     /**
   141     /**
   155     * HandleDynamicVariantSwitchL
   142     * HandleDynamicVariantSwitchL
   156     * Recalculates component layout 
   143     * Recalculates component layout 
   157     */
   144     */
   158     void HandleDynamicVariantSwitchL( CFsEmailUiViewBase::TDynamicSwitchType aType );
   145     void HandleDynamicVariantSwitchL( 
       
   146             CFsEmailUiViewBase::TDynamicSwitchType aType );
   159         
   147         
   160 public: // from MAlfActionObserver
   148 public: // from MAlfActionObserver
   161     	
   149     	
   162     void HandleActionL( const TAlfActionCommand& aActionCommand );
   150     void HandleActionL( const TAlfActionCommand& aActionCommand );
   163 
   151 
   166     TBool FetchLogicComplete( TComposerFetchState aState, TInt aError );
   154     TBool FetchLogicComplete( TComposerFetchState aState, TInt aError );
   167 
   155 
   168 public: // new functions
   156 public: // new functions
   169 
   157 
   170     /**
   158     /**
   171     * LaunchAttachmentActionMenuL
   159     * LaunchStylusPopupMenu
   172     * Show action menu for the attachments line
   160     * Show stylus popup menu for the attachments line
   173     */
   161     */
   174     void LaunchAttachmentActionMenuL();
   162     void LaunchStylusPopupMenu( const TPoint& aPenEventScreenLocation );
   175     
   163     
   176 	//<cmail>
       
   177     /**
       
   178     * DismissAttachmentActionMenuL
       
   179     * Close action menu for the attachments line
       
   180     */
       
   181     void DismissAttachmentActionMenuL();
       
   182     //</cmail>
       
   183 	
       
   184     /**
   164     /**
   185     * AttachmentsListControl
   165     * AttachmentsListControl
   186     * Returns pointer to attachment list control
   166     * Returns pointer to attachment list control
   187     */       
   167     */       
   188     CFreestyleEmailUiSendAttachmentsListControl* AttachmentsListControl();
   168     CFreestyleEmailUiSendAttachmentsListControl* AttachmentsListControl();
   198     * Commits changes to message
   178     * Commits changes to message
   199     */
   179     */
   200     void CommitL( TBool aParseAddresses = ETrue, 
   180     void CommitL( TBool aParseAddresses = ETrue, 
   201                   TFieldToCommit aFieldToCommit = EAllFields );
   181                   TFieldToCommit aFieldToCommit = EAllFields );
   202 
   182 
   203     //<cmail>
       
   204     void DialogDismissedL( TInt aButtonId );
   183     void DialogDismissedL( TInt aButtonId );
   205     
   184     
   206     void ShowFetchingWaitNoteL();
   185     void ShowFetchingWaitNoteL();
   207     
   186     
   208     TBool IsPreparedForExit();
   187     TBool IsPreparedForExit();
   209     
   188     
   210     void AsyncExitL();
   189     void AsyncExitL();
   211     //</cmail>
   190     
   212     
       
   213     // <cmail>
       
   214     void HandleContainerChangeRequiringToolbarRefresh();
   191     void HandleContainerChangeRequiringToolbarRefresh();
   215     // </cmail>
       
   216 
   192 
   217 protected:
   193 protected:
   218 
   194 
   219     void ProcessCommandL( TInt aCommand );
   195     void ProcessCommandL( TInt aCommand );
   220 
   196 
   221 // <cmail> Toolbar    
       
   222 private: // from
   197 private: // from
   223     
   198     
   224     /**
   199     /**
   225      * @see CFsEmailUiViewBase::ChildDoActivateL
   200      * @see CFsEmailUiViewBase::ChildDoActivateL
   226      */
   201      */
   246     
   221     
   247     /**
   222     /**
   248      * Update toolbar items.
   223      * Update toolbar items.
   249      */
   224      */
   250     void RefreshToolbar();    
   225     void RefreshToolbar();    
   251 // </cmail> Toolbar     
       
   252     
   226     
   253 private: // new functions
   227 private: // new functions
   254     
   228     
   255     /**
   229     /**
   256     * HandleActivationCommandL
   230     * HandleActivationCommandL
   322     * Display the Quick Text dialog
   296     * Display the Quick Text dialog
   323     */
   297     */
   324     void DoQuickTextL();
   298     void DoQuickTextL();
   325         
   299         
   326     /**
   300     /**
   327     * DoAddAttachmentL
   301     * AsyncAddAttachment
   328     * Add attachment file to message
   302     * Add attachment file to message
   329     */
   303     */
   330     static TInt AsyncAddAttachment( TAny* aSelfPtr );
   304     static TInt AsyncAddAttachment( TAny* aSelfPtr );
   331     
   305     
   332     /**
   306     /**
   351     /**
   325     /**
   352     * RemoveOwnAddress
   326     * RemoveOwnAddress
   353     * Removes own address while doing reply all.
   327     * Removes own address while doing reply all.
   354     * @param aAddressList The address list.
   328     * @param aAddressList The address list.
   355     */       
   329     */       
   356     void RemoveOwnAddress( RPointerArray<CNcsEmailAddressObject>& aAddressList );
   330     void RemoveOwnAddress( 
       
   331             RPointerArray<CNcsEmailAddressObject>& aAddressList );
   357          
   332          
   358     /**
   333     /**
   359     * InitForwardFieldsL
   334     * InitForwardFieldsL
   360     * Inits fields when composing forward message.
   335     * Inits fields when composing forward message.
   361     */       
   336     */       
   362     void InitForwardFieldsL();
   337     void InitForwardFieldsL();
   363         
   338         
   364     /**
   339     /**
   365     * IncludeMessageTextL
   340     * IncludeMessageTextL
   366     * Inits body text when forwarding, replying, or opening draft message.
   341     * Inits body text when forwarding, replying, or opening draft message.
   367     * @param aEnsureEmptyLineInBegin When true, the function ensures there's empty lines
   342     * @param aEnsureEmptyLineInBegin When true, the function ensures there's
   368     *                                in the beginning of the message. I.e. line break(s)
   343     *                                empty lines in the beginning of the 
   369     *                                are inserted in front of any quote or signature
   344     *                                message. I.e. line break(s) are inserted
       
   345     *                                in front of any quote or signature
   370     */        
   346     */        
   371     void IncludeMessageTextL( TBool aEnsureSpaceInBegin = EFalse );
   347     void IncludeMessageTextL( TBool aEnsureSpaceInBegin = EFalse );
   372         
   348         
   373     /**
   349     /**
   374     * SetPriority
   350     * SetPriority
   455     /**
   431     /**
   456     * SetReplyForwardFlagL
   432     * SetReplyForwardFlagL
   457     * Set reply/forward flag into original message if needed
   433     * Set reply/forward flag into original message if needed
   458     */
   434     */
   459     void SetReplyForwardFlagL();
   435     void SetReplyForwardFlagL();
   460         
   436          
   461     /**
       
   462     * LoadBackgroundImageAndSetBackgroundContextL
       
   463     * Loads bg image and creates local skin item from that
       
   464     * @param aRect Background rectangle
       
   465     */
       
   466 //        void LoadBackgroundImageAndSetBackgroundContextL( const TRect& aRect );
       
   467         
       
   468     /**
   437     /**
   469     * MailBoxSupportsSmartReply
   438     * MailBoxSupportsSmartReply
   470     * @return ETrue if mailbox supports smart reply
   439     * @return ETrue if mailbox supports smart reply
   471     */
   440     */
   472     TBool MailBoxSupportsSmartReply();
   441     TBool MailBoxSupportsSmartReply();
   513     * @param aEnv Alfred environment
   482     * @param aEnv Alfred environment
   514     * @param aSendAttachmentControlGroup Send attachment control group
   483     * @param aSendAttachmentControlGroup Send attachment control group
   515     * @param aMailClient Email framework client object.
   484     * @param aMailClient Email framework client object.
   516     * @param aBgControl Background control.
   485     * @param aBgControl Background control.
   517     */
   486     */
   518     CNcsComposeView( CFreestyleEmailUiAppUi& aAppUi, CAlfEnv& aEnv, CAlfControlGroup& aControlGroup, CFSMailClient& aMailClient, CMsvSession& aMsvSession );
   487     CNcsComposeView( CFreestyleEmailUiAppUi& aAppUi, 
       
   488                      CAlfEnv& aEnv, 
       
   489                      CAlfControlGroup& aControlGroup, 
       
   490                      CFSMailClient& aMailClient, 
       
   491                      CMsvSession& aMsvSession );
   519 
   492 
   520     /**
   493     /**
   521     * ConstructL
   494     * ConstructL
   522     * 2nd phase constructor.
   495     * 2nd phase constructor.
   523     */
   496     */
   639     
   612     
   640     CAsyncCallBack* iAsyncCallback;
   613     CAsyncCallBack* iAsyncCallback;
   641     
   614     
   642     CAknWaitDialog* iFetchWaitDialog; //<cmail>
   615     CAknWaitDialog* iFetchWaitDialog; //<cmail>
   643     
   616     
   644     //<cmail>
       
   645     //when some plugin makes fake sync, we need these
   617     //when some plugin makes fake sync, we need these
   646     TBool iFakeSyncGoingOn;
   618     TBool iFakeSyncGoingOn;
   647     TBool iFetchDialogCancelled;
   619     TBool iFetchDialogCancelled;
   648     CActiveHelper* iActiveHelper;
   620     CActiveHelper* iActiveHelper;
   649  
   621  
   650     // For the fake synchronous operations of the mail plugin run in DoExitL
   622     // For the fake synchronous operations of the mail plugin run in DoExitL
   651     // we need to knwo when the method is running and block all the commands
   623     // we need to knwo when the method is running and block all the commands
   652     // during that time.
   624     // during that time.
   653     TBool iExecutingDoExitL;
   625     TBool iExecutingDoExitL;
   654    //</cmail>
       
   655     
   626     
   656     CAsyncCallBack* iAsyncAttachmentAdd;
   627     CAsyncCallBack* iAsyncAttachmentAdd;
   657     MsgAttachmentUtils::TMsgAttachmentFetchType iAttachmentAddType;
   628     MsgAttachmentUtils::TMsgAttachmentFetchType iAttachmentAddType;
   658     
   629     
   659     // Status pane indicators (priority and followup)
   630     // Status pane indicators (priority and followup)
   660     CCustomStatuspaneIndicators* iStatusPaneIndicators;
   631     CCustomStatuspaneIndicators* iStatusPaneIndicators;
       
   632     
       
   633     // Popup menu for attachment list.
       
   634     CAknStylusPopUpMenu* iStylusPopUpMenu;
   661     };
   635     };
   662 
   636 
   663 //<cmail>
       
   664 /**
   637 /**
   665 * This class is used by CNcsComposeView for waiting its own async tasks.
   638 * This class is used by CNcsComposeView for waiting its own async tasks.
   666 *  
   639 *  
   667 * @since S60 v3.2
   640 * @since S60 v3.2
   668 */    
   641 */    
   674         * Default 1st phase factory method.
   647         * Default 1st phase factory method.
   675         * Creates an instance of CCacheSessionActiveHelper
   648         * Creates an instance of CCacheSessionActiveHelper
   676         *
   649         *
   677         * @return created instance of the CCacheSessionActiveHelper
   650         * @return created instance of the CCacheSessionActiveHelper
   678         */
   651         */
   679         static CActiveHelper* NewL(CNcsComposeView* aComposeView );
   652         static CActiveHelper* NewL( CNcsComposeView* aComposeView );
   680         
   653         
   681         /**
   654         /**
   682         * Destructor
   655         * Destructor
   683         */
   656         */
   684         ~CActiveHelper( );
   657         ~CActiveHelper( );
   691     private: // private functions
   664     private: // private functions
   692         
   665         
   693         /**
   666         /**
   694         * Constructor
   667         * Constructor
   695         */
   668         */
   696         CActiveHelper(CNcsComposeView* aSession);
   669         CActiveHelper( CNcsComposeView* aSession );
   697 
   670 
   698         /**
   671         /**
   699         * Active object RunL
   672         * Active object RunL
   700         */
   673         */
   701         void RunL();
   674         void RunL();
   714         * pointer to CNcsComposeView doesnt own
   687         * pointer to CNcsComposeView doesnt own
   715         */
   688         */
   716         CNcsComposeView* iComposeView;
   689         CNcsComposeView* iComposeView;
   717             
   690             
   718     };
   691     };
   719 //</cmail>
       
   720 
   692 
   721 #endif // CNCSCOMPOSEVIEW_H
   693 #endif // CNCSCOMPOSEVIEW_H
   722 
   694 
   723 
   695 
   724 // End of File
   696 // End of File