analyzetool/dynamicmemoryhook/src/analyzetooleventhandler.cpp
branchRCL_3
changeset 59 8ad140f3dd41
parent 49 7fdc9a71d314
--- a/analyzetool/dynamicmemoryhook/src/analyzetooleventhandler.cpp	Wed Sep 15 13:53:27 2010 +0300
+++ b/analyzetool/dynamicmemoryhook/src/analyzetooleventhandler.cpp	Wed Oct 13 16:17:58 2010 +0300
@@ -68,13 +68,15 @@
                         iLibraryInfo.iRunAddress,
                         iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
                 }
-            else if( iLogOption == EATLogToFile )
-            	{
-				iLogFile.ATFileLogDllLoaded( iLibraryInfo.iLibraryName, 
-						iLibraryInfo.iRunAddress,
-						iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
-            	}
-            
+            else
+                {
+                LOGSTR1( "ATMH CLibraryEventHandler::RunL() - iStorageServer.LogDllLoaded() " );
+                error = iStorageServer.LogDllLoaded( 
+                        iLibraryInfo.iLibraryName, 
+                        iLibraryInfo.iRunAddress,
+                        iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
+                LOGSTR2( "ATMH StorageServer error: %i",  error );
+                }
             if ( KErrNone == error )
                 {
                 iCodeblocks.Append( TCodeblock( iLibraryInfo.iRunAddress, 
@@ -104,12 +106,23 @@
                             iLibraryInfo.iRunAddress, 
                             iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
                     }
-                else if( iLogOption == EATLogToFile )
-					{
-					iLogFile.ATFileLogDllUnloaded( iLibraryInfo.iLibraryName, 
-							iLibraryInfo.iRunAddress,
-							iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
-					}
+                else
+                    {
+                    LOGSTR1( "ATMH CLibraryEventHandler::RunL() - iStorageServer.LogDllUnloaded() " );
+                    #ifdef LOGGING_ENABLED
+                    TInt error = iStorageServer.LogDllUnloaded( 
+                            libraryName/*iLibraryInfo.iLibraryName*/, 
+                            iLibraryInfo.iRunAddress, 
+                            iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
+    
+                    LOGSTR2( "ATMH StorageServer error: %i",  error );
+                    #else
+                    iStorageServer.LogDllUnloaded( 
+                                                libraryName/*iLibraryInfo.iLibraryName*/, 
+                                                iLibraryInfo.iRunAddress, 
+                                                iLibraryInfo.iRunAddress + iLibraryInfo.iSize );
+                    #endif
+                    }
                 iCodeblocks.Remove( i );
                 break;
                 }
@@ -185,20 +198,19 @@
 // -----------------------------------------------------------------------------
 //
 CLibraryEventHandler::CLibraryEventHandler( RAnalyzeTool& aAnalyzeTool, 
-	RArray<TCodeblock>& aCodeblocks,
+	RArray<TCodeblock>& aCodeblocks, RATStorageServer& aStorageServer, 
 	TUint aProcessId, RMutex& aMutex, 
 	MAnalyzeToolEventhandlerNotifier& aNotifier,
-	TUint32 aLogOption,
-	RATFileLog& aFileLog ) 
+	TUint32 aLogOption ) 
  :	CActive( EPriorityNormal ),
     iAnalyzeTool( aAnalyzeTool ),
     iCodeblocks( aCodeblocks ),
+    iStorageServer( aStorageServer ),
     iProcessId( aProcessId ),
     iMutex( aMutex ),
     iStarted( EFalse ),
     iNotifier( aNotifier ),
-    iLogOption( aLogOption ),
-    iLogFile( aFileLog )
+    iLogOption( aLogOption )
     {
     LOGSTR1( "ATMH CLibraryEventHandler::CLibraryEventHandler()" );
     }