telephonyutils/etel3rdpartyapi/Test/te_etelisvcaps/src/phonefunctsteps.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2006-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 // Implmentation of all test objects required to verify capability check on 
       
    15 // ETel3rdParty phone functionality part.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file 
       
    21  @internalTechnology
       
    22 */
       
    23 
       
    24 #include "phonefunctsteps.h"
       
    25 
       
    26 _LIT(KDtmfString,"45p6789A");
       
    27 
       
    28 //
       
    29 CGetPhoneIdTestStep::CGetPhoneIdTestStep()
       
    30 	:iPhoneIdPckg(iPhoneId)
       
    31    {
       
    32 	_LIT16(manufacturerid, "PSION");
       
    33 	_LIT16(modelid, "666");
       
    34 	_LIT16(serialid, "1234567890");
       
    35 	iPhoneId.iManufacturer=manufacturerid;
       
    36 	iPhoneId.iModel=modelid;
       
    37 	iPhoneId.iSerialNumber=serialid;
       
    38    }
       
    39 
       
    40 TInt CGetPhoneIdTestStep::IssueRequestL(TRequestStatus& aStatus)
       
    41 	{
       
    42 	iTelephony->GetPhoneId(aStatus,iPhoneIdPckg);
       
    43 	return KErrNone;
       
    44 	}
       
    45 	
       
    46 TInt CGetPhoneIdTestStep::CancelRequestL()
       
    47 	{
       
    48 	iTelephony->CancelAsync(CTelephony::EGetPhoneIdCancel);
       
    49 	return KErrNone;
       
    50 	}
       
    51 	
       
    52 //
       
    53 
       
    54 CGetSubscriberIdTestStep::CGetSubscriberIdTestStep()
       
    55 	:iSubscriberIdPckg(iSubscriberId)
       
    56 	{
       
    57 	}
       
    58    
       
    59 TInt CGetSubscriberIdTestStep::IssueRequestL(TRequestStatus& aStatus)
       
    60 	{
       
    61 	//Set expected IMSI value
       
    62 	_LIT16(SubscriberId, "56789012345678");
       
    63 	iSubscriberId.iSubscriberId=SubscriberId;
       
    64 	
       
    65 	iTelephony->GetSubscriberId(aStatus, iSubscriberIdPckg);	
       
    66 	return KErrNone;
       
    67 	}
       
    68 
       
    69 TInt CGetSubscriberIdTestStep::CancelRequestL()
       
    70 	{
       
    71 	iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel);
       
    72 	return KErrNone;
       
    73 	}
       
    74 
       
    75 //
       
    76 
       
    77 CGetFlightModeTestStep::CGetFlightModeTestStep()
       
    78 	:iFlightIdPckg(iFlightId)
       
    79 	{
       
    80 	iFlightId.iFlightModeStatus = CTelephony::EFlightModeOn;
       
    81 	}
       
    82    
       
    83 TInt CGetFlightModeTestStep::IssueRequestL(TRequestStatus& aStatus)
       
    84 	{
       
    85 	iTelephony->GetFlightMode(aStatus, iFlightIdPckg);	
       
    86 	return KErrNone;
       
    87 	}
       
    88 
       
    89 TInt CGetFlightModeTestStep::CancelRequestL()
       
    90 	{
       
    91 	iTelephony->CancelAsync(CTelephony::EGetFlightModeCancel);
       
    92 	return KErrNone;
       
    93 	}
       
    94 
       
    95 //
       
    96 
       
    97 CGetIndicatorTestStep::CGetIndicatorTestStep()
       
    98 	:iIndicatorPckg(iIndicator)
       
    99 	{
       
   100 	}
       
   101    
       
   102 TInt CGetIndicatorTestStep::IssueRequestL(TRequestStatus& aStatus)
       
   103 	{
       
   104 	iTelephony->GetIndicator(aStatus, iIndicatorPckg);	
       
   105 	return KErrNone;
       
   106 	}
       
   107 
       
   108 TInt CGetIndicatorTestStep::CancelRequestL()
       
   109 	{
       
   110 	iTelephony->CancelAsync(CTelephony::EGetIndicatorCancel);
       
   111 	return KErrNone;
       
   112 	}
       
   113 
       
   114 //
       
   115 
       
   116 CGetBatteryInfoTestStep::CGetBatteryInfoTestStep()
       
   117 	:iBatteryInfoPckg(iBatteryInfo)
       
   118 	{
       
   119 	}
       
   120    
       
   121 TInt CGetBatteryInfoTestStep::IssueRequestL(TRequestStatus& aStatus)
       
   122 	{
       
   123 	iTelephony->GetBatteryInfo(aStatus, iBatteryInfoPckg);	
       
   124 	return KErrNone;
       
   125 	}
       
   126 
       
   127 TInt CGetBatteryInfoTestStep::CancelRequestL()
       
   128 	{
       
   129 	iTelephony->CancelAsync(CTelephony::EGetBatteryInfoCancel);
       
   130 	return KErrNone;
       
   131 	}
       
   132 
       
   133 //
       
   134 
       
   135 CGetSignalStrengthTestStep::CGetSignalStrengthTestStep()
       
   136 	:iSignalStrengthPckg(iSignalStrength)
       
   137 	{
       
   138 	}
       
   139    
       
   140 TInt CGetSignalStrengthTestStep::IssueRequestL(TRequestStatus& aStatus)
       
   141 	{
       
   142 	iTelephony->GetSignalStrength(aStatus, iSignalStrengthPckg);	
       
   143 	return KErrNone;
       
   144 	}
       
   145 
       
   146 TInt CGetSignalStrengthTestStep::CancelRequestL()
       
   147 	{
       
   148 	iTelephony->CancelAsync(CTelephony::EGetSignalStrengthCancel);
       
   149 	return KErrNone;
       
   150 	}
       
   151 
       
   152 //
       
   153 
       
   154 CGetLockInfoTestStep::CGetLockInfoTestStep()
       
   155 	:iLockInfoPckg(iLockInfo)
       
   156 	{
       
   157 	iLockInfo.iSetting = CTelephony::ELockSetDisabled;
       
   158 	iLockInfo.iStatus = CTelephony::EStatusUnlocked;
       
   159 	iLock = CTelephony::ELockPin1;
       
   160 	}
       
   161    
       
   162 TInt CGetLockInfoTestStep::IssueRequestL(TRequestStatus& aStatus)
       
   163 	{
       
   164 	iTelephony->GetLockInfo(aStatus, iLock,iLockInfoPckg);	
       
   165 	return KErrNone;
       
   166 	}
       
   167 
       
   168 TInt CGetLockInfoTestStep::CancelRequestL()
       
   169 	{
       
   170 	iTelephony->CancelAsync(CTelephony::EGetLockInfoCancel);
       
   171 	return KErrNone;
       
   172 	}
       
   173 
       
   174 //
       
   175 CSendDTMFTonesTestStep::CSendDTMFTonesTestStep()
       
   176 	{
       
   177 	}
       
   178 
       
   179 TInt CSendDTMFTonesTestStep::IssueRequestL(TRequestStatus& aStatus)
       
   180 	{
       
   181 	iTelephony->SendDTMFTones(aStatus, KDtmfString);	
       
   182 	return KErrNone;
       
   183 	}
       
   184 
       
   185 TInt CSendDTMFTonesTestStep::CancelRequestL()
       
   186 	{
       
   187 	iTelephony->CancelAsync(CTelephony::ESendDTMFTonesCancel);
       
   188 	return KErrNone;
       
   189 	}
       
   190 
       
   191 //