diff -r 000000000000 -r 3e07fef1e154 testexecfw/useremul/inc/Settings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testexecfw/useremul/inc/Settings.h Mon Mar 08 15:03:44 2010 +0800 @@ -0,0 +1,132 @@ +/*------------------------------------------------------------------ + - + * Software Name : UserEmulator + * Version : v4.2.1309 + * + * Copyright (c) 2009 France Telecom. All rights reserved. + * This software is distributed under the License + * "Eclipse Public License - v 1.0" the text of which is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * France Telecom + * + * Contributors: + *------------------------------------------------------------------ + - + * File Name: Settings.h + * + * Created: 13/08/2009 + * Author(s): Marcell Kiss, Reshma Sandeep Das + * + * Description: + * This class is used for storing the settings information of the application + *------------------------------------------------------------------ + - + * + */ +#ifndef SETTINGS_H +#define SETTINGS_H + +//System Includes +#include // CBase +#include // TBool +#include +#include // CDictionaryStore +#include // CAknSettingItemList + +// User Includes +#include "Constants.h" + +//Forward declarations +class CApaApplication; + +//Constants +#define KPATHLEN 512 + +_LIT(KDefaultPath,"C:\\Data\\TestScripts\\"); +_LIT(KDefaultLogPath,"C:\\Data\\Logs\\UserEmulator\\UserEmulator.csv"); + +typedef TBuf TRandomTestAppID; + +/** + * CSettings + * This class is used for storing the settings information of the application + */ +class CSettings : public CBase +{ +public: + /** + * Constructor + * @param aApp Reference to CApaApplication class + * @param aEikonEnv Reference to CEikonEnv class + */ + CSettings(CApaApplication& aApp, CEikonEnv* aEikonEnv); + + /** + * ConstructL + */ + void ConstructL(); + + /** + * Function to Load the User Emulator settings + */ + void LoadL(); + + /** + * Function to Store the User Emulator settings + */ + void StoreL(); + + /** + * Function to validate the correct drive + * @param aPath Script/Log file path + */ + TInt CheckDrive(const TDesC& aPath); + + /** + * Function to validate the scripts or log file path + * @param aPath Script/Log file path + */ + TBool CheckPathL(const TDesC& aPath); + +public: + /** + * Scripts path + */ + TBuf iScriptsPath; + /** + * Log file path + */ + TBuf iLogPath; + /** + * Log status ON/OFF + */ + TBool iLogStatus; + /** + * Random test Status + * ON : Run random test on the specified App UIDs + * OFF: Run random test on all applications under application Menu + */ + TBool iRandomTestAppIdStatus; + /** + * Application UID + */ + TRandomTestAppID iRandomTestAppID; + + /** + * Main screen size + */ + TRect iAppRect; +private: + /** + * CApaApplication instance + */ + CApaApplication& iApp; + /** + * CEikEnv handle + */ + CEikonEnv* iEEnv; +}; +#endif +