secureswitools/swisistools/source/interpretsislib/rommanager.cpp
branchRCL_3
changeset 24 5cc91383ab1e
parent 0 ba25891c3a9e
--- a/secureswitools/swisistools/source/interpretsislib/rommanager.cpp	Thu Jul 15 18:47:04 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/rommanager.cpp	Thu Aug 19 10:02:49 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -29,8 +29,13 @@
 #include "is_utils.h"
 
 // String constants
+#ifndef __TOOLS2_LINUX__
 const std::wstring KRomManagerSysBinPath 			= L"z:\\sys\\bin\\";
 const std::string KRomManagerRomDrive               = "Z:\\";
+#else
+const std::wstring KRomManagerSysBinPath 			= L"z:/sys/bin/";
+const std::string KRomManagerRomDrive               = "Z:/";
+#endif
 const std::string KRomManagerRomLogProcessingFile   = "Processing file ";
 const std::string KRomManagerRomLogReadingResource  = "Reading resource ";
 const std::string KRomManagerRomLogReadingResource2 = " to rom linear address";
@@ -146,7 +151,7 @@
     {
     for( std::list<std::wstring>::const_iterator it = aLogFileNames.begin() ; it != aLogFileNames.end(); it++ )
         {
-    	std::string narrowLogFileName = Ucs2ToUtf8( *it );
+    	std::string narrowLogFileName = wstring2string( *it );
     	std::string narrowUpperCaseLogFileName = StringUtils::ToUpper( narrowLogFileName );
 
         // Get the base name
@@ -188,7 +193,7 @@
 
     // Get filename & convert it to uppercase, since our map key is
     // also in upper case form.
-    std::string narrowFileName = Ucs2ToUtf8( aFileName );
+    std::string narrowFileName = wstring2string( aFileName );
     narrowFileName = StringUtils::ToUpper( narrowFileName );
 
     // Do we have a corresponding entry?
@@ -210,7 +215,7 @@
 
 	for ( ; curr != end ; ++curr)
 		{
-		std::wstring romFile = Utf8ToUcs2(curr->first);
+		std::wstring romFile = string2wstring(curr->first);
 		if (StringUtils::WildcardCompare(searchNameWild,romFile))
 			{
 			aAdornedFileNamesFound.push_back(romFile);
@@ -233,7 +238,7 @@
 				TUint32 romSid = romEntry->SecurityInfo().iSecureId;
 				if (romSid != 0 && romSid == aSid)
 					{
-					aFile = Utf8ToUcs2(romEntry->RomFileName());
+					aFile = string2wstring(romEntry->RomFileName());
 					return true;
 					}
 				}
@@ -248,7 +253,7 @@
 
     // Get filename & convert it to uppercase, since our map key is
     // also in upper case form.
-    std::string narrowFileName = Ucs2ToUtf8( aFileName );
+    std::string narrowFileName = wstring2string( aFileName );
     narrowFileName = StringUtils::ToUpper( narrowFileName );
 
     // Do we have a corresponding entry?
@@ -269,7 +274,7 @@
 
 void RomManagerLogFiles::ReadObyFile( const std::string& aFileName )
     {
-	std::wstring fileName = Utf8ToUcs2( aFileName );
+	std::wstring fileName = string2wstring( aFileName );
     if ( FileExists( fileName ) )
         {
     	std::ifstream stream;
@@ -570,7 +575,7 @@
 	}
     //
     stream << std::endl;
-    std::wstring finalMessage = Utf8ToUcs2( stream.str() );
+    std::wstring finalMessage = string2wstring( stream.str() );
     //
 	LERROR( finalMessage );
     }