|
1 // CMSVPLAINBODYTEXTENTRY.H |
|
2 |
|
3 // Copyright (c) 2007-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 #ifndef __CMSVPLAINBODYTEXTENTRY_H__ |
|
19 #define __CMSVPLAINBODYTEXTENTRY_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 class CMsvPlainBodyText; |
|
24 class CMsvServerEntry; |
|
25 class CMsvStore; |
|
26 |
|
27 /** |
|
28 Size of buffer to temporarily hold the data passed from CImRecvConvert.CImRecvConvert |
|
29 recieves data of size less than or equal to 1K from the socket. |
|
30 */ |
|
31 const TInt KPlainBodyTextCacheSizeBytes = 2002; |
|
32 |
|
33 |
|
34 /** |
|
35 Used for handling the asynchronous storage of plainbody text chunks. |
|
36 @internalTechnology |
|
37 @released |
|
38 */ |
|
39 class CMsvPlainBodyTextEntry : public CBase |
|
40 { |
|
41 public: |
|
42 static CMsvPlainBodyTextEntry* NewL(TInt aIs8Bit, CMsvServerEntry& aServerEntry, TUint aCharset, TUint aDefaultCharset); |
|
43 ~CMsvPlainBodyTextEntry(); |
|
44 |
|
45 void AddChunkL(const TDesC8& aLineOfData); |
|
46 void TryCommitL(); |
|
47 |
|
48 private: |
|
49 CMsvPlainBodyTextEntry(); |
|
50 void ConstructL(TInt aIs8Bit, CMsvServerEntry& aServerEntry, TUint aCharset, TUint aDefaultCharset); |
|
51 |
|
52 private: |
|
53 CMsvStore* iStore; |
|
54 /** |
|
55 Cache to store incoming chunks. |
|
56 */ |
|
57 HBufC8* iPlainBodyTextCache; |
|
58 /** |
|
59 The store class for handling chunk storage. |
|
60 */ |
|
61 CMsvPlainBodyText* iPlainBodyText; |
|
62 /** |
|
63 Enum to indicate whether data has been committed to store. |
|
64 */ |
|
65 enum TCommitData |
|
66 { |
|
67 ENoData, |
|
68 EUnCommittedData, |
|
69 ECommittedData |
|
70 } iCommittedData; |
|
71 }; |
|
72 |
|
73 #endif//__CMSVPLAINBODYTEXTENTRY_H__ |