email/pop3andsmtpmtm/clientmtms/inc/cimprunemessage.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // cimprunemessage.h
       
    15 //
       
    16 
       
    17 /**
       
    18  * @file 
       
    19  * @publishedPartner
       
    20  * @released
       
    21  */
       
    22 
       
    23 #if !defined (__CIMPRUNEMESSAGE_H__)
       
    24 #define __CIMPRUNEMESSAGE_H__
       
    25 
       
    26 class CImEntryFinder;
       
    27 
       
    28 class CImPruneMessage : public CMsgActive
       
    29 /** Deletes the body text and attachment data from an individually specified message. 
       
    30 
       
    31 Example uses of this class are:
       
    32 
       
    33 1. to cleanup after a populating operation has failed
       
    34 
       
    35 2. to remove body text and attachment data from remote messages, while preserving 
       
    36 the message structure 
       
    37 @publishedPartner 
       
    38 @released
       
    39 */
       
    40 	{
       
    41 public:
       
    42 	IMPORT_C static CImPruneMessage* NewL(CMsvEntry& aEntry, RFs& aFs);
       
    43 	IMPORT_C static CImPruneMessage* NewLC(CMsvEntry& aEntry, RFs& aFs);
       
    44 
       
    45 	IMPORT_C void StartL(TMsvId aMessageEntry, TRequestStatus &aStatus);
       
    46 	~CImPruneMessage();
       
    47 	
       
    48 private:
       
    49 	CImPruneMessage(CMsvEntry& aEntry, RFs& aFs);
       
    50 	void ConstructL();
       
    51 	void DoRunL();
       
    52 	void DoComplete(TInt& );
       
    53 	void DoCancel();
       
    54 	void PruneEntryL();
       
    55 	void ResetStoreL();
       
    56 
       
    57 private:
       
    58 	enum TImPruningState
       
    59 		{
       
    60 		EImPruneUpdatingEntry,
       
    61 		EImPruneUpdatingFirstEntry,
       
    62 		EImPruneFindingEntry,
       
    63 		EImPruneFindFirstEntry,
       
    64 		EImPruneFindNextEntry
       
    65 		};
       
    66 
       
    67 	TImPruningState iState;
       
    68 
       
    69 	CMsvEntry& iCurrentEntry;
       
    70 	RFs& iFs;
       
    71 	CImEntryFinder* iEntryFinder;
       
    72 	CFileMan* iFileManager;
       
    73 	TMsvId iRootEntryId;
       
    74 	CMsvOperation* iChangeOperation;
       
    75 	CMsvStore* iStore;
       
    76 	};
       
    77 
       
    78 #endif //__CIMPRUNEMESSAGE_H__