loadgen/ui/hb/src/engine.cpp
changeset 48 da3ec8478e66
parent 35 98924d2efce9
equal deleted inserted replaced
47:11fa016241a4 48:da3ec8478e66
    22 #include "settingsview.h"
    22 #include "settingsview.h"
    23 #include "loadgen_utils.h"
    23 #include "loadgen_utils.h"
    24 #include "loadgen_cpuload.h"
    24 #include "loadgen_cpuload.h"
    25 #include "loadgen_memoryeat.h"
    25 #include "loadgen_memoryeat.h"
    26 #include "loadgen_phonecall.h"
    26 #include "loadgen_phonecall.h"
    27 //#include "loadgen_netconn.h"
    27 #include "loadgen_netconn.h"
    28 #include "loadgen_keypress.h"
    28 #include "loadgen_keypress.h"
    29 #include "loadgen_pointerevent.h"
    29 #include "loadgen_pointerevent.h"
    30 #include "loadgen_messages.h"
    30 #include "loadgen_messages.h"
    31 #include "loadgen_applications.h"
    31 #include "loadgen_applications.h"
    32 #include "loadgen_photocapture.h"
    32 #include "loadgen_photocapture.h"
   528         case ELoadGenCmdNewLoadPhoneCall:
   528         case ELoadGenCmdNewLoadPhoneCall:
   529             {
   529             {
   530             item = CPhoneCall::NewL(iPhoneCallAttributes, iReferenceNumber);
   530             item = CPhoneCall::NewL(iPhoneCallAttributes, iReferenceNumber);
   531             break;
   531             break;
   532             }
   532             }
   533 /*        case ELoadGenCmdNewLoadNetConn:
   533         case ELoadGenCmdNewLoadNetConn:
   534             {
   534             {
   535             item = CNetConn::NewL(iNetConnAttributes, iReferenceNumber);
   535             item = CNetConn::NewL(iNetConnAttributes, iReferenceNumber);
   536             break;
   536             break;
   537             }
   537             }
   538 */            
   538             
   539         case ELoadGenCmdNewLoadKeyPress:
   539         case ELoadGenCmdNewLoadKeyPress:
   540             {
   540             {
   541             item = CKeyPress::NewL(iKeyPressAttributes, iReferenceNumber);
   541             item = CKeyPress::NewL(iKeyPressAttributes, iReferenceNumber);
   542             break;
   542             break;
   543             }        
   543             }        
   944 		}
   944 		}
   945 	}
   945 	}
   946 
   946 
   947 // --------------------------------------------------------------------------------------------
   947 // --------------------------------------------------------------------------------------------
   948 
   948 
   949 void CEngine::ChangeCPULoadAttributes(TCPULoadAttributes aAttributes) 
   949 void CEngine::ChangeCPULoadAttributes(const TCPULoadAttributes& aAttributes) 
   950 	{ 
   950 	{ 
   951 	if (iEditExistingLoad == EFalse) 
   951 	if (iEditExistingLoad == EFalse) 
   952 		{
   952 		{
   953 		iCpuLoadAttributes = aAttributes; 
   953 		iCpuLoadAttributes = aAttributes; 
   954 		}
   954 		}
   974 		}
   974 		}
   975 	}
   975 	}
   976 
   976 
   977 // --------------------------------------------------------------------------------------------
   977 // --------------------------------------------------------------------------------------------
   978 
   978 
   979 void CEngine::ChangeMemoryEatAttributes(TMemoryEatAttributes aAttributes) 
   979 void CEngine::ChangeMemoryEatAttributes(const TMemoryEatAttributes& aAttributes) 
   980 	{ 
   980 	{ 
   981 	if (iEditExistingLoad == EFalse) 
   981 	if (iEditExistingLoad == EFalse) 
   982 		{
   982 		{
   983 		iMemoryEatAttributes = aAttributes; 
   983 		iMemoryEatAttributes = aAttributes; 
   984 		}
   984 		}
  1004 		}
  1004 		}
  1005 	}
  1005 	}
  1006 
  1006 
  1007 // --------------------------------------------------------------------------------------------	
  1007 // --------------------------------------------------------------------------------------------	
  1008 
  1008 
  1009 void CEngine::ChangePhoneCallAttributes(TPhoneCallAttributes aAttributes)
  1009 void CEngine::ChangePhoneCallAttributes(const TPhoneCallAttributes& aAttributes)
  1010 	{
  1010 	{
  1011 	if (iEditExistingLoad == EFalse) 
  1011 	if (iEditExistingLoad == EFalse) 
  1012 		{
  1012 		{
  1013 		iPhoneCallAttributes = aAttributes; 
  1013 		iPhoneCallAttributes = aAttributes; 
  1014 		}
  1014 		}
  1021 	
  1021 	
  1022 // --------------------------------------------------------------------------------------------	
  1022 // --------------------------------------------------------------------------------------------	
  1023 
  1023 
  1024 TNetConnAttributes CEngine::GetNetConnAttributes()
  1024 TNetConnAttributes CEngine::GetNetConnAttributes()
  1025 	{ 
  1025 	{ 
  1026 /*  
  1026   
  1027 	if (iEditExistingLoad == EFalse)
  1027 	if (iEditExistingLoad == EFalse)
  1028 		{	
  1028 		{	
  1029 		return iNetConnAttributes; 
  1029 		return iNetConnAttributes; 
  1030 		}
  1030 		}
  1031 	else 
  1031 	else 
  1032 		{
  1032 		{
  1033 		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
  1033 		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
  1034 		return (static_cast<CNetConn*>(aItem)->Attributes());
  1034 		return (static_cast<CNetConn*>(aItem)->Attributes());
  1035 		}
  1035 		}
  1036 */		
  1036 	
  1037 	}
  1037 	}
  1038 
  1038 
  1039 // --------------------------------------------------------------------------------------------		
  1039 // --------------------------------------------------------------------------------------------		
  1040 	
  1040 	
  1041 void CEngine::ChangeNetConnAttributes(TNetConnAttributes aAttributes)
  1041 void CEngine::ChangeNetConnAttributes(const TNetConnAttributes& aAttributes)
  1042 	{
  1042 	{
  1043 /*    
  1043     
  1044 	if (iEditExistingLoad == EFalse) 
  1044 	if (iEditExistingLoad == EFalse) 
  1045 		{
  1045 		{
  1046 		iNetConnAttributes = aAttributes; 
  1046 		iNetConnAttributes = aAttributes; 
  1047 		}
  1047 		}
  1048 	else 
  1048 	else 
  1049 		{
  1049 		{
  1050 		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
  1050 		CLoadBase* aItem = iLoadItemList->At(iCurrentItemIndex);
  1051 		static_cast<CNetConn*>(aItem)->SetAttributes(aAttributes);
  1051 		static_cast<CNetConn*>(aItem)->SetAttributes(aAttributes);
  1052 		}
  1052 		}
  1053 */			
  1053 			
  1054 	}
  1054 	}
  1055 	
  1055 	
  1056 // --------------------------------------------------------------------------------------------	
  1056 // --------------------------------------------------------------------------------------------	
  1057 
  1057 
  1058 TKeyPressAttributes CEngine::GetKeyPressAttributes()
  1058 TKeyPressAttributes CEngine::GetKeyPressAttributes()
  1069 	}	
  1069 	}	
  1070 
  1070 
  1071 	
  1071 	
  1072 // --------------------------------------------------------------------------------------------		
  1072 // --------------------------------------------------------------------------------------------		
  1073 	
  1073 	
  1074 void CEngine::ChangeKeyPressAttributes(TKeyPressAttributes aAttributes)
  1074 void CEngine::ChangeKeyPressAttributes(const TKeyPressAttributes& aAttributes)
  1075 	{
  1075 	{
  1076 	if (iEditExistingLoad == EFalse) 
  1076 	if (iEditExistingLoad == EFalse) 
  1077 		{
  1077 		{
  1078 		iKeyPressAttributes = aAttributes; 
  1078 		iKeyPressAttributes = aAttributes; 
  1079 		}
  1079 		}
  1099 		}
  1099 		}
  1100 	}	
  1100 	}	
  1101 	
  1101 	
  1102 // --------------------------------------------------------------------------------------------		
  1102 // --------------------------------------------------------------------------------------------		
  1103 	
  1103 	
  1104 void CEngine::ChangeMessageAttributes(TMessageAttributes aAttributes)
  1104 void CEngine::ChangeMessageAttributes(const TMessageAttributes& aAttributes)
  1105 	{
  1105 	{
  1106 	if (iEditExistingLoad == EFalse) 
  1106 	if (iEditExistingLoad == EFalse) 
  1107 		{
  1107 		{
  1108 		iMessageAttributes = aAttributes; 
  1108 		iMessageAttributes = aAttributes; 
  1109 		}
  1109 		}
  1129 		}
  1129 		}
  1130 	}	
  1130 	}	
  1131 
  1131 
  1132 // --------------------------------------------------------------------------------------------		
  1132 // --------------------------------------------------------------------------------------------		
  1133 	
  1133 	
  1134 void CEngine::ChangeApplicationsAttributes(TApplicationsAttributes aAttributes)
  1134 void CEngine::ChangeApplicationsAttributes(const TApplicationsAttributes& aAttributes)
  1135 	{
  1135 	{
  1136 	if (iEditExistingLoad == EFalse) 
  1136 	if (iEditExistingLoad == EFalse) 
  1137 		{
  1137 		{
  1138 		iApplicationsAttributes = aAttributes; 
  1138 		iApplicationsAttributes = aAttributes; 
  1139 		}
  1139 		}
  1159 		}
  1159 		}
  1160 	}	
  1160 	}	
  1161 
  1161 
  1162 // --------------------------------------------------------------------------------------------		
  1162 // --------------------------------------------------------------------------------------------		
  1163 	
  1163 	
  1164 void CEngine::ChangePhotoCaptureAttributes(TPhotoCaptureAttributes aAttributes)
  1164 void CEngine::ChangePhotoCaptureAttributes(const TPhotoCaptureAttributes& aAttributes)
  1165 	{
  1165 	{
  1166 	if (iEditExistingLoad == EFalse) 
  1166 	if (iEditExistingLoad == EFalse) 
  1167 		{
  1167 		{
  1168 		iPhotoCaptureAttributes = aAttributes; 
  1168 		iPhotoCaptureAttributes = aAttributes; 
  1169 		}
  1169 		}
  1190 	}		
  1190 	}		
  1191 
  1191 
  1192 	
  1192 	
  1193 // --------------------------------------------------------------------------------------------		
  1193 // --------------------------------------------------------------------------------------------		
  1194 	
  1194 	
  1195 void CEngine::ChangeBluetoothAttributes(TBluetoothAttributes aAttributes)
  1195 void CEngine::ChangeBluetoothAttributes(const TBluetoothAttributes& aAttributes)
  1196 	{
  1196 	{
  1197 	if (iEditExistingLoad == EFalse) 
  1197 	if (iEditExistingLoad == EFalse) 
  1198 		{
  1198 		{
  1199 		iBluetoothAttributes = aAttributes; 
  1199 		iBluetoothAttributes = aAttributes; 
  1200 		}
  1200 		}
  1220 		}
  1220 		}
  1221 	}
  1221 	}
  1222 
  1222 
  1223 // --------------------------------------------------------------------------------------------		
  1223 // --------------------------------------------------------------------------------------------		
  1224 	
  1224 	
  1225 void CEngine::ChangePointerEventAttributes(TPointerEventAttributes aAttributes)
  1225 void CEngine::ChangePointerEventAttributes(const TPointerEventAttributes& aAttributes)
  1226 	{
  1226 	{
  1227 	if (iEditExistingLoad == EFalse) 
  1227 	if (iEditExistingLoad == EFalse) 
  1228 		{
  1228 		{
  1229 		iPointerEventAttributes = aAttributes; 
  1229 		iPointerEventAttributes = aAttributes; 
  1230 		}
  1230 		}