equal
deleted
inserted
replaced
|
1 // Copyright (c) 2002-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 // Declares the class CIniFile for accessing ini file. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifndef INIFILE_H |
|
23 #define INIFILE_H |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 const TInt KTokenSize=32; |
|
28 |
|
29 NONSHARABLE_CLASS(CIniFile) : public CBase |
|
30 { |
|
31 public: |
|
32 enum TIniPanic |
|
33 { |
|
34 ESectionNameTooBig, |
|
35 EVarNameTooBig |
|
36 }; |
|
37 |
|
38 public: |
|
39 static IMPORT_C CIniFile* NewL(const TDesC& aName, const TDesC& aPath); |
|
40 virtual IMPORT_C ~CIniFile(); |
|
41 IMPORT_C TBool FindVar(const TDesC &aSection, const TDesC &aVarName, TPtrC &aResult); |
|
42 |
|
43 protected: |
|
44 void Panic(TIniPanic aPanic); |
|
45 CIniFile(); |
|
46 void ConstructL(const TDesC& aName, const TDesC& aPath); |
|
47 |
|
48 protected: // owned |
|
49 HBufC* iName; // full name of ini file |
|
50 HBufC* iToken; |
|
51 TPtr iPtr; |
|
52 }; |
|
53 |
|
54 #endif // INIFILE_H |