telephonyserverplugins/common_tsy/test/component/src/cctsycustomipcfu.cpp
changeset 69 b982c3e940f3
parent 19 1f776524b15c
equal deleted inserted replaced
59:ac20d6a0a19d 69:b982c3e940f3
     1 /*
     1 /*
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   747 
   747 
   748 	TRequestStatus requestStatus;
   748 	TRequestStatus requestStatus;
   749  	//-------------------------------------------------------------------------
   749  	//-------------------------------------------------------------------------
   750 	// Test cancelling of RMmCustomAPI::ActivateSimLock
   750 	// Test cancelling of RMmCustomAPI::ActivateSimLock
   751  	//-------------------------------------------------------------------------
   751  	//-------------------------------------------------------------------------
   752  	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
   752  	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
   753 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EImsi);	
   753 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EImsi);	
   754 	
   754 	
   755 	// data for ExpectL
   755 	// data for ExpectL
   756 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
   756 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
   757 									ltsyData(password, lockNumber);	    
   757 									ltsyData(password, lockNumber);	    
   804 
   804 
   805 	//-------------------------------------------------------------------------
   805 	//-------------------------------------------------------------------------
   806 	// Test A: Test passing wrong parameters to
   806 	// Test A: Test passing wrong parameters to
   807 	// RMmCustomAPI::ActivateSimLock
   807 	// RMmCustomAPI::ActivateSimLock
   808  	//-------------------------------------------------------------------------
   808  	//-------------------------------------------------------------------------
   809 	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
   809 	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
   810 	RMmCustomAPI::TLockNumber lockNumber((RMmCustomAPI::TLockNumber) 0); 	
   810 	RMmCustomAPI::TLockNumber lockNumber((RMmCustomAPI::TLockNumber) 0); 	
   811 	  
   811 	  
   812     customAPI.ActivateSimLock(requestStatus, password, lockNumber);
   812     customAPI.ActivateSimLock(requestStatus, password, lockNumber);
   813 	
   813 	
   814 	User::WaitForRequest(requestStatus);	
   814 	User::WaitForRequest(requestStatus);	
   861 
   861 
   862 	//-------------------------------------------------------------------------
   862 	//-------------------------------------------------------------------------
   863 	// Test A: Test multiple clients requesting RMmCustomAPI::ActivateSimLock
   863 	// Test A: Test multiple clients requesting RMmCustomAPI::ActivateSimLock
   864  	//-------------------------------------------------------------------------	
   864  	//-------------------------------------------------------------------------	
   865 	// data for the first request
   865 	// data for the first request
   866 	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
   866 	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
   867 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid1);	
   867 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid1);	
   868 	
   868 	
   869 	// data for the second request
   869 	// data for the second request
   870 	RMmCustomAPI::TSimLockPassword password2(_L("changeme2"));
   870 	RMmCustomAPI::TSimLockPassword password2(_L("changeme2"));
   871 	RMmCustomAPI::TLockNumber lockNumber2(RMmCustomAPI::EOperator_Gid2);	
   871 	RMmCustomAPI::TLockNumber lockNumber2(RMmCustomAPI::EOperator_Gid2);	
   922 	TRequestStatus requestStatus;
   922 	TRequestStatus requestStatus;
   923 
   923 
   924 	//-------------------------------------------------------------------------
   924 	//-------------------------------------------------------------------------
   925 	// Test A: Test timeout of RMmCustomAPI::ActivateSimLock
   925 	// Test A: Test timeout of RMmCustomAPI::ActivateSimLock
   926  	//-------------------------------------------------------------------------
   926  	//-------------------------------------------------------------------------
   927  	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
   927  	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
   928 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid2);	
   928 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid2);	
   929 	
   929 	
   930 	// data for ExpectL
   930 	// data for ExpectL
   931 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
   931 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
   932 									ltsyData(password, lockNumber);	    
   932 									ltsyData(password, lockNumber);	    
   972 	TRequestStatus requestStatus;	
   972 	TRequestStatus requestStatus;	
   973 	
   973 	
   974  	//-------------------------------------------------------------------------
   974  	//-------------------------------------------------------------------------
   975 	// TEST A: failure to dispatch request to LTSY
   975 	// TEST A: failure to dispatch request to LTSY
   976  	//-------------------------------------------------------------------------
   976  	//-------------------------------------------------------------------------
   977 	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
   977 	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
   978 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator);	
   978 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator);	
   979 	
   979 	
   980 	// data for ExpectL
   980 	// data for ExpectL
   981 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
   981 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
   982 									ltsyData(password, lockNumber);	    
   982 									ltsyData(password, lockNumber);	    
  1111 
  1111 
  1112 	TRequestStatus requestStatus;
  1112 	TRequestStatus requestStatus;
  1113  	//-------------------------------------------------------------------------
  1113  	//-------------------------------------------------------------------------
  1114 	// Test cancelling of RMmCustomAPI::DeActivateSimLock
  1114 	// Test cancelling of RMmCustomAPI::DeActivateSimLock
  1115  	//-------------------------------------------------------------------------
  1115  	//-------------------------------------------------------------------------
  1116  	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
  1116  	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
  1117 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EImsi);	
  1117 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EImsi);	
  1118 	
  1118 	
  1119 	// data for ExpectL
  1119 	// data for ExpectL
  1120 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
  1120 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
  1121 									ltsyData(password, lockNumber);	    
  1121 									ltsyData(password, lockNumber);	    
  1169 
  1169 
  1170 	//-------------------------------------------------------------------------
  1170 	//-------------------------------------------------------------------------
  1171 	// Test A: Test passing wrong version of parameters to
  1171 	// Test A: Test passing wrong version of parameters to
  1172 	// RMmCustomAPI::DeActivateSimLock
  1172 	// RMmCustomAPI::DeActivateSimLock
  1173  	//-------------------------------------------------------------------------
  1173  	//-------------------------------------------------------------------------
  1174 	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
  1174 	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
  1175 	RMmCustomAPI::TLockNumber lockNumber((RMmCustomAPI::TLockNumber) 0); 	
  1175 	RMmCustomAPI::TLockNumber lockNumber((RMmCustomAPI::TLockNumber) 0); 	
  1176 	  
  1176 	  
  1177     customAPI.DeActivateSimLock(requestStatus, password, lockNumber);
  1177     customAPI.DeActivateSimLock(requestStatus, password, lockNumber);
  1178 	
  1178 	
  1179 	User::WaitForRequest(requestStatus);	
  1179 	User::WaitForRequest(requestStatus);	
  1226 
  1226 
  1227 	//-------------------------------------------------------------------------
  1227 	//-------------------------------------------------------------------------
  1228 	// Test A: Test multiple clients requesting RMmCustomAPI::DeActivateSimLock
  1228 	// Test A: Test multiple clients requesting RMmCustomAPI::DeActivateSimLock
  1229  	//-------------------------------------------------------------------------	
  1229  	//-------------------------------------------------------------------------	
  1230 	// data for the first request
  1230 	// data for the first request
  1231 	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
  1231 	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
  1232 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid1);	
  1232 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid1);	
  1233 	
  1233 	
  1234 	// data for the second request
  1234 	// data for the second request
  1235 	RMmCustomAPI::TSimLockPassword password2(_L("changeme2"));
  1235 	RMmCustomAPI::TSimLockPassword password2(_L("changemechangemechangemechang2"));
  1236 	RMmCustomAPI::TLockNumber lockNumber2(RMmCustomAPI::EOperator_Gid2);	
  1236 	RMmCustomAPI::TLockNumber lockNumber2(RMmCustomAPI::EOperator_Gid2);	
  1237 	
  1237 	
  1238 	// data for the first ExpectL
  1238 	// data for the first ExpectL
  1239 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > ltsyData(password, lockNumber);	    
  1239 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > ltsyData(password, lockNumber);	    
  1240     ltsyData.SerialiseL(expectData);       
  1240     ltsyData.SerialiseL(expectData);       
  1287 	TRequestStatus requestStatus;
  1287 	TRequestStatus requestStatus;
  1288 
  1288 
  1289 	//-------------------------------------------------------------------------
  1289 	//-------------------------------------------------------------------------
  1290 	// Test A: Test timeout of RMmCustomAPI::DeActivateSimLock
  1290 	// Test A: Test timeout of RMmCustomAPI::DeActivateSimLock
  1291  	//-------------------------------------------------------------------------
  1291  	//-------------------------------------------------------------------------
  1292  	RMmCustomAPI::TSimLockPassword password(_L("changeme"));
  1292  	RMmCustomAPI::TSimLockPassword password(_L("changemechangemechangemechange"));
  1293 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid2);	
  1293 	RMmCustomAPI::TLockNumber lockNumber(RMmCustomAPI::EOperator_Gid2);	
  1294 	
  1294 	
  1295 	// data for ExpectL
  1295 	// data for ExpectL
  1296 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
  1296 	TMockLtsyData2< RMmCustomAPI::TSimLockPassword, RMmCustomAPI::TLockNumber > 
  1297 									ltsyData(password, lockNumber);	    
  1297 									ltsyData(password, lockNumber);