|
1 // CMSVBODYTEXT.H |
|
2 |
|
3 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 // All rights reserved. |
|
5 // This component and the accompanying materials are made available |
|
6 // under the terms of "Eclipse Public License v1.0" |
|
7 // which accompanies this distribution, and is available |
|
8 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 // |
|
10 // Initial Contributors: |
|
11 // Nokia Corporation - initial contribution. |
|
12 // |
|
13 // Contributors: |
|
14 // |
|
15 // Description: |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 #ifndef __CMSVBODYTEXT_H__ |
|
24 #define __CMSVBODYTEXT_H__ |
|
25 |
|
26 #include<e32base.h> |
|
27 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include <msvids.h> |
|
29 #endif |
|
30 |
|
31 /** |
|
32 The number of characters that will be decoded at any one time. Used to limit memory consumption. |
|
33 */ |
|
34 const TInt KMsvDecodeChunkLength = 512; |
|
35 |
|
36 /** |
|
37 The unique stream identifier of the 8 bit encoded body text data stored in the message store. |
|
38 */ |
|
39 const TUid KMsv8BitEncodedBodyData = {0x101FD0E2}; |
|
40 |
|
41 class CMsvStore; |
|
42 class CRichText; |
|
43 |
|
44 class CMsvBodyText : public CBase |
|
45 /** |
|
46 This class encapsulates 8 bit data and character set information for |
|
47 storage within the Message Store. It also populates a CRichText object with the |
|
48 8 bit data decoded to the specified character set. If a character set is not |
|
49 specified, then the default character set is used. |
|
50 |
|
51 @internalTechnology |
|
52 @released |
|
53 */ |
|
54 { |
|
55 public: |
|
56 IMPORT_C static CMsvBodyText* NewL(); |
|
57 IMPORT_C static CMsvBodyText* NewLC(); |
|
58 IMPORT_C virtual ~CMsvBodyText(); |
|
59 IMPORT_C void SetCharacterSet(const TUint aCharacterSetIdentifier); |
|
60 IMPORT_C TUint CharacterSet() const; |
|
61 IMPORT_C void SetDefaultCharacterSet(const TUint aCharacterSetIdentifier); |
|
62 IMPORT_C TUint DefaultCharacterSet() const; |
|
63 IMPORT_C void RestoreL(CMsvStore& aStore); |
|
64 IMPORT_C void StoreL(CMsvStore& aStore); |
|
65 IMPORT_C void StoreL(CMsvStore& aStore, const CBufBase& aData); |
|
66 IMPORT_C void GetBodyTextL(RFs& aFs, CMsvStore& aStore, CRichText& aBodyText); |
|
67 IMPORT_C void RemoveL(CMsvStore& aStore); |
|
68 IMPORT_C TBool IsPresentL(const CMsvStore& aStore) const; |
|
69 IMPORT_C TInt GetBodyLengthL(CMsvStore& aStore); |
|
70 IMPORT_C void GetBodyTextL(CMsvStore& aStore, TDes8& aBufer); |
|
71 private: |
|
72 CMsvBodyText(); |
|
73 |
|
74 private: |
|
75 TUint iCharSet; |
|
76 TUint iDefaultCharSet; |
|
77 }; |
|
78 |
|
79 #endif |