epoc32/include/cimplainbodytext.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- a/epoc32/include/cimplainbodytext.h	Tue Mar 16 16:12:26 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,100 +0,0 @@
     1.4 -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#ifndef _CIMPLAINBODYTEXT_H_
    1.20 -#define _CIMPLAINBODYTEXT_H_
    1.21 -
    1.22 -class CImEmailMessage;
    1.23 -class CImStoreMessagePart;
    1.24 -class CMsgActive;
    1.25 -/**
    1.26 -This class is a wrapper over CMsvPlainBodyText class of message server.
    1.27 -The pointer to this class can be obtained by calling OpenPlainBodyTextForReadL 
    1.28 -or OpenPlainBodyTextForWriteL API of the CImEmailMessage class.
    1.29 -This can be used to store/restore a email message created by using the 
    1.30 -CImEmailOperation class.
    1.31 -
    1.32 -@see CImEmailMessage, CImEmailOperation
    1.33 -@publishedAll
    1.34 -@released
    1.35 -*/
    1.36 -
    1.37 -class CImPlainBodyText: public CMsgActive
    1.38 -	{
    1.39 -public:
    1.40 -	static CImPlainBodyText* NewL(CImEmailMessage& aEmailMessage, CMsvEntry& aMsvEntry, CImEmailMessage::TImEmailEntryType aEntryType, TInt aChunkLength, TBool aEditMode);
    1.41 -	IMPORT_C ~CImPlainBodyText();
    1.42 -	
    1.43 -	IMPORT_C void StoreChunkL(const TDesC8& aChunk, TRequestStatus& aStatus);
    1.44 -	IMPORT_C void StoreChunkL(const TDesC8& aChunk);
    1.45 -	
    1.46 -	IMPORT_C void StoreChunkL(const TDesC16& aChunk, TRequestStatus& aStatus);
    1.47 -	IMPORT_C void StoreChunkL(const TDesC16& aChunk);
    1.48 -		
    1.49 -	IMPORT_C void StoreRichTextAsPlainTextL(CRichText& aRichText);
    1.50 -	
    1.51 -	IMPORT_C void CommitL(TRequestStatus& aStatus);
    1.52 -	IMPORT_C void CommitL(TRequestStatus& aStatus, CImMimeHeader& aMimeHeader);
    1.53 -	
    1.54 -	IMPORT_C void NextChunkL(TDes8& aChunk, TRequestStatus& aStatus);
    1.55 -	IMPORT_C void NextChunkL(TDes8& aChunk);
    1.56 -	
    1.57 -	IMPORT_C void NextChunkL(TDes16& aChunk, TRequestStatus& aStatus);		
    1.58 -	IMPORT_C void NextChunkL(TDes16& aChunk);
    1.59 -	
    1.60 -	IMPORT_C void PreviousChunkL(TDes8& aChunk, TRequestStatus& aStatus);
    1.61 -	IMPORT_C void PreviousChunkL(TDes8& aChunk);
    1.62 -		
    1.63 -	IMPORT_C void PreviousChunkL(TDes16& aChunk, TRequestStatus& aStatus);
    1.64 -	IMPORT_C void PreviousChunkL(TDes16& aChunk);
    1.65 -	
    1.66 -private:
    1.67 -	CImPlainBodyText(CImEmailMessage& aEmailMessage, CMsvEntry& aMsvEntry);
    1.68 -	void ConstructL(TInt aChunkLength, CImEmailMessage::TImEmailEntryType aEntryType, TBool aEditMode);
    1.69 -	void DoRunL(); // From CMsgActive
    1.70 -	void DoCancel(); 
    1.71 -private:
    1.72 -	CImEmailMessage& 		iEmailMessage;
    1.73 -	CImStoreMessagePart* 	iStoreMessagePart;
    1.74 -	/** The CMsvEntry associated with the message being stored/restored.*/
    1.75 -	CMsvEntry& 				iMsvEntry;
    1.76 -	/** The array of  framework/server class to store/restore body text in chunks.*/
    1.77 -	RPointerArray<CMsvPlainBodyText> iPlainTextArray;
    1.78 -	/** The id of the message. */
    1.79 -	TMsvId 					iMessageId;
    1.80 -	/** The Store associated with the message being stored/restored.*/
    1.81 -	CMsvStore* 				iStore;
    1.82 -	/** For indexing the plaintext array */
    1.83 -	TInt 					iIndex;
    1.84 -	/** The 16-bit pointer to a chunk that will be populated with data when asynchronous
    1.85 -		16-bit versions of NextChunkL / PreviousChunkL returns.*/
    1.86 -	TDes16*					iChunk16;
    1.87 -	/** The 8-bit pointer to a chunk that will be populated with data when asynchronous
    1.88 -		8-bit versions of NextChunkL / PreviousChunkL returns.*/
    1.89 -	TDes8*					iChunk8;
    1.90 -	
    1.91 -	/** Enum indicating which asynchronous chunk retrieving method resulted in a 
    1.92 -	   	call to DoRunl.*/
    1.93 -	enum TChunkRetrievalState 
    1.94 -		{
    1.95 -		EIdleState,
    1.96 -		ENextChunk8Bit,
    1.97 -		ENextChunk16Bit,
    1.98 -		EPreviousChunk8Bit,
    1.99 -		EPreviousChunk16Bit,
   1.100 -		} iChunkRetrievalState;
   1.101 -	};
   1.102 -
   1.103 -#endif //_CIMPLAINBODYTEXT_H_