First public contribution.
1 // Copyright (c) 2008-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef __CINIDATA_H__
23 #define __CINIDATA_H__
27 class CIniData : public CBase
33 * Defines the interface to acess to ini data file
35 * The basic functions, FindVar(), SetValue(), AddValue() and WriteToFileL()
36 * Compulsory to call WriteToFileL() after calling any SetValue() or AddValue()
40 // Constructor, pass in name of ini file to open
41 // Default search path is 'c:\system\data' on target filesystem
42 // ie. 'NewL(_L("c:\\system\\data\\ttools.ini"))' is equivalent
43 // to 'NewL(_L("ttools.ini"))'
44 static CIniData* NewL(const TDesC& aName, char aDelimiter);
47 TBool FindVar(const TDesC& aKeyName, // Key to look for
48 TPtrC& aResult); // Buffer to store value
50 TBool FindVar(const TDesC& aKeyName, // Key to look for
51 TInt& aResult); // Int ref to store result
53 TBool FindVar(const TDesC& aSection, // Section to look under
54 const TDesC& aKeyName, // Key to look for
55 TPtrC& aResult); // Buffer to store result
57 TBool FindVar(const TDesC& aSection, // Section to look under
58 const TDesC& aKeyName, // Key to look for
59 TInt& aResult); // Int ref to store result
62 void ConstructL(const TDesC& aName, char aDelimiter);