messagingappbase/mce/inc/MceMessageListView.h
changeset 79 2981cb3aa489
equal deleted inserted replaced
25:84d9eb65b26f 79:2981cb3aa489
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *     This view is created when user opens folder.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCEMESSAGELISTVIEW_H
       
    22 #define MCEMESSAGELISTVIEW_H
       
    23 
       
    24 //  INCLUDES
       
    25 //#include "MceBaseListView.h"
       
    26 #include <aknview.h>
       
    27 #include <msvapi.h>
       
    28 #include <AiwServiceHandler.h>
       
    29 #include <coemain.h>
       
    30 #include <eiklbo.h>
       
    31 
       
    32 #include "MceMessageListContainer.h" 
       
    33 
       
    34 #include "mcetemplate.h"
       
    35 #include "MceFolderItem.h"
       
    36 #include "MceListboxTypeObserver.h"
       
    37 
       
    38 #include <bldvariant.hrh>
       
    39 
       
    40 #include <AiwServiceHandler.h>
       
    41 
       
    42 // CONSTANTS
       
    43 
       
    44 #define TDRVIEWID TVwsViewId( \
       
    45     TUid::Uid( KMceApplicationUidValue ), \
       
    46     TUid::Uid( KMceDeliveryReportViewIdValue ) )
       
    47 
       
    48 enum TMessageFolderMessageStatus
       
    49     {
       
    50     MessageFolderAllRead,
       
    51     MessageFolderAllUnread,
       
    52     MessageFolderReadUnread
       
    53     };
       
    54 
       
    55 enum TMessageFolderDeleteMessageStatus
       
    56     {
       
    57     MessageFolderAllDelete,
       
    58     MessageFolderAllUnDelete,
       
    59     MessageFolderDeleteUnDelete
       
    60     };
       
    61 
       
    62 enum TMceTemplatesDialogStatus
       
    63     {
       
    64     MceTemplatesDialogClose,
       
    65     MceTemplatesDialogOpen
       
    66     };
       
    67 // DATA TYPES
       
    68 typedef CArrayFixFlat<TMceFolderItem> CMceFolderItemArray;
       
    69 
       
    70 // FORWARD DECLARATIONS
       
    71 class CMsvSession;
       
    72 class CMceBitmapResolver;
       
    73 class CMceMainViewListView;
       
    74 class CAknLocalScreenClearer;
       
    75 class CMceSessionHolder;
       
    76 class CMceUi;
       
    77 class CMceMessageListContainer;
       
    78 class CMceMessageListContainerBase;
       
    79 class CEnvironmentChangeNotifier;
       
    80 
       
    81 class CMceListboxTypeObserver;
       
    82 
       
    83 // CLASS DECLARATION
       
    84 
       
    85 /**
       
    86 *  This view is created when user opens folder.
       
    87 */
       
    88 class CMceMessageListView :
       
    89     public CAknView,
       
    90     public MEikListBoxObserver,
       
    91     public MMsvSessionObserver,    
       
    92     public MMceListboxTypeObserver
       
    93     {
       
    94     public:  // Constructors and destructor
       
    95 
       
    96         /**
       
    97         * Two-phased constructor.
       
    98         */
       
    99         static CMceMessageListView* NewL(
       
   100             CMsvSessionPtr aSession,
       
   101             TMsvId aFolderId,
       
   102             CMceSessionHolder& aSessionHolder,
       
   103             CMceBitmapResolver& aBitmapResolver,
       
   104             CMceMainViewListView& aMainView );
       
   105 
       
   106         /**
       
   107         * Destructor.
       
   108         */
       
   109         virtual ~CMceMessageListView();
       
   110 
       
   111     public: // New functions
       
   112     
       
   113     
       
   114         /**
       
   115         * Sets folder to be watched
       
   116         * @param aFolderId: folder id
       
   117         */
       
   118         void SetFolderL( TMsvId aFolderId );
       
   119 
       
   120         /**
       
   121         * Returns listbox type of the current folder.
       
   122         * @return Folder listbox type
       
   123         */
       
   124         TInt GetFolderListBoxType();
       
   125 
       
   126 
       
   127         /**
       
   128         * Returns pointer to list container.
       
   129         * @return Pointer to list container
       
   130         */
       
   131         CMceMessageListContainerBase* ListContainer() const;
       
   132 
       
   133         /**
       
   134         * Should be called by mce after message server startup.
       
   135         * This adds view to session observer list and creates needed CMsvEntries.
       
   136         */
       
   137         virtual void HandleMsgServerStartupL();
       
   138         
       
   139         /**
       
   140         * Checks if there are unread messages in the given folder
       
   141         */
       
   142         TBool HasUnreadMessagesL();
       
   143 
       
   144         /**
       
   145          * Cancels remote mailbox timer.
       
   146          */
       
   147         void CancelMailboxTimer() const;
       
   148 
       
   149         /**
       
   150          * Checks if folder aName already exists
       
   151          * @param aName folder name to be searched.
       
   152          * @param aId id of the folder. Should be set when renaming.
       
   153          * @return ETrue if name used.
       
   154          */
       
   155         TBool IsFolderNameUsedL(const TDesC& aName, TMsvId aId = KErrNotFound) const;
       
   156 
       
   157         /**
       
   158          * Changes currently opened folder and redraws the list.
       
   159          * @param aNewFolderId: id of the folder name to be opened
       
   160          */
       
   161         void ChangeFolderAndRefreshListboxL( TMsvId aNewFolderId );
       
   162 
       
   163         /**
       
   164         * Finds and selects message entry
       
   165         * @param aMatchString: the matched string
       
   166         */
       
   167         void FindAndSelectEntryL( const TDesC& aMatchString ) const;
       
   168 
       
   169         /**
       
   170         * Checks, if SyncMl folder
       
   171         * Returns ETrue, if SyncMl folder              
       
   172         */
       
   173         TBool IsSyncMl() const;
       
   174 
       
   175         /**
       
   176         * Checks, if SyncMl Outbox or Inbox folder
       
   177         * Returns ETrue, if SyncMl Outbox or Inbox folder
       
   178         * @param aFolder: id of the folder        
       
   179         */
       
   180         TBool SyncMlOutboxInbox( TMsvId aFolder ) const;
       
   181 
       
   182         /**
       
   183         * Checks, if MMS notification can be opened using selection key         
       
   184         */
       
   185         TBool CheckMMSNotificationOpenL( ) const;
       
   186 
       
   187         /**
       
   188         * Opens remote mailbox settings              
       
   189         */
       
   190         void OpenMailboxSettingsL();
       
   191 
       
   192         /**
       
   193         * Is IMAP folder open        
       
   194         */
       
   195         TBool IsImapFolderOpenL( ) const;
       
   196 
       
   197         /**
       
   198         * From CAknView: Sets the new size of Rect
       
   199         */
       
   200         void HandleStatusPaneSizeChange();
       
   201 
       
   202         inline void UpdateViewL();
       
   203 
       
   204     public: // Functions from base classes
       
   205 
       
   206         /**
       
   207         * From CAknView
       
   208         */
       
   209         TUid Id() const;
       
   210 
       
   211         /**
       
   212         * From CAknView
       
   213         */
       
   214         void DoActivateL(
       
   215             const TVwsViewId& aPrevViewId,
       
   216             TUid aCustomMessageId,
       
   217             const TDesC8& aCustomMessage );
       
   218 
       
   219         /**
       
   220         * From CAknView
       
   221         */
       
   222         void DoDeactivate();
       
   223 
       
   224         /**
       
   225         * From CAknView
       
   226         */
       
   227         void DynInitMenuPaneL(
       
   228             TInt aResourceId,
       
   229             CEikMenuPane* aMenuPane );
       
   230 
       
   231         /**
       
   232         * From MEikCommandObserver
       
   233         */
       
   234         void HandleCommandL( TInt aCommand );
       
   235 
       
   236         /**
       
   237         * From MMsvSessionObserver
       
   238         */
       
   239         virtual void HandleSessionEventL(
       
   240             TMsvSessionEvent aEvent,
       
   241             TAny* aArg1,
       
   242             TAny* aArg2,
       
   243             TAny* aArg3 );
       
   244 
       
   245         /**
       
   246         * From MEikCommandObserver
       
   247         */
       
   248         virtual void ProcessCommandL(TInt aCommand);
       
   249         
       
   250         /**
       
   251         * From CAknView ?member_description
       
   252         */
       
   253         void HandleClientRectChange();        
       
   254 
       
   255         /**
       
   256         * Sets the label for the middle soft key in the folder view
       
   257         * @since S60 3.1
       
   258         */
       
   259         void SetMSKButtonL();
       
   260         
       
   261         /**
       
   262         * Checks if current folder is emailmailbox for the middle soft key.
       
   263         * @since S60 3.1
       
   264         * @return Etrue if mailbox
       
   265         */
       
   266         TBool IsMSKMailBox();  
       
   267         
       
   268         /**
       
   269         * Checks if current folder is syncMLmailbox for the middle soft key.
       
   270         * @since S60 3.2
       
   271         * @return Etrue if syncMLmailbox
       
   272         */
       
   273         TBool IsMSKSyncMlMailBox();
       
   274         
       
   275         /**
       
   276         * Store current item id for mailbox focus
       
   277         * @since S60 3.0
       
   278         */
       
   279         void SetCurrentItemId();
       
   280 
       
   281         /**
       
   282         * Should be called by container when selection button is pressed so that
       
   283         * exit command is not showed in context sensitive menu. iHideExitCommand set
       
   284         * EFalse at the end of DynInitMenuPaneL function.
       
   285         * @param aHideExitCommand: ETrue if exit not shown next time option menu displayed
       
   286         */
       
   287         void SetHideExitCommand( TBool aHideExitCommand );
       
   288         
       
   289         /**
       
   290         * Check if the item is Unread
       
   291         * @para aId: the item id
       
   292         * @return ETrue if the item is unread, return EFalse if the item is read
       
   293         * @since Taco
       
   294         */
       
   295        TBool IsItemUnread( TMsvId aId ); 
       
   296 
       
   297         /**
       
   298         * Handle call by sendkey in email list 
       
   299         * @para aEntryId: current entry id
       
   300         * @Since S60 5.0
       
   301         */
       
   302         void HandleSendkeyInMailboxL( TMsvId aEntryId );
       
   303 
       
   304         /**
       
   305         * Call-back function for CEnvironmentChangeNotifier class.
       
   306         * @param object of CMceMessageListView.
       
   307         */        
       
   308         static TInt EnvironmentChanged( TAny* aObj );
       
   309         
       
   310         /**
       
   311         * From MMceListboxTypeObserver
       
   312         */
       
   313         virtual void ListboxTypeChangedL();
       
   314 		
       
   315 		/**
       
   316         * For setting the ContextCommandFlag when clicked to get the context menu
       
   317         */
       
   318         void SetContextCommandFlag(TBool aContextCommandFlag);
       
   319 
       
   320     protected:  // Functions from base classes
       
   321 
       
   322         /**
       
   323         * From MEikListBoxObserver
       
   324         */
       
   325         void HandleListBoxEventL(
       
   326             CEikListBox* aListBox,
       
   327             TListBoxEvent aEventType );
       
   328 
       
   329     private:
       
   330 
       
   331         /**
       
   332         * Constructor is private.
       
   333         */
       
   334         CMceMessageListView(
       
   335             CMsvSessionPtr aSession,
       
   336             TMsvId aFolderId,
       
   337             CMceSessionHolder& aSessionHolder,
       
   338             CMceBitmapResolver& aBitmapResolver,
       
   339             CMceMainViewListView& aMainView );
       
   340 
       
   341         /**
       
   342         * Symbian OS constructor
       
   343         */
       
   344         void ConstructL();
       
   345 
       
   346         /**
       
   347         * Handles different 'open's: Open folder or open message
       
   348         */
       
   349         void HandleOpenL();
       
   350 
       
   351         /**
       
   352         * Called when user pressed Back and main view should be opened
       
   353         */
       
   354         void HandleCloseL();
       
   355 
       
   356         /**
       
   357         * Changes currently opened folder.
       
   358         * @param aOpenParent: ETrue if "CD .." wanted.
       
   359         */
       
   360         void ChangeFolderL( TBool aOpenParent = EFalse );
       
   361 
       
   362         /**
       
   363         * User wants to open message and this call's Ui's EditMtmEntry function.
       
   364         */
       
   365         void EditEntryL();
       
   366 
       
   367         /**
       
   368         * Called by DynInitMenuPaneL to delete unneccessary menu items.
       
   369         * @param aMenuPane menu pane
       
   370         */
       
   371         void FetchMenuL( CEikMenuPane* aMenuPane ) const;
       
   372 
       
   373         /**
       
   374         * Called by DynInitMenuPaneL to delete unneccessary menu items.
       
   375         * @param aMenuPane menu pane
       
   376         */
       
   377         void FolderMenuL( CEikMenuPane* aMenuPane );
       
   378 
       
   379         /**
       
   380         * Called by FolderMenuL to delete unneccessary menu items.
       
   381         * @param aMenuPane menu pane
       
   382         */
       
   383         void FolderMenuNoItemsL( CEikMenuPane* aMenuPane ) const;
       
   384         /**
       
   385         * Called by FolderMenuL to delete unneccessary menu items.
       
   386         * @param aMenuPane menu pane
       
   387         */
       
   388         void FolderMenuOneItemL( 
       
   389             CEikMenuPane* aMenuPane, 
       
   390             TBool aRemoteMailboxOpened,
       
   391             TBool aThirdPartEmail  );
       
   392         /**
       
   393         * Called by FolderMenuL to delete unneccessary menu items.
       
   394         * @param aMenuPane menu pane
       
   395         */
       
   396         void FolderMenuManyItemsL(
       
   397             CEikMenuPane* aMenuPane, 
       
   398             TBool aRemoteMailboxOpened,
       
   399             TBool aThirdPartEmail,
       
   400             TBool aSetRead = EFalse );
       
   401 
       
   402         /**
       
   403         * Called by FolderMenuL to delete unneccessary menu items.
       
   404         * @param aMenuPane menu pane, SyncML folder
       
   405         */
       
   406 		void FolderMenuSyncMLMain( CEikMenuPane *aMenuPane );
       
   407 
       
   408         /**
       
   409         * Called by FolderMenuL to delete unneccessary menu items.
       
   410         * @param aMenuPane menu pane, SyncML folder
       
   411         */
       
   412 		void FolderMenuSyncMLFolderL( CEikMenuPane *aMenuPane );
       
   413 
       
   414         /**
       
   415         * Called by DynInitMenuPaneL to delete unneccessary menu items.
       
   416         * @param aMenuPane menu pane
       
   417         */
       
   418         void EditMenuL( CEikMenuPane* aMenuPane ) const;
       
   419 
       
   420         /**
       
   421         * Called by DynInitMenuPaneL to delete unneccessary menu items.
       
   422         * @param aMenuPane menu pane
       
   423         */
       
   424         void OrganizeMenuL( CEikMenuPane* aMenuPane );
       
   425 
       
   426         /**
       
   427         * Returns ETrue if folder is opened by this view and
       
   428         * back does not return to main view.
       
   429         * If EFalse returned then this view needs to be closed
       
   430         * and main view is activated.
       
   431         */
       
   432         TBool FolderOpenedL();
       
   433 
       
   434         /**
       
   435         * Returns folder count in currently opened folder
       
   436         */
       
   437         TInt SubfolderCount() const;
       
   438 
       
   439         /**
       
   440          * Checks how many unread messages folder has. If only one then asks
       
   441          * MceUi to open it. If more than one, select first unread. If none select first
       
   442          * item of the folder
       
   443          * @return ETrue if there is one message in inbox/mailbox folder and trying to open it,
       
   444          * EFalse when just opening inbox/mailbox folder
       
   445          * @param aId: message id
       
   446          */
       
   447         TBool FindUnreadMessageAndOpenItL( const TMsvId aId );
       
   448 
       
   449         /**
       
   450          * Finds folder called 'Inbox' from current (IMAP4 remote mailbox) folder and opens it.
       
   451          * Do not confuse with local service inbox!
       
   452          */
       
   453         void FindInboxAndOpenItL();
       
   454 
       
   455         /**
       
   456         * Sets empty text of the list box.
       
   457         * Empty text is different in Remote mailboxes than other folders.
       
   458         */
       
   459         void SetEmptyTextL() const;
       
   460 
       
   461         /**
       
   462         * Function for the CIdle class to be called, calls LaunchMceViewer.
       
   463         * @param aSelf: pointer to CMceMessageListView object.
       
   464         * @return see LaunchMceViewer.
       
   465         */
       
   466         static TInt LaunchViewer( TAny* aSelf );
       
   467 
       
   468         /**
       
   469         * Tries to launch viewer (by calling Mce's EditMtmEntryL)
       
   470         * for the unread message if there is only one unread
       
   471         * message in the folder. Otherwise does not do nothing
       
   472         * @return KErrNone if launch ok
       
   473         */
       
   474         TInt LaunchMceViewer( );
       
   475 
       
   476         /**
       
   477         * Checks if selected entry can be opened and dims 'send via' menu if it can
       
   478         * @param aEntryId: currently selected entry
       
   479         * @param aMenuPane: menupane
       
   480         */
       
   481         void HandleSendViaMenuItemL( TMsvId aEntryId, CEikMenuPane* aMenuPane ) const;
       
   482 
       
   483         /**
       
   484         * Called by HandleSessionEventL if entries created or changed.
       
   485         * @param aParentId: id of the parent
       
   486         * @param aSelection: pointer to selection of messages changed.
       
   487         */
       
   488         void MessageViewHandleEntriesCreatedOrChangedL(
       
   489             TMsvId aParentId,
       
   490             CMsvEntrySelection* aSelection );
       
   491 
       
   492         /**
       
   493         * Handles EMceCmdSortByDate,EMceCmdSortBySubject and EMceCmdSortBySender
       
   494         * @param aCommand: id of the command
       
   495         */
       
   496         void HandleSortCommandL( const TInt aCommand );
       
   497 
       
   498         /**
       
   499         * Open SyncMl Inbox folder               
       
   500         */
       
   501         void SyncMlFindInboxAndOpenItL();   
       
   502         
       
   503         /**
       
   504         *
       
   505         */
       
   506         TInt GetSetRead( const CMsvEntrySelection& aEntries );
       
   507         
       
   508         /**
       
   509         * Checks are the selected messages deleted or undeleted
       
   510         * @since 3.2
       
   511         * @return Index of the selected message deletetion status
       
   512         * otherwise KErrNotFound
       
   513         */
       
   514         TInt GetDeleteFlagStatusL( const CMsvEntrySelection* aEntries );
       
   515         
       
   516         /**
       
   517         * Checks if there is only one unread message in current folder
       
   518         * and starts viewer for it
       
   519         * @since 3.2
       
   520         * @param aMsgMtmUid: filled with Message MTM Uid
       
   521         * @return Index of the message if only one unread, 
       
   522         * otherwise KErrNotFound
       
   523         */
       
   524         TInt LaunchViewerWhenOneUnreadL( TInt &aMsgMtmUid );
       
   525         
       
   526         /**
       
   527         * registers MceMessageListContainer to Msk observer
       
   528         * @param aObserver: True if set MskObserver and False to remove it.
       
   529         * @since 3.2
       
   530         */
       
   531         void SetMskObserver( TBool aObserver );
       
   532 
       
   533 
       
   534 		/**
       
   535 		* Input parameter list for AIW plugin
       
   536 		*/
       
   537 		CAiwGenericParamList* AiwSyncParamListLC(TInt aId, const TDesC& aText);
       
   538 
       
   539         /**
       
   540         *
       
   541         */
       
   542         void HandleEntriesCreatedChangedL( const CMsvEntrySelection* aSelection );
       
   543 
       
   544         /**
       
   545         *
       
   546         */
       
   547         void HandleEntriesDeletedL( );
       
   548 
       
   549         /**
       
   550         *
       
   551         */
       
   552         void HandleEntriesMovedL( TMsvId aSourceFolderId, TMsvId aTargetFolderId );
       
   553         
       
   554         
       
   555         /**
       
   556         * Creates either one row or two row listbox and sets it to iMsgListContainer
       
   557         */
       
   558         void CreateListboxL();
       
   559 
       
   560         /**
       
   561         * Find all read messages and mark 
       
   562         * 
       
   563         * @since Taco
       
   564         */
       
   565         void FindAllReadMsgAndMarkL();
       
   566         
       
   567         /**
       
   568         * Check if there is any selected item visible in current view 
       
   569         * @ msgIndexArray: the array of the index of selected item
       
   570         * @since S60 5.0
       
   571         */
       
   572         TBool AnySelectedItemsVisible( CArrayFixFlat<TInt>* msgIndexArray );
       
   573 
       
   574         /**
       
   575         * Check if it is in Inbox, Documents and user's own foldermark, 
       
   576         * if it is, enable mark read msg option from menu
       
   577         * @currentEntry: current entry
       
   578         * @currentfolderId: current Folder Id
       
   579         * @aMenuPane: Menu pane to show the mark all read command
       
   580         * @since S60 5.0
       
   581         */
       
   582         void EnableMarkAllReadMsgInInboxAndDocument( 
       
   583             TMsvEntry currentEntry, 
       
   584             TMsvId currentFolderId, 
       
   585             CEikMenuPane* aMenuPane );
       
   586             
       
   587             
       
   588         /**
       
   589         * Set correct menu items for expand/collapse options
       
   590         * @param aMenuPane: 
       
   591         * @since S60 5.0
       
   592         */    
       
   593         void HandleContainerOptionsMenuL( CEikMenuPane* aMenuPane );  
       
   594         
       
   595         /**
       
   596         *
       
   597         */
       
   598         void HandleContainerOptionsCommandL( TInt aCommand );
       
   599         
       
   600         /**
       
   601         * called from EnvironmentChanged.
       
   602         */
       
   603         TInt HandleEnvironmentChanged();
       
   604          
       
   605         /*
       
   606         * Check and Set Forward command for the selected item
       
   607         * Forward is currently only available in Sent Item folder
       
   608         * Since 5.0
       
   609         */
       
   610         void SetForwardMenuL( CEikMenuPane* aMenuPane, TMsvEntry& aEntry );            
       
   611          
       
   612         /*
       
   613         * Dim Read/Unread command from options menu, prepare for further settings
       
   614         * Since 5.0 
       
   615         */
       
   616         void DimReadUnreadOptionsMenu( CEikMenuPane *aMenuPane );
       
   617         
       
   618         /*
       
   619         * Set Read/Unread command for options menu, when multiple msg/emails are selected
       
   620         * Since 5.0
       
   621         */
       
   622         void SetReadUnreadOptionsMenu( CEikMenuPane *aMenuPane, TBool aIsEmail, TBool aSetRead );
       
   623 public:
       
   624         /**
       
   625         * Set the iReadUnread variable if Mark as read/unread appears twice
       
   626         * if it is, enable mark read msg option from menu
       
   627         * @aValue: The value to be set to iReadUnread variable
       
   628         * Since 3.2
       
   629         */
       
   630         void SetMarkReadUnread( TBool aValue );
       
   631 		
       
   632         /**
       
   633          *  This function sets aClearer to iLocalScreenClearer which contains Inbox view
       
   634          *  screen. aClearer is used in CMceUi::HandleGainingForeground() when returning from viewers.
       
   635          */
       
   636         void  GetLocalScreenClearer( CAknLocalScreenClearer** &aClearer );
       
   637         /**
       
   638         * Set the iMarkingModeOn variable if MarkingMode is switched on
       
   639         * @aValue: The value to be set to iMarkingModeOn variable
       
   640         * Since 9.2
       
   641         */
       
   642         void SetMarkingMode( TBool aMarkingModeOn );
       
   643 		/**
       
   644         * Get the iMarkingModeOn variable
       
   645         * @return: the value of iMarkingModeOn
       
   646         * Since 9.2
       
   647         */
       
   648         TBool MarkingMode() const;
       
   649 		/**
       
   650         * Get iMsgListContainer->MessageCount() variable
       
   651         * @return: The value of MessageCount()
       
   652         * Since 9.2
       
   653         */
       
   654         TInt MessageCount() const;
       
   655 		/**
       
   656         * Set the MarkingMode off and inform the same to container
       
   657         * Since 9.2
       
   658         */
       
   659 		void SetMarkingModeOff();
       
   660             
       
   661     private:    // Data
       
   662 
       
   663         CMceUi*                 iMceUi;
       
   664         CMceMessageListContainerBase*  iMsgListContainer;
       
   665         
       
   666         TInt                    iCurrentListboxId;
       
   667         CMsvSessionPtr          iSession;
       
   668         TMsvId                  iFolderId;
       
   669         CMceSessionHolder&      iSessionHolder;
       
   670         CMceBitmapResolver&     iBitmapResolver;
       
   671         TBool                   iMceViewActivated;
       
   672         TBool                   iMsvSessionReady;
       
   673         CAiwServiceHandler*		iAiwServiceHandler;
       
   674         TMceFlags               iListViewFlags;
       
   675         TMsvId 					iCurrentItemId;
       
   676 
       
   677         TInt    iSelectedIndex; // index of the cursor when deactivated
       
   678    
       
   679         HBufC*  iInboxName;
       
   680         HBufC*  iRemoteMailboxEmptyText;
       
   681         HBufC*  iEmptyText;
       
   682         CMceMainViewListView& iMainViewListView;
       
   683         TBool   iHideExitCommand;
       
   684         TBool   iFetchMenuSelectionKeyPressed;
       
   685         CPeriodic*  iMessageViewerLauncher;        
       
   686         CAknLocalScreenClearer* iLocalScreenClearer;
       
   687         TInt    iLaunchViewerCounter;
       
   688         CMceFolderItemArray* iFolderItemArray;
       
   689         TBool   iConnectionNote;
       
   690 
       
   691         TInt    iSortOrder;
       
   692         TBool   iOrdering;        
       
   693         TBool   iRunningEditFunction;
       
   694         TBool   iIsUnread;
       
   695         
       
   696         TInt                     iCurrentListType;
       
   697         CMceListboxTypeObserver* iListboxMailTypeObserver;
       
   698         CMceListboxTypeObserver* iListboxInboxTypeObserver;
       
   699         
       
   700         CEnvironmentChangeNotifier* iDateTimeNotifier;
       
   701         //Variable that get set when Mark as read/unread appears twice
       
   702 		TBool 						iReadUnread; 
       
   703 		//Variable for context command
       
   704 		TBool                       iContextCommand;
       
   705 		//To indicate if marking mode is on/off
       
   706 		TBool                       iMarkingModeOn;
       
   707     };
       
   708 
       
   709 inline void CMceMessageListView::UpdateViewL()
       
   710 	{
       
   711 	if ( iMsgListContainer )
       
   712 	    {
       
   713         iMsgListContainer->SetAnchorItemIdL(
       
   714             CMceMessageListContainerBase::EMessageListOperationCompleted );
       
   715         iMsgListContainer->RefreshListbox();
       
   716 	    }
       
   717 	}
       
   718 
       
   719 
       
   720 
       
   721 #endif
       
   722 
       
   723 // End of file