author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: |
williamr@4 | 15 |
* |
williamr@4 | 16 |
*/ |
williamr@4 | 17 |
|
williamr@4 | 18 |
|
williamr@4 | 19 |
/** |
williamr@4 | 20 |
@file TEFScriptUtils.h |
williamr@4 | 21 |
*/ |
williamr@4 | 22 |
|
williamr@4 | 23 |
#if !(defined __TEF_SCRIPT_UTILS_H__) |
williamr@4 | 24 |
#define __TEF_SCRIPT_UTILS_H__ |
williamr@4 | 25 |
|
williamr@4 | 26 |
#include <e32base.h> |
williamr@4 | 27 |
#include <f32file.h> |
williamr@4 | 28 |
#include <test/tefexportconst.h> |
williamr@4 | 29 |
|
williamr@4 | 30 |
struct TCommandForCounting |
williamr@4 | 31 |
/** |
williamr@4 | 32 |
@internalComponent |
williamr@4 | 33 |
@test |
williamr@4 | 34 |
*/ |
williamr@4 | 35 |
{ |
williamr@4 | 36 |
TBuf<KMaxTestExecuteNameLength> iCommandName; |
williamr@4 | 37 |
TInt iCommandCount; |
williamr@4 | 38 |
}; |
williamr@4 | 39 |
|
williamr@4 | 40 |
class CScriptPreProcess : public CBase |
williamr@4 | 41 |
/** |
williamr@4 | 42 |
@internalComponent |
williamr@4 | 43 |
@test |
williamr@4 | 44 |
*/ |
williamr@4 | 45 |
{ |
williamr@4 | 46 |
public: |
williamr@4 | 47 |
CScriptPreProcess(const TDesC& aScriptFilePath, TPtrC aCommandList[KTEFCommandCountsStructSize]); |
williamr@4 | 48 |
~CScriptPreProcess(); |
williamr@4 | 49 |
TInt CountNoOfOccurences(); |
williamr@4 | 50 |
inline TInt GetStructSize(){return iStructSize;}; |
williamr@4 | 51 |
void RetrieveValues(TInt& aIndex, TDes& aCommandName, TInt& aCommandCount); |
williamr@4 | 52 |
|
williamr@4 | 53 |
//private: |
williamr@4 | 54 |
void CreateScriptDataFromScriptFileL(); |
williamr@4 | 55 |
TBool GetNextScriptLine(); |
williamr@4 | 56 |
void UpdateCommandCounts(); |
williamr@4 | 57 |
|
williamr@4 | 58 |
private: |
williamr@4 | 59 |
TBuf<KMaxTestExecuteCommandLength> iScriptFilePath; |
williamr@4 | 60 |
TInt iStructSize; |
williamr@4 | 61 |
// Update the array size from TEFExportConst.h whenever the number of commands to count varies |
williamr@4 | 62 |
TCommandForCounting iCommandsAndCounts[KTEFCommandCountsStructSize]; |
williamr@4 | 63 |
HBufC16* iScriptData; |
williamr@4 | 64 |
TLex iScriptLex; |
williamr@4 | 65 |
TPtrC iCurrentScriptLine; |
williamr@4 | 66 |
}; |
williamr@4 | 67 |
|
williamr@4 | 68 |
#endif |