24
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef _TE_ETELISVBASE_H_
|
|
22 |
#define _TE_ETELISVBASE_H_
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <es_sock.h>
|
|
26 |
#include <f32file.h>
|
|
27 |
#include <sacls.h>
|
|
28 |
#include "e32test.h"
|
|
29 |
#include "c32comm.h"
|
|
30 |
#include <simtsy.h>
|
|
31 |
#include <etel3rdparty.h>
|
|
32 |
#include <testconfigfileparser.h>
|
|
33 |
#include <test/testexecuteserverbase.h>
|
|
34 |
|
|
35 |
/**
|
|
36 |
This class provides a dummy request so that
|
|
37 |
the main thread in the Stress Test does not hang
|
|
38 |
waiting for the requests by the internal AOs in
|
|
39 |
CTelephonyFunctions to be dealt with.
|
|
40 |
*/
|
|
41 |
class CMyAsyncOneShot : public CAsyncOneShot
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
static CMyAsyncOneShot* NewL();
|
|
45 |
~CMyAsyncOneShot();
|
|
46 |
|
|
47 |
void StartOneShot();
|
|
48 |
|
|
49 |
protected:
|
|
50 |
void DoCancel();
|
|
51 |
void RunL();
|
|
52 |
|
|
53 |
private:
|
|
54 |
CMyAsyncOneShot();
|
|
55 |
void ConstructL();
|
|
56 |
/**
|
|
57 |
Timer to provide a dummy asynchronous call for this class.
|
|
58 |
Not used to actually do anything else.
|
|
59 |
*/
|
|
60 |
RTimer iTimer;
|
|
61 |
};
|
|
62 |
|
|
63 |
class CEtelIsvTestStep : public CTestStep
|
|
64 |
{
|
|
65 |
public:
|
|
66 |
~CEtelIsvTestStep();
|
|
67 |
CEtelIsvTestStep();
|
|
68 |
virtual TVerdict doTestStepPreambleL( void );
|
|
69 |
virtual TVerdict doTestStepPostambleL( void );
|
|
70 |
void PrintIndicatorValues(TInt aIndicator, TInt aIndicatorCaps);
|
|
71 |
void PrintBatteryInfo(CTelephony::TBatteryInfoV1& aBatteryInfo);
|
|
72 |
void PrintLockInfo(CTelephony::TIccLock aLock, TInt aLockStatus, TInt aLockSetting);
|
|
73 |
void PrintNetworkRegStatus(TInt aNetworkRegStatus);
|
|
74 |
void PrintNetworkInfo(TInt aNetworkMode, TInt aNetworkAccess, TInt aNetworkStatus, TInt aNetworkBandInfo);
|
|
75 |
void SetTestNumber(TInt aTestNumber);
|
|
76 |
void SignalSimTsyToReduceTimersL();
|
|
77 |
|
|
78 |
CTelephony* iTelephony;
|
|
79 |
RProperty iTestNumberProperty;
|
|
80 |
CActiveScheduler* iScheduler;
|
|
81 |
CMyAsyncOneShot* iMyAsyncOneShot;
|
|
82 |
|
|
83 |
// Some of the tests support "Buffer Mode". Default setting is EFalse.
|
|
84 |
// In "Buffer Mode" the buffer package (TPckgBuff) is passed in to API method
|
|
85 |
// as a descriptor reference, otherwise the raw packge (TPckg) is used.
|
|
86 |
// This is to verify if ETel3rdParty suppports buffer packages (DEF091177).
|
|
87 |
TBool iBufferMode;
|
|
88 |
|
|
89 |
private:
|
|
90 |
};
|
|
91 |
|
|
92 |
class CTestCanceller : public CAsyncOneShot
|
|
93 |
{
|
|
94 |
public:
|
|
95 |
CTestCanceller(CActive*);
|
|
96 |
~CTestCanceller();
|
|
97 |
private:
|
|
98 |
void RunL();
|
|
99 |
private:
|
|
100 |
CActive* iRetrieve;// not owned by this
|
|
101 |
};
|
|
102 |
|
|
103 |
class CEtelIsvActBase : public CActive
|
|
104 |
{
|
|
105 |
public:
|
|
106 |
CEtelIsvActBase(CEtelIsvTestStep* aTestStep, CTelephony* aTelephony);
|
|
107 |
inline CTestCanceller* RetrieveCanceller() {return iCanceller;};
|
|
108 |
virtual void CallMe(TInt& aCallCount);
|
|
109 |
protected:
|
|
110 |
CTestCanceller* iCanceller;
|
|
111 |
CTelephony* iTelephony;
|
|
112 |
CEtelIsvTestStep* iTestStep;
|
|
113 |
TRequestStatus iExpStat;
|
|
114 |
};
|
|
115 |
|
|
116 |
class MActionParent
|
|
117 |
{
|
|
118 |
public:
|
|
119 |
|
|
120 |
enum TActionEvent
|
|
121 |
{
|
|
122 |
EDialNewCall,
|
|
123 |
EHangup,
|
|
124 |
EAnswerIncomingCall
|
|
125 |
};
|
|
126 |
|
|
127 |
virtual void ActionParent(const TRequestStatus aCallStatus, const TActionEvent aEvent) = 0;
|
|
128 |
};
|
|
129 |
|
|
130 |
#endif // _TE_ETELISVBASE_H_
|