epoc32/include/app/csmsemailfields.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/csmsemailfields.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __CSMSEMAILFIELDS_H__
    17 #define __CSMSEMAILFIELDS_H__
    18 
    19 #include <e32base.h>
    20 #include <s32file.h>
    21 #include <badesca.h>
    22 
    23 class CMsvStore;
    24 
    25 /**
    26 Encapsulates the address and subject fields for Email sent over SMS.
    27 
    28 @publishedAll
    29 @released
    30 */
    31 class CSmsEmailFields : public CBase
    32 	{
    33 public:
    34 	IMPORT_C static CSmsEmailFields* NewL();
    35 	IMPORT_C static CSmsEmailFields* NewL(const CSmsEmailFields& aEmailFields);
    36 	IMPORT_C virtual ~CSmsEmailFields();
    37 
    38 	IMPORT_C void Reset();
    39 	IMPORT_C TInt Length() const;
    40 	IMPORT_C TBool HasAddress() const;
    41 	IMPORT_C HBufC* ComposeLC() const;
    42 	TInt ParseL(const TDesC& aBuffer);
    43 
    44 	IMPORT_C void AddAddressL(const TDesC& aAddress);
    45 	IMPORT_C void RemoveAddress(TInt aIndex);
    46 	IMPORT_C const MDesCArray& Addresses() const;
    47 	
    48 	IMPORT_C void SetSubjectL(const TDesC& aSubject);
    49 	IMPORT_C const TDesC& Subject() const;
    50 	
    51 	void RestoreL(CMsvStore& aStore);
    52 	void StoreL(CMsvStore& aStore) const;
    53 private:
    54 	CSmsEmailFields();
    55 	void ConstructL();
    56 	void ConstructL(const CSmsEmailFields& aEmailFields);
    57 
    58 	void InternalizeL(RReadStream& aStream);
    59 	void ExternalizeL(RWriteStream& aStream) const;
    60 private:	
    61 	CDesCArray*		iAddresses;
    62 	HBufC*			iSubject;
    63 	};
    64 
    65 #endif	// __CSMSEMAILFIELDS_H__