kerneltest/f32test/plugins/version_2/src/premodifier_plugin.cpp
changeset 36 538db54a451d
parent 0 a41df078684a
equal deleted inserted replaced
34:f497542af8e4 36:538db54a451d
   960 		if(err!=KErrNone)
   960 		if(err!=KErrNone)
   961 			User::Leave(err); //trapped in DoRequestL
   961 			User::Leave(err); //trapped in DoRequestL
   962 
   962 
   963 		//close the second file
   963 		//close the second file
   964 		fileplugin2.Close();
   964 		fileplugin2.Close();
   965 		_LOG2(_L("CPreModifierPlugin::FsFileWriteL, RFilePlugin::Close to the second file returned %d"), err);
   965 		_LOG2(_L("CPreModifierPlugin::FsDeleteL, RFilePlugin::Close to the second file returned %d"), err);
   966 		}
   966 		}
   967 	else
   967 	else
   968 		{
   968 		{
   969 		User::Invariant();
   969 		User::Invariant();
   970 		}
   970 		}
  1010 		file.Close();
  1010 		file.Close();
  1011 
  1011 
  1012 		RFilePlugin fileplugin2(aRequest);
  1012 		RFilePlugin fileplugin2(aRequest);
  1013 		//open a second file
  1013 		//open a second file
  1014 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1014 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1015 		_LOG3(_L("RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1015 		_LOG3(_L("CPreModifierPlugin::FsReplaceL, RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1016 		iLastError = err;
  1016 		iLastError = err;
  1017 		iLineNumber = __LINE__;
  1017 		iLineNumber = __LINE__;
  1018 		if(err!=KErrNone)
  1018 		if(err!=KErrNone)
  1019 			User::Leave(err); //trapped in DoRequestL
  1019 			User::Leave(err); //trapped in DoRequestL
  1020 								
  1020 								
  1025 		if(err!=KErrNone)
  1025 		if(err!=KErrNone)
  1026 			User::Leave(err); //trapped in DoRequestL
  1026 			User::Leave(err); //trapped in DoRequestL
  1027 
  1027 
  1028 		//close the second file
  1028 		//close the second file
  1029 		fileplugin2.Close();
  1029 		fileplugin2.Close();
  1030 		_LOG2(_L("CPreModifierPlugin::FsFileWriteL, RFilePlugin::Close to the second file returned %d"), err);
  1030 		_LOG2(_L("CPreModifierPlugin::FsReplaceL, RFilePlugin::Close to the second file returned %d"), err);
  1031 		}
  1031 		}
  1032 	else
  1032 	else
  1033 		{
  1033 		{
  1034 		User::Invariant();
  1034 		User::Invariant();
  1035 		}
  1035 		}
  1055 		{
  1055 		{
  1056 		_LOG(_L("CPreModifierPlugin::FsRenameL, post intercept"));
  1056 		_LOG(_L("CPreModifierPlugin::FsRenameL, post intercept"));
  1057 		RFilePlugin fileplugin2(aRequest);
  1057 		RFilePlugin fileplugin2(aRequest);
  1058 		//open a second file
  1058 		//open a second file
  1059 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1059 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1060 		_LOG3(_L("RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1060 		_LOG3(_L("CPreModifierPlugin::FsRenameL, RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1061 		iLastError = err;
  1061 		iLastError = err;
  1062 		iLineNumber = __LINE__;
  1062 		iLineNumber = __LINE__;
  1063 		if(err!=KErrNone)
  1063 		if(err!=KErrNone)
  1064 			User::Leave(err); //trapped in DoRequestL
  1064 			User::Leave(err); //trapped in DoRequestL
  1065 								
  1065 								
  1070 		if(err!=KErrNone)
  1070 		if(err!=KErrNone)
  1071 			User::Leave(err); //trapped in DoRequestL		
  1071 			User::Leave(err); //trapped in DoRequestL		
  1072 
  1072 
  1073 		//close the second file
  1073 		//close the second file
  1074 		fileplugin2.Close();
  1074 		fileplugin2.Close();
  1075 		_LOG2(_L("CPreModifierPlugin::FsFileWriteL, RFilePlugin::Close to the second file returned %d"), err);
  1075 		_LOG2(_L("CPreModifierPlugin::FsRenameL, RFilePlugin::Close to the second file returned %d"), err);
  1076 		}
  1076 		}
  1077 	else
  1077 	else
  1078 		{
  1078 		{
  1079 		User::Invariant();
  1079 		User::Invariant();
  1080 		}
  1080 		}
  1097 		{
  1097 		{
  1098 		_LOG(_L("CPreModifierPlugin::FsEntryL, post intercept"));
  1098 		_LOG(_L("CPreModifierPlugin::FsEntryL, post intercept"));
  1099 		RFilePlugin fileplugin2(aRequest);
  1099 		RFilePlugin fileplugin2(aRequest);
  1100 		//open a second file
  1100 		//open a second file
  1101 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1101 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1102 		_LOG3(_L("RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1102 		_LOG3(_L("CPreModifierPlugin::FsEntryL, RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1103 		iLastError = err;
  1103 		iLastError = err;
  1104 		iLineNumber = __LINE__;
  1104 		iLineNumber = __LINE__;
  1105 		if(err!=KErrNone)
  1105 		if(err!=KErrNone)
  1106 			User::Leave(err); //trapped in DoRequestL
  1106 			User::Leave(err); //trapped in DoRequestL
  1107 								
  1107 								
  1112 		if(err!=KErrNone)
  1112 		if(err!=KErrNone)
  1113 			User::Leave(err); //trapped in DoRequestL
  1113 			User::Leave(err); //trapped in DoRequestL
  1114 
  1114 
  1115 		//close the second file
  1115 		//close the second file
  1116 		fileplugin2.Close();
  1116 		fileplugin2.Close();
  1117 		_LOG2(_L("CPreModifierPlugin::FsFileWriteL, RFilePlugin::Close to the second file returned %d"), err);
  1117 		_LOG2(_L("CPreModifierPlugin::FsEntryL, RFilePlugin::Close to the second file returned %d"), err);
  1118 		}
  1118 		}
  1119 	else
  1119 	else
  1120 		{
  1120 		{
  1121 		User::Invariant();
  1121 		User::Invariant();
  1122 		}
  1122 		}
  1134 	testfilename1.Append(iDriveToTest);
  1134 	testfilename1.Append(iDriveToTest);
  1135 	testfilename1.Append(_L(":\\Data\\test.txt"));
  1135 	testfilename1.Append(_L(":\\Data\\test.txt"));
  1136 		    	
  1136 		    	
  1137 	if (aRequest.IsPostOperation())
  1137 	if (aRequest.IsPostOperation())
  1138 		{
  1138 		{
  1139 		_LOG(_L("CPreModifierPlugin::FsRenameL, post intercept"));
  1139 		_LOG(_L("CPreModifierPlugin::FsSetEntryL, post intercept"));
  1140 		RFilePlugin fileplugin2(aRequest);
  1140 		RFilePlugin fileplugin2(aRequest);
  1141 		//open a second file
  1141 		//open a second file
  1142 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1142 		err = fileplugin2.Open(testfilename1, EFileWrite);
  1143 		_LOG3(_L("RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1143 		_LOG3(_L("CPreModifierPlugin::FsSetEntryL, RFilePlugin::Open for %S returned %d"), &testfilename1, err);
  1144 		iLastError = err;
  1144 		iLastError = err;
  1145 		iLineNumber = __LINE__;
  1145 		iLineNumber = __LINE__;
  1146 		if(err!=KErrNone)
  1146 		if(err!=KErrNone)
  1147 			User::Leave(err); //trapped in DoRequestL
  1147 			User::Leave(err); //trapped in DoRequestL
  1148 								
  1148 								
  1153 		if(err!=KErrNone)
  1153 		if(err!=KErrNone)
  1154 			User::Leave(err); //trapped in DoRequestL
  1154 			User::Leave(err); //trapped in DoRequestL
  1155 
  1155 
  1156 		//close the second file
  1156 		//close the second file
  1157 		fileplugin2.Close();
  1157 		fileplugin2.Close();
  1158 		_LOG2(_L("CPreModifierPlugin::FsFileWriteL, RFilePlugin::Close to the second file returned %d"), err);
  1158 		_LOG2(_L("CPreModifierPlugin::FsSetEntryL, RFilePlugin::Close to the second file returned %d"), err);
  1159 		}
  1159 		}
  1160 	else
  1160 	else
  1161 		{
  1161 		{
  1162 		User::Invariant();
  1162 		User::Invariant();
  1163 		}
  1163 		}
  1204 	if(err!=KErrNone)
  1204 	if(err!=KErrNone)
  1205 		User::Leave(err); //trapped in DoRequestL
  1205 		User::Leave(err); //trapped in DoRequestL
  1206 	
  1206 	
  1207 	if (aRequest.IsPostOperation())
  1207 	if (aRequest.IsPostOperation())
  1208 		{
  1208 		{
  1209 		_LOG(_L("CPreModifierPlugin::FsDirReadL, post intercept"));
  1209 		_LOG(_L("CPreModifierPlugin::FsDirReadOneL, post intercept"));
  1210 		}
  1210 		}
  1211 	else
  1211 	else
  1212 		{
  1212 		{
  1213 		User::Invariant();
  1213 		User::Invariant();
  1214 		}
  1214 		}