|
1 // Copyright (c) 1999-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 // Header file for the Generic File parser |
|
15 // |
|
16 // |
|
17 |
|
18 #if !defined (__GFP_H__) |
|
19 #define __GFP_H__ |
|
20 |
|
21 #include <bsp.h> |
|
22 |
|
23 class CMsvGenericFileParser : public CBaseScriptParser2 |
|
24 /** |
|
25 @internalComponent |
|
26 @released |
|
27 */ |
|
28 { |
|
29 public: |
|
30 IMPORT_C static CMsvGenericFileParser* NewL(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs); |
|
31 |
|
32 ~CMsvGenericFileParser(); |
|
33 |
|
34 void ParseL(TRequestStatus& aStatus, const TDesC& aSms); |
|
35 void ProcessL(TRequestStatus& aStatus); |
|
36 |
|
37 private: |
|
38 void DoCancel(); |
|
39 void RunL(); |
|
40 |
|
41 private: |
|
42 enum TParseSession |
|
43 { |
|
44 //EUnfoldMessage, // Don't have to unfold the message, just save it |
|
45 EParseMessage, // Parsing |
|
46 ECompleteMessage // Completing .. |
|
47 }; |
|
48 |
|
49 CMsvGenericFileParser(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs); |
|
50 void ConstructL(); |
|
51 |
|
52 void ChangeStateL(TParseSession aState); // Advance state machine to next state |
|
53 void ParseMessageL(); |
|
54 void CompleteMessageL(); |
|
55 void GetResourceFileL(TFileName& aFileName); |
|
56 |
|
57 void RequestComplete(TRequestStatus& aStatus, TInt aError); |
|
58 |
|
59 TInt iState; // Current session state |
|
60 TBuf<256> iDescriptionText; // Holds on to the description text. |
|
61 |
|
62 TRequestStatus* iReport; |
|
63 TInt iCompleted; // Stores completion code from previous session state |
|
64 TInt32 iBioType; |
|
65 }; |
|
66 |
|
67 |
|
68 #endif // __GFP_H__ |