|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __BASE_STEP_H__ |
|
21 #define __BASE_STEP_H__ |
|
22 |
|
23 // User includes |
|
24 #include "TestStepV2.h" |
|
25 |
|
26 //Epoc includes |
|
27 #include <f32file.h> |
|
28 #include <e32cmn.h> |
|
29 #include <e32std.h> |
|
30 |
|
31 class CT_F32BaseStep : public CTestStepV2 |
|
32 /** |
|
33 @test |
|
34 @publishedPartner |
|
35 */ |
|
36 { |
|
37 public: |
|
38 ~CT_F32BaseStep(); |
|
39 CT_F32BaseStep(TBool aOpenFiles); |
|
40 TVerdict doTestStepL(); |
|
41 TVerdict doTestStepPreambleL(); |
|
42 TVerdict doTestStepPostambleL(); |
|
43 |
|
44 protected: |
|
45 virtual TInt ThreadFuncL(RFs& aSession)=0; |
|
46 virtual void ThreadPostFuncL(RFs& aSession); |
|
47 virtual TInt ThreadPreFuncL(RFs& aSession); |
|
48 virtual void PrintResults(); |
|
49 |
|
50 private: |
|
51 inline static TInt ThreadFunction(TAny* aPtr); |
|
52 |
|
53 void SetUpL(); |
|
54 TBool SetOwnerType(const TDesC& aName, TOwnerType& aOwnerType); |
|
55 TBool SetThreadPriority(const TDesC& aName, TThreadPriority& aThreadPriority); |
|
56 void SetFilePathArrayL(); |
|
57 void CreateCsvFileL(); |
|
58 TInt AppendDataL(RFile& aFile, TDesC& aString); |
|
59 |
|
60 protected: |
|
61 RArray<RFile> iFileArray; |
|
62 RArray<TFileName> iFilePathArray; |
|
63 TInt iFuncCalls; |
|
64 TInt iNumOfFiles; |
|
65 TInt iDirTreeDepth; |
|
66 TInt iFileSize; |
|
67 TPtrC iDirBaseName; |
|
68 TPtrC iFileBaseName; |
|
69 TPtrC iDirSubName; |
|
70 TInt iBlockSize; |
|
71 TTimeIntervalMicroSeconds iTotalTime; |
|
72 |
|
73 private: |
|
74 TPtrC iCsvFileName; |
|
75 TPtrC iPtr; |
|
76 TPtrC iOperation; |
|
77 TBool iOpenFiles; |
|
78 }; |
|
79 |
|
80 #include "BaseStep.inl" |
|
81 #endif /* __BASE_STEP_H__ */ |