telephonyserverplugins/simtsy/test/Te_SimData/Te_SimData.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 
       
     2 // Copyright (c) 2001-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 "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 // Header file: Basic  tests.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent
       
    22 */
       
    23 
       
    24 #ifndef TE_SimData_H__
       
    25 #define TE_SimData_H__
       
    26 
       
    27 #include "Te_SimDataTestStepBase.h"
       
    28 
       
    29 #define SIM_TSY
       
    30 
       
    31 #define CHECK_POINT(code,expected,msg){\
       
    32 	TInt ret(0);\
       
    33 	ret = (code)==(expected);\
       
    34 	TEST(ret);\
       
    35 	if (ret ) INFO_PRINTF1(msg);\
       
    36 	}
       
    37 
       
    38 class CTestSuite ;
       
    39 const TInt KLocalTel=32;
       
    40 const TInt KRemoteTel=32;
       
    41 
       
    42 
       
    43 /**
       
    44  * Test class that enables tests.
       
    45  * It's a base class for all test steps.
       
    46  */
       
    47 class CTestSimDataStep : public CSimDataTestStepBase
       
    48 	{
       
    49 protected:
       
    50 	//Utils
       
    51 	void GetGoodNumber(TDes& aNum) ;
       
    52 	void WaitWithTimeout(TRequestStatus& aStatus, TInt aNumberOfMicroSeconds) ;
       
    53 	TInt CallMeDear() ;
       
    54 	TInt HangMeUpDear() ;
       
    55 	void Print_RCall_TStatus(RCall::TStatus& aArg) ;
       
    56 	void Print_TCapsEnum(RCall::TCaps& aArg) ;
       
    57 	void TestLineCapabilitiesL() ;
       
    58 	void Print_TMobilePhoneModeCaps(RMobilePhone::TMobilePhoneModeCaps& aArg) ;
       
    59 
       
    60 protected:
       
    61 	TBuf8<KLocalTel> iLocalNumber;		//< Local telephone number
       
    62 	TBuf8<KRemoteTel> iRemoteNumber;	//< Remote telephone number (modem)
       
    63 	TInt iState  ;
       
    64 
       
    65 	TRequestStatus iStatus;				//< Request status used by asynchronous functions
       
    66 	TRequestStatus iStatus2;
       
    67 	TRequestStatus iStatus3;
       
    68 	TRequestStatus iStatus4;
       
    69 	TRequestStatus iStatus5;
       
    70 	TRequestStatus iStatus6;
       
    71 	TRequestStatus iStatus7;
       
    72 
       
    73 
       
    74 	RMobileLine iLine;				  //< Telephone line
       
    75 	RMobileCall iDataCall;			  //< Voice call object
       
    76 	RCall::TCallInfo iCallInfo;
       
    77 	RPhone::TLineInfo iLineInfo;
       
    78 	RPhone::TCaps iPhoneCaps;		  //< Phone capabalities
       
    79 	TInt iLineIndex;
       
    80 	};
       
    81 
       
    82 //------------------------------------------------------------------ 
       
    83 
       
    84 
       
    85 //------------------------------------------------------------------ 
       
    86 
       
    87 /**
       
    88  * This class substitutes function TestLineStatusIncommingCallL() from T_SimData
       
    89  * 
       
    90 */
       
    91 class CTestLineStatusIncommingCall : public CTestSimDataStep
       
    92 	{
       
    93 public:
       
    94 	CTestLineStatusIncommingCall() ;
       
    95 	~CTestLineStatusIncommingCall(){} ;
       
    96 	virtual TVerdict doTestStepL();
       
    97 	
       
    98 	} ;
       
    99 
       
   100 //------------------------------------------------------------------ 
       
   101 
       
   102 /**
       
   103  * This class substitutes function TestLineStatusOutgoingCallL() from T_SimData
       
   104  * 
       
   105 */
       
   106 class CTestLineStatusOutgoingCall : public CTestSimDataStep
       
   107 	{
       
   108 public:
       
   109 	CTestLineStatusOutgoingCall() ;
       
   110 	~CTestLineStatusOutgoingCall(){} ;
       
   111 	virtual TVerdict doTestStepL();
       
   112 	
       
   113 	} ;
       
   114 
       
   115 //------------------------------------------------------------------ 
       
   116 
       
   117 /**
       
   118  * This class substitutes function TestLineInfoL() from T_SimData
       
   119  * 
       
   120 */
       
   121 class CTestLineInfo : public CTestSimDataStep
       
   122 	{
       
   123 public:
       
   124 	CTestLineInfo() ;
       
   125 	~CTestLineInfo(){} ;
       
   126 	virtual TVerdict doTestStepL();
       
   127 	
       
   128 	} ;
       
   129 
       
   130 //------------------------------------------------------------------ 
       
   131 
       
   132 /**
       
   133  * This class substitutes function TestLineNotificationsIncommingCallL() from T_SimData
       
   134  * 
       
   135 */
       
   136 class CTestLineNotificationsIncommingCall : public CTestSimDataStep
       
   137 	{
       
   138 public:
       
   139 	CTestLineNotificationsIncommingCall() ;
       
   140 	~CTestLineNotificationsIncommingCall(){} ;
       
   141 	virtual TVerdict doTestStepL();
       
   142 	
       
   143 	} ;
       
   144 
       
   145 //------------------------------------------------------------------ 
       
   146 
       
   147 /**
       
   148  * This class substitutes function TestLineNotificationsOutgoingCallL() from T_SimData
       
   149  * 
       
   150 */
       
   151 class CTestLineNotificationsOutgoingCall : public CTestSimDataStep
       
   152 	{
       
   153 public:
       
   154 	CTestLineNotificationsOutgoingCall() ;
       
   155 	~CTestLineNotificationsOutgoingCall(){} ;
       
   156 	virtual TVerdict doTestStepL();
       
   157 	
       
   158 	} ;
       
   159 
       
   160 //------------------------------------------------------------------ 
       
   161 
       
   162 /**
       
   163  * This class substitutes function TestLineCancelsL() from T_SimData
       
   164  * 
       
   165 */
       
   166 class CTestLineCancels : public CTestSimDataStep
       
   167 	{
       
   168 public:
       
   169 	CTestLineCancels() ;
       
   170 	~CTestLineCancels(){} ;
       
   171 	virtual TVerdict doTestStepL();
       
   172 	
       
   173 	} ;
       
   174 
       
   175 //------------------------------------------------------------------ 
       
   176 
       
   177 /**
       
   178  * This class substitutes function TestCallInfoL() from T_SimData
       
   179  * 
       
   180 */
       
   181 class CTestCallInfo : public CTestSimDataStep
       
   182 	{
       
   183 public:
       
   184 	CTestCallInfo() ;
       
   185 	~CTestCallInfo(){} ;
       
   186 	virtual TVerdict doTestStepL();
       
   187 	
       
   188 	} ;
       
   189 
       
   190 //------------------------------------------------------------------ 
       
   191 
       
   192 /**
       
   193  * This class substitutes function TestCallNotificationsL() from T_SimData
       
   194  * 
       
   195 */
       
   196 class CTestCallNotifications : public CTestSimDataStep
       
   197 	{
       
   198 public:
       
   199 	CTestCallNotifications() ;
       
   200 	~CTestCallNotifications(){} ;
       
   201 	virtual TVerdict doTestStepL();
       
   202 	
       
   203 	} ;
       
   204 
       
   205 //------------------------------------------------------------------ 
       
   206 
       
   207 /**
       
   208  * This class substitutes function TestCallStatusIncommingCallL() from T_SimData
       
   209  * 
       
   210 */
       
   211 class CTestCallStatusIncommingCall : public CTestSimDataStep
       
   212 	{
       
   213 public:
       
   214 	CTestCallStatusIncommingCall() ;
       
   215 	~CTestCallStatusIncommingCall(){} ;
       
   216 	virtual TVerdict doTestStepL();
       
   217 	
       
   218 	} ;
       
   219 
       
   220 //------------------------------------------------------------------ 
       
   221 
       
   222 /**
       
   223  * This class substitutes function TestCallStatusOutgoingCallL() from T_SimData
       
   224  * 
       
   225 */
       
   226 class CTestCallStatusOutgoingCall : public CTestSimDataStep
       
   227 	{
       
   228 public:
       
   229 	CTestCallStatusOutgoingCall() ;
       
   230 	~CTestCallStatusOutgoingCall(){} ;
       
   231 	virtual TVerdict doTestStepL();
       
   232 	
       
   233 	} ;
       
   234 
       
   235 //------------------------------------------------------------------ 
       
   236 
       
   237 /**
       
   238  * This class substitutes function TestCallCancelsL() from T_SimData
       
   239  * 
       
   240 */
       
   241 class CTestCallCancels : public CTestSimDataStep
       
   242 	{
       
   243 public:
       
   244 	CTestCallCancels() ;
       
   245 	~CTestCallCancels(){} ;
       
   246 	virtual TVerdict doTestStepL();
       
   247 	
       
   248 	} ;
       
   249 
       
   250 
       
   251 class CTestCallDuration : public CTestSimDataStep  
       
   252 {
       
   253 public:
       
   254 	virtual TVerdict doTestStepL();
       
   255 	TVerdict RunTestL(TBool aBRingOut);
       
   256 	CTestCallDuration();
       
   257 	virtual ~CTestCallDuration();
       
   258 
       
   259 private:
       
   260 	TBool RingOrDialL(TBool aBRingOut);
       
   261 };
       
   262 
       
   263 //------------------------------------------------------------------ 
       
   264 
       
   265 class CTestRemoteHangup : public CTestSimDataStep
       
   266 	{
       
   267 public:
       
   268 	CTestRemoteHangup() ;
       
   269 	virtual TVerdict doTestStepL();
       
   270 	} ;
       
   271 
       
   272 #endif// TE_SimData_H__
       
   273