1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmapitest/devsoundexthaitest/common/inc/DataWrapperBase.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,70 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#ifndef DATA_WRAPPER_BASE_H
1.24 +#define DATA_WRAPPER_BASE_H
1.25 +
1.26 +// EPOC includes
1.27 +#include <datawrapper.h>
1.28 +#define SECS_TO_MS(x) (x*1000000)
1.29 +
1.30 +_LIT(KConsname, "Test Console");
1.31 +
1.32 +class CDataWrapperBase : public CDataWrapper
1.33 + {
1.34 +public:
1.35 + class TEnumEntryTable
1.36 + {
1.37 + public:
1.38 + const TDesC& iString;
1.39 + TInt iValue;
1.40 + };
1.41 +
1.42 +public:
1.43 + TBool GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult);
1.44 + TBool GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
1.45 + TBool GetRealFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TReal& aResult);
1.46 + TBool GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
1.47 + TBool GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
1.48 + TBool GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult);
1.49 + TBool GetArrayRectFromConfig(const TDesC& aSectName, const TDesC& aKeyName, RPointerArray<HBufC>& aResult);
1.50 + TBool KeyPress();
1.51 + void Timedelay(TInt aTimeoutInSecs);
1.52 + virtual void InitialiseL();
1.53 + inline RFs& FileServer() { return iFs; }
1.54 + inline CConsoleBase* GetConsole() { return(Console::NewL(KConsname,TSize(KConsFullScreen,KConsFullScreen)));}
1.55 + TBool GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult);
1.56 +
1.57 +protected:
1.58 + CDataWrapperBase();
1.59 + virtual ~CDataWrapperBase();
1.60 +
1.61 +private:
1.62 + TBool GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
1.63 + TBool KeyCheck();
1.64 +
1.65 +private:
1.66 + // Included ini files
1.67 + RPointerArray<CIniData> iInclude;
1.68 + RPointerArray<HBufC> iBuffer;
1.69 + RFs iFs;
1.70 + RTimer iTimer;
1.71 + };
1.72 +
1.73 +#endif // DATA_WRAPPER_BASE_H