email/testutils/inc/T_UtilsReadEmailSettingsFromConfigFile.h
author Maciej Seroka <maciejs@symbian.org>
Thu, 21 Jan 2010 14:54:07 +0000
branchSymbian3
changeset 3 235c00e46fb7
parent 1 8758140453c0
child 6 c108117318cb
permissions -rw-r--r--
Added Symbian3 smoketests

/**
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Symbian Foundation License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
* This is the header file for CT_MsgUtilsReadEmailSettingsFromConfigFile
* 
*
*/





/**
 @file
*/

 
#ifndef __T_READ_EMAIL_SETTINGS_FROM_CONFIG_FILE_H__
#define __T_READ_EMAIL_SETTINGS_FROM_CONFIG_FILE_H__

_LIT(KNone, "NONE");

// Forward declarations
class CImIAPPreferences;
class CImImap4Settings;
class CImPop3Settings;
class CImSmtpSettings;
class CT_MsgUtilsConfigFileParserUtility;
class TImapAccount;


/**
CT_MsgUtilsReadEmailSettingsFromConfigFile is the utility class used to read the
fields from the configuration/setting file and and update the set the data members of 
CImImap4Settings, CImPop3Settings, CImSmtpSettings and CImIAPPreferences objects.
*/
class CT_MsgUtilsReadEmailSettingsFromConfigFile
	{
public:	
	CT_MsgUtilsReadEmailSettingsFromConfigFile() {};
	
	~CT_MsgUtilsReadEmailSettingsFromConfigFile() {};
	
	IMPORT_C static TBool CompareIapPrefs(CImIAPPreferences& prefs1, CImIAPPreferences& prefs2);
	
	IMPORT_C static void ReadImapSettingsFromConfigurationFileL(TDesC& aSettingsFile,
							CImImap4Settings& aImapSet, CImIAPPreferences& aImapIapPref, const TDesC& aPtrEmailAdd = KNone());
										
	IMPORT_C static void ReadPopSettingsFromConfigurationFileL(TDesC& aSettingsFile,
							CImPop3Settings& aPopSet, CImIAPPreferences& aPopIapPref, const TDesC& aPtrEmailAdd = KNone());
										
	IMPORT_C static void ReadSmtpSettingsFromConfigurationFileL(TDesC& aSettingsFile,
							CImSmtpSettings& aSmtpSet, CImIAPPreferences& aSmtpIapPref,const TDesC& aPtrEmailAdd = KNone());
	
private:
	IMPORT_C static void ReadImapIAPAndAddL(CT_MsgUtilsConfigFileParserUtility* aScriptFileParser,
			const TDesC& aParamListName, CImIAPPreferences& aIapPref);
			
	IMPORT_C static void ReadImapIAPAndAddFieldL(CT_MsgUtilsConfigFileParserUtility* aScriptFileParser, 
			const TDesC& aFieldName, CImIAPPreferences& aIapPref);
	
	IMPORT_C static void ReadPopIAPAndAddL(CT_MsgUtilsConfigFileParserUtility* aScriptFileParser,
			const TDesC& aParamListName, CImIAPPreferences& aIapPref);
			
	IMPORT_C static void ReadPopIAPAndAddFieldL(CT_MsgUtilsConfigFileParserUtility* aScriptFileParser, 
			const TDesC& aFieldName, CImIAPPreferences& aIapPref);
			
	IMPORT_C static void ReadSmtpIAPAndAddL(CT_MsgUtilsConfigFileParserUtility* aScriptFileParser, 
			const TDesC& aParamListName, CImIAPPreferences& aSmtpIapPref);
			
	IMPORT_C static void ReadSmtpIAPAndAddFieldL(CT_MsgUtilsConfigFileParserUtility* aScriptFileParser, 
			const TDesC& aFieldName, CImIAPPreferences& aIapPref);
			
	IMPORT_C static TBool GetString(TDesC& aStringPtr, TInt& aStart, TInt aEnd, TPtrC& aBaseString);
	};
#endif //__T_READ_EMAIL_SETTINGS_FROM_CONFIG_FILE_H__