messagingappbase/mce/inc/MceChangeFlagOperation.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2003 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 *     Changes message flag.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #if !defined(__MCECHANGEFLAGOPERATION_H__)
       
    22 #define __MCECHANGEFLAGOPERATION_H__
       
    23 
       
    24 
       
    25 //  INCLUDES
       
    26 #include <msvapi.h>
       
    27 #include "MceUtils.h"
       
    28 #include <MsvPrgReporter.h>
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  Marks email messages read in remote mailbox.
       
    38 */
       
    39 
       
    40 class CMceRemoveNewFlag : 
       
    41     public CMsvOperation,
       
    42     public MMsvProgressDecoder
       
    43     {
       
    44     public:
       
    45 
       
    46         enum TRemoveType
       
    47             {
       
    48             EMceRemoveEntryFlagUnread   = 0x01,
       
    49             EMceRemoveEntryFlagNew      = 0x02,
       
    50             EMceRestoreEntryFlagRead    = 0x04
       
    51             };
       
    52         
       
    53         /**
       
    54         * Constructor.
       
    55         */
       
    56         static CMceRemoveNewFlag* NewL(
       
    57             TUint32 aRemoveFlags,
       
    58             CMsvSession& aMsvSession, 
       
    59             TRequestStatus& aObserverRequestStatus, 
       
    60             CMsvEntrySelection* aSelection );
       
    61         /**
       
    62         * Destructor.
       
    63         */
       
    64         virtual ~CMceRemoveNewFlag();
       
    65 
       
    66    public: // Functions from base classes    
       
    67 
       
    68         /**
       
    69         * From CActive
       
    70         */
       
    71         virtual const TDesC8& ProgressL();
       
    72 
       
    73         /**
       
    74         * From MMsvProgressDecoder
       
    75         */ 
       
    76         virtual TInt DecodeProgress (
       
    77             const TDesC8& aProgress, 
       
    78             TBuf<CBaseMtmUi::EProgressStringMaxLen>& aReturnString, 
       
    79             TInt& aTotalEntryCount, 
       
    80             TInt& aEntriesDone,
       
    81             TInt& aCurrentEntrySize, 
       
    82             TInt& aCurrentBytesTrans, 
       
    83             TBool aInternal );
       
    84 
       
    85    protected: // Functions from base classes
       
    86 
       
    87         /** 
       
    88         * From CActive
       
    89         */
       
    90         void DoCancel();
       
    91         /** 
       
    92         * From CActive
       
    93         */
       
    94         void RunL();
       
    95 
       
    96    private:
       
    97         /**
       
    98         * Constructor.
       
    99         */
       
   100         CMceRemoveNewFlag(
       
   101             TUint32 aRemoveFlags,
       
   102             CMsvSession& aMsvSession,
       
   103             TRequestStatus& aObserverRequestStatus,
       
   104             TMsvId aFolderId,
       
   105             CMsvEntrySelection* aSelection );
       
   106 
       
   107         /**
       
   108         * Constructor.
       
   109         */
       
   110         void ConstructL();      
       
   111 
       
   112         /** 
       
   113         * Starts next email message handling to remove new/unread flag
       
   114         */
       
   115         void RemoveNextNewFlagL();        
       
   116 
       
   117         /** 
       
   118         * Removes new/unread flag from email message
       
   119         */
       
   120         void MakeNextRemoveL();
       
   121         
       
   122         /**
       
   123         * Conditional item deletion from selection
       
   124         * @since Series60 3.0
       
   125         * @param aIndex, index in selection
       
   126         */
       
   127         void DeleteFromSelection( TInt aIndex, TBool aUnread );
       
   128         
       
   129     private:
       
   130         CMsvOperation*          iOperation;
       
   131         CMsvEntry*              iEntry;
       
   132         TMsvEntry               iNewEntry;
       
   133         TMsvId                  iFolderId;
       
   134         CMsvEntrySelection*     iEntrySelection;
       
   135         TBuf8<1>                iBlank;
       
   136         TMceFlags               iRemoveFlags;
       
   137         TInt                    iCount;
       
   138     };
       
   139 
       
   140 #endif // __MCECHANGEFLAGOPERATION_H__
       
   141 
       
   142 // End of file