common/tools/ats/smoketest/email/testutils/inc/T_UtilsReadEmailSettingsFromConfigFile.h
changeset 719 d5603c08781b
child 872 17498133d9ad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/ats/smoketest/email/testutils/inc/T_UtilsReadEmailSettingsFromConfigFile.h	Fri Oct 30 09:36:23 2009 +0000
@@ -0,0 +1,87 @@
+/**
+* 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__