williamr@2
|
1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
// Header file for the Generic File parser
|
williamr@2
|
15 |
//
|
williamr@2
|
16 |
//
|
williamr@2
|
17 |
|
williamr@2
|
18 |
#if !defined (__GFP_H__)
|
williamr@2
|
19 |
#define __GFP_H__
|
williamr@2
|
20 |
|
williamr@2
|
21 |
#include <bsp.h>
|
williamr@2
|
22 |
|
williamr@2
|
23 |
class CMsvGenericFileParser : public CBaseScriptParser2
|
williamr@2
|
24 |
/**
|
williamr@2
|
25 |
@internalComponent
|
williamr@2
|
26 |
@released
|
williamr@2
|
27 |
*/
|
williamr@2
|
28 |
{
|
williamr@2
|
29 |
public:
|
williamr@2
|
30 |
IMPORT_C static CMsvGenericFileParser* NewL(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs);
|
williamr@2
|
31 |
|
williamr@2
|
32 |
~CMsvGenericFileParser();
|
williamr@2
|
33 |
|
williamr@2
|
34 |
void ParseL(TRequestStatus& aStatus, const TDesC& aSms);
|
williamr@2
|
35 |
void ProcessL(TRequestStatus& aStatus);
|
williamr@2
|
36 |
|
williamr@2
|
37 |
private:
|
williamr@2
|
38 |
void DoCancel();
|
williamr@2
|
39 |
void RunL();
|
williamr@2
|
40 |
|
williamr@2
|
41 |
private:
|
williamr@2
|
42 |
enum TParseSession
|
williamr@2
|
43 |
{
|
williamr@2
|
44 |
//EUnfoldMessage, // Don't have to unfold the message, just save it
|
williamr@2
|
45 |
EParseMessage, // Parsing
|
williamr@2
|
46 |
ECompleteMessage // Completing ..
|
williamr@2
|
47 |
};
|
williamr@2
|
48 |
|
williamr@2
|
49 |
CMsvGenericFileParser(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs);
|
williamr@2
|
50 |
void ConstructL();
|
williamr@2
|
51 |
|
williamr@2
|
52 |
void ChangeStateL(TParseSession aState); // Advance state machine to next state
|
williamr@2
|
53 |
void ParseMessageL();
|
williamr@2
|
54 |
void CompleteMessageL();
|
williamr@2
|
55 |
void GetResourceFileL(TFileName& aFileName);
|
williamr@2
|
56 |
|
williamr@2
|
57 |
void RequestComplete(TRequestStatus& aStatus, TInt aError);
|
williamr@2
|
58 |
|
williamr@2
|
59 |
TInt iState; // Current session state
|
williamr@2
|
60 |
TBuf<256> iDescriptionText; // Holds on to the description text.
|
williamr@2
|
61 |
|
williamr@2
|
62 |
TRequestStatus* iReport;
|
williamr@2
|
63 |
TInt iCompleted; // Stores completion code from previous session state
|
williamr@2
|
64 |
TInt32 iBioType;
|
williamr@2
|
65 |
};
|
williamr@2
|
66 |
|
williamr@2
|
67 |
|
williamr@2
|
68 |
#endif // __GFP_H__
|