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 "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 // |
|
15 |
|
16 #ifndef __CSMSEMAILFIELDS_H__ |
|
17 #define __CSMSEMAILFIELDS_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <s32file.h> |
|
21 #include <badesca.h> |
|
22 |
|
23 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB) |
|
24 #include <smut.h> |
|
25 #include <msvstd.h> |
|
26 #endif |
|
27 |
|
28 class CMsvStore; |
|
29 |
|
30 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB) |
|
31 class CHeaderFields; |
|
32 #endif |
|
33 |
|
34 |
|
35 /** |
|
36 Encapsulates the address and subject fields for Email sent over SMS. |
|
37 |
|
38 @publishedAll |
|
39 @released |
|
40 */ |
|
41 NONSHARABLE_CLASS (CSmsEmailFields) : public CBase |
|
42 { |
|
43 public: |
|
44 IMPORT_C static CSmsEmailFields* NewL(); |
|
45 IMPORT_C static CSmsEmailFields* NewL(const CSmsEmailFields& aEmailFields); |
|
46 IMPORT_C virtual ~CSmsEmailFields(); |
|
47 |
|
48 IMPORT_C void Reset(); |
|
49 IMPORT_C TInt Length() const; |
|
50 IMPORT_C TBool HasAddress() const; |
|
51 IMPORT_C HBufC* ComposeLC() const; |
|
52 TInt ParseL(const TDesC& aBuffer); |
|
53 |
|
54 IMPORT_C void AddAddressL(const TDesC& aAddress); |
|
55 IMPORT_C void RemoveAddress(TInt aIndex); |
|
56 IMPORT_C const MDesCArray& Addresses() const; |
|
57 |
|
58 IMPORT_C void SetSubjectL(const TDesC& aSubject); |
|
59 IMPORT_C const TDesC& Subject() const; |
|
60 |
|
61 void RestoreL(CMsvStore& aStore); |
|
62 void StoreL(CMsvStore& aStore) const; |
|
63 |
|
64 #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB) |
|
65 void StoreDBL(CMsvStore& aStore); |
|
66 void ReStoreDBL(CMsvStore& aStore); |
|
67 TInt ConvertToTInt(TDesC16& aStr); |
|
68 void GetRecipientListL(TDesC16& aStr); |
|
69 TInt GetBufSize(); |
|
70 #endif |
|
71 |
|
72 private: |
|
73 CSmsEmailFields(); |
|
74 void ConstructL(); |
|
75 void ConstructL(const CSmsEmailFields& aEmailFields); |
|
76 |
|
77 void InternalizeL(RReadStream& aStream); |
|
78 void ExternalizeL(RWriteStream& aStream) const; |
|
79 private: |
|
80 CDesCArray* iAddresses; |
|
81 HBufC* iSubject; |
|
82 }; |
|
83 |
|
84 #endif // __CSMSEMAILFIELDS_H__ |
|