equal
deleted
inserted
replaced
|
1 // Copyright (c) 2006-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 __CIMAPHEADERFIELDSPARSER_H__ |
|
17 #define __CIMAPHEADERFIELDSPARSER_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 class CImapHeaderFields; |
|
22 |
|
23 /** |
|
24 @internalTechnology |
|
25 @prototype |
|
26 */ |
|
27 NONSHARABLE_CLASS(CImapHeaderFieldsParser) : public CBase |
|
28 { |
|
29 public: |
|
30 virtual ~CImapHeaderFieldsParser(); |
|
31 |
|
32 TBool ProcessBlockL(const TDesC8& aData); |
|
33 TPtrC8 UnparsedData(); |
|
34 |
|
35 protected: |
|
36 CImapHeaderFieldsParser(TInt aLogId); |
|
37 void Construct(CImapHeaderFields* aHeaderFields); |
|
38 |
|
39 private: |
|
40 void ParseHeaderFieldsBlockL(const TDesC8& aData); |
|
41 void ParseFieldsL(); |
|
42 void ParsePartsL(RArray<TPtrC8>& aParts, TInt& aLength); |
|
43 virtual void HeaderFieldsComplete(CImapHeaderFields* aHeaderFields) = 0; |
|
44 |
|
45 private: |
|
46 enum TState |
|
47 { |
|
48 EWaitLine, |
|
49 EWaitLiteral, |
|
50 EParseComplete |
|
51 } iState; |
|
52 |
|
53 CImapHeaderFields* iHeaderFields; |
|
54 TBool iHeaderFieldsOwned; |
|
55 |
|
56 TPtrC8 iData; |
|
57 TInt iLogId; |
|
58 }; |
|
59 |
|
60 #endif // __CIMAPHEADERFIELDSPARSER_H__ |