smartinstaller/common/config.h
branchADM
changeset 14 343c622c9f65
equal deleted inserted replaced
13:8ed1157e9487 14:343c622c9f65
       
     1 /*
       
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Functions to read from the config file.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __CONFIG_H__
       
    22 #define __CONFIG_H__
       
    23 
       
    24 #include <e32def.h>
       
    25 #include <f32file.h>
       
    26 
       
    27 #include "globals.h"
       
    28 
       
    29 // Configuration file containing the URL for the server. Stored in private directory.
       
    30 _LIT(KConfigFile, "config.ini");
       
    31 _LIT(KCfgTagUrl, "Url=");
       
    32 
       
    33 enum VersionResult
       
    34 		{
       
    35 		EEqualVersion,
       
    36 		EGreaterFirstVersion,
       
    37 		EGreaterSecondVersion
       
    38 		};
       
    39 
       
    40 TInt ReadConfigFile(RFile& aFile, TDes& aBuffer, RArray< TPtrC >& aLineBuffer );
       
    41 
       
    42 HBufC* ReadConfigFile( RFs& aFs, const TDesC& aFullPath, RArray< TPtrC >& aLineBuffer, TInt& aError );
       
    43 
       
    44 TPtrC GetConfigValue( const TDesC& aTag, const RArray< TPtrC >& aLineBuffer, TInt& aError );
       
    45 
       
    46 TInt CompareVersions(TVersion& version1,TVersion& version2);
       
    47 
       
    48 TBool SetVersion(const TDesC8& aVersionPtr, TVersion& aVer);
       
    49 
       
    50 #endif