sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Name : ttimer.h
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __TESTTIMER_H__
|
sl@0
|
23 |
#define __TESTTIMER_H__
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <test/testexecutestepbase.h>
|
sl@0
|
26 |
#include <errno.h>
|
sl@0
|
27 |
#include <unistd.h>
|
sl@0
|
28 |
#include <fcntl.h>
|
sl@0
|
29 |
#include <string.h>
|
sl@0
|
30 |
#include <stdlib.h>
|
sl@0
|
31 |
#include <errno.h>
|
sl@0
|
32 |
#include <stdio.h>
|
sl@0
|
33 |
#include <signal.h>
|
sl@0
|
34 |
#include <spawn.h>
|
sl@0
|
35 |
#include <time.h>
|
sl@0
|
36 |
#include <sys/types.h>
|
sl@0
|
37 |
#include <pthread.h>
|
sl@0
|
38 |
#include <sys/wait.h>
|
sl@0
|
39 |
#include <sys/stat.h>
|
sl@0
|
40 |
#include <sys/mman.h>
|
sl@0
|
41 |
|
sl@0
|
42 |
|
sl@0
|
43 |
_LIT(KTesttimerapi1, "Testtimerapi1");
|
sl@0
|
44 |
_LIT(KTesttimerapi2, "Testtimerapi2");
|
sl@0
|
45 |
_LIT(KTesttimerapi3, "Testtimerapi3");
|
sl@0
|
46 |
_LIT(KTesttimerapi4, "Testtimerapi4");
|
sl@0
|
47 |
_LIT(KTesttimerapi5, "Testtimerapi5");
|
sl@0
|
48 |
_LIT(KTesttimerapi6, "Testtimerapi6");
|
sl@0
|
49 |
_LIT(KTesttimerapi7, "Testtimerapi7");
|
sl@0
|
50 |
_LIT(KTesttimerapi8, "Testtimerapi8");
|
sl@0
|
51 |
_LIT(KTesttimerapi9, "Testtimerapi9");
|
sl@0
|
52 |
_LIT(KTesttimerapi10, "Testtimerapi10");
|
sl@0
|
53 |
_LIT(KTesttimerapi11, "Testtimerapi11");
|
sl@0
|
54 |
_LIT(KTesttimerapi12, "Testtimerapi12");
|
sl@0
|
55 |
_LIT(KTesttimerapi13, "Testtimerapi13");
|
sl@0
|
56 |
_LIT(KTesttimerapi14, "Testtimerapi14");
|
sl@0
|
57 |
_LIT(KTesttimerapi15, "Testtimerapi15");
|
sl@0
|
58 |
_LIT(KTesttimerapi16, "Testtimerapi16");
|
sl@0
|
59 |
_LIT(KTesttimerapi17, "Testtimerapi17");
|
sl@0
|
60 |
_LIT(KTesttimerapi18, "Testtimerapi18");
|
sl@0
|
61 |
_LIT(KTesttimerapi19, "Testtimerapi19");
|
sl@0
|
62 |
_LIT(KTesttimerapi20, "Testtimerapi20");
|
sl@0
|
63 |
_LIT(KTesttimerapi21, "Testtimerapi21");
|
sl@0
|
64 |
_LIT(KTesttimerapi22, "Testtimerapi22");
|
sl@0
|
65 |
_LIT(KTesttimerapi23, "Testtimerapi23");
|
sl@0
|
66 |
_LIT(KTesttimerapi24, "Testtimerapi24");
|
sl@0
|
67 |
_LIT(KTesttimerapi25, "Testtimerapi25");
|
sl@0
|
68 |
_LIT(KTesttimerapi26, "Testtimerapi26");
|
sl@0
|
69 |
_LIT(KTesttimerapi27, "Testtimerapi27");
|
sl@0
|
70 |
_LIT(KTesttimerapi28, "Testtimerapi28");
|
sl@0
|
71 |
|
sl@0
|
72 |
enum TMode
|
sl@0
|
73 |
{
|
sl@0
|
74 |
TREAD = 0x00,
|
sl@0
|
75 |
TWRITE
|
sl@0
|
76 |
};
|
sl@0
|
77 |
|
sl@0
|
78 |
class CTesttimer : public CTestStep
|
sl@0
|
79 |
{
|
sl@0
|
80 |
public:
|
sl@0
|
81 |
~CTesttimer();
|
sl@0
|
82 |
CTesttimer(const TDesC& aStepName);
|
sl@0
|
83 |
TVerdict doTestStepL();
|
sl@0
|
84 |
TVerdict doTestStepPreambleL();
|
sl@0
|
85 |
TVerdict doTestStepPostambleL();
|
sl@0
|
86 |
protected: // Functions from base classes
|
sl@0
|
87 |
|
sl@0
|
88 |
static void* ThreadEntryFunctionW(void* arg);
|
sl@0
|
89 |
static void* ThreadEntryFunctionR(void* arg);
|
sl@0
|
90 |
static void* ThreadEntryFunctionWrite(void* arg);
|
sl@0
|
91 |
private:
|
sl@0
|
92 |
|
sl@0
|
93 |
/**
|
sl@0
|
94 |
* Fifo create with a pathname > FILENAMEMAX
|
sl@0
|
95 |
* @since MRT 2.0
|
sl@0
|
96 |
* @param aItem Script line containing parameters.
|
sl@0
|
97 |
* @return Symbian OS error code.
|
sl@0
|
98 |
*/
|
sl@0
|
99 |
virtual TInt Testtimerapi1 ( );
|
sl@0
|
100 |
virtual TInt Testtimerapi2 ( );
|
sl@0
|
101 |
virtual TInt Testtimerapi3 ( );
|
sl@0
|
102 |
virtual TInt Testtimerapi4 ( );
|
sl@0
|
103 |
virtual TInt Testtimerapi5 ( );
|
sl@0
|
104 |
virtual TInt Testtimerapi6 ( );
|
sl@0
|
105 |
virtual TInt Testtimerapi7 ( );
|
sl@0
|
106 |
virtual TInt Testtimerapi8 ( );
|
sl@0
|
107 |
virtual TInt Testtimerapi9 ( );
|
sl@0
|
108 |
virtual TInt Testtimerapi10 ( );
|
sl@0
|
109 |
virtual TInt Testtimerapi11 ( );
|
sl@0
|
110 |
virtual TInt Testtimerapi12 ( );
|
sl@0
|
111 |
virtual TInt Testtimerapi13 ( );
|
sl@0
|
112 |
virtual TInt Testtimerapi14 ( );
|
sl@0
|
113 |
virtual TInt Testtimerapi15 ( );
|
sl@0
|
114 |
virtual TInt Testtimerapi16 ( );
|
sl@0
|
115 |
virtual TInt Testtimerapi17 ( );
|
sl@0
|
116 |
virtual TInt Testtimerapi18 ( );
|
sl@0
|
117 |
virtual TInt Testtimerapi19 ( );
|
sl@0
|
118 |
virtual TInt Testtimerapi20 ( );
|
sl@0
|
119 |
virtual TInt Testtimerapi21 ( );
|
sl@0
|
120 |
virtual TInt Testtimerapi22 ( );
|
sl@0
|
121 |
virtual TInt Testtimerapi23 ( );
|
sl@0
|
122 |
virtual TInt Testtimerapi24 ( );
|
sl@0
|
123 |
virtual TInt Testtimerapi25 ( );
|
sl@0
|
124 |
virtual TInt Testtimerapi26 ( );
|
sl@0
|
125 |
virtual TInt Testtimerapi27 ( );
|
sl@0
|
126 |
virtual TInt Testtimerapi28 ( );
|
sl@0
|
127 |
|
sl@0
|
128 |
private: // Data
|
sl@0
|
129 |
TInt iParamCnt;
|
sl@0
|
130 |
TInt iBlocked;
|
sl@0
|
131 |
TInt iThreadId;
|
sl@0
|
132 |
|
sl@0
|
133 |
};
|
sl@0
|
134 |
#endif
|