Update contrib.
1 // Copyright (c) 2007-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 #include <iniparser.h>
23 #include "t_inidata.h"
24 #include "t_wservconsts.h"
26 EXPORT_C HBufC* CTIniData::ReadStrL(const TPtrC& aIniParam, const TDesC& aConfigFile)
28 CIniData * iniData = CIniData::NewL(aConfigFile);
29 CleanupStack::PushL(iniData);
32 User::LeaveIfError(iniData->FindVar(KDefaultSectionName, aIniParam, value));
33 HBufC* ret = value.Alloc();
35 CleanupStack::PopAndDestroy(iniData);
39 EXPORT_C TInt CTIniData::ReadIntL(const TPtrC& aIniParam, const TDesC& aConfigFile)
41 CIniData * iniData = CIniData::NewL(aConfigFile);
42 CleanupStack::PushL(iniData);
45 User::LeaveIfError(iniData->FindVar(KDefaultSectionName, aIniParam, ret));
46 CleanupStack::PopAndDestroy(iniData);