|
1 // Copyright (c) 1997-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 #if !defined(__CXMLFILE_H__) |
|
17 #define __CXMLFILE_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "dbdef.h" |
|
21 #include "CXMLContentHandler.h" |
|
22 |
|
23 |
|
24 class CXMLDatabase; |
|
25 |
|
26 NONSHARABLE_CLASS(CXMLData) : public CBase |
|
27 /** |
|
28 @internalComponent |
|
29 */ |
|
30 { |
|
31 public: |
|
32 // Constructor, pass in name of XML file to open, relative to RAM root |
|
33 static CXMLData* NewL(RFs& aFs, const TDesC& aName, CXMLDatabase* aXmlDb, |
|
34 TBool aForceXMLProcessing, |
|
35 TBool aAppendMode); |
|
36 virtual ~CXMLData(); |
|
37 TInt GetSetting(const TInt aEntryIndex, const TDesC & aParamName, TPtrC & aParamValue); |
|
38 TInt GetStartingIndex(const TDesC& aTableName); |
|
39 TInt GetLastIndex(const TDesC& aTableName); |
|
40 TInt GetEntryNumberParameters(const TInt aEntryIndex); |
|
41 const TBuf<MAX_BUFFER_LEN>& GetOperation(const TInt aEntryIndex); |
|
42 TInt GetElementRecordID(const TInt aEntryIndex) const; |
|
43 |
|
44 protected: |
|
45 CXMLData(CXMLDatabase*, TBool, TBool); |
|
46 |
|
47 private: |
|
48 TBool ConstructL(RFs& aFs, const TDesC& aName, CXMLDatabase* aXmlDb); |
|
49 |
|
50 private: |
|
51 CXMLDatabase* xmlDb; |
|
52 TBool bForceXMLProcessing; |
|
53 TBool iAppendMode; |
|
54 }; |
|
55 |
|
56 #endif |