diff -r 0ff24a8f6ca2 -r 98307c651589 perfsrv/analyzetool/dynamicmemoryhook/src/analyzetoolfilelog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perfsrv/analyzetool/dynamicmemoryhook/src/analyzetoolfilelog.cpp Mon Sep 06 15:00:47 2010 +0300 @@ -0,0 +1,603 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declaration of the class TATDriveInfo. +* +*/ + +#include "analyzetoolfilelog.h" +#include "atdriveinfo.h" +#include "atlog.h" +#include +#include +#include //RFs +#include + +// New file name start and end index. +const TInt KNameIndexStart = 1; +const TInt KNameIndexEnd = 100; + +RATFileLog::RATFileLog() + { + + // Initialize iMicroSecondsAt1970 + TTime time( KJanuaryFirst1970 ); + iMicroSecondsAt1970 = time.Int64(); + iError = KErrNone; + } + +RATFileLog::~RATFileLog() + { + // Auto-generated destructor stub + } + + +// Local time function. +TInt64 RATFileLog::CurrentTime() + { + LOGSTR1( "ATFL void CATStorageServerSession::GetTime()" ); + + // Get the current universal time + TTime time; + time.UniversalTime(); + + // Change the time format that tells the number of microseconds from January First, + // 0 AD nominal Gregorian, into a format that tells the number of microseconds from + // January First, 1970 AD nominal Gregorian. This is a more generic format and + // can be directly exploited by the PC code parsing the data file that this + // server generates. + return ( time.Int64() - iMicroSecondsAt1970 ); + } + +TInt RATFileLog::ATFileLogVersion() +{ + LOGSTR1( "ATFL CATFileLog::ATFileLogVersion()" ); + + iFile << KDataFileVersion; + + iFile.CommitL(); + return KErrNone; +} + +TInt RATFileLog::ATFileLogProcessStarted( const TDesC8& aProcessName, + TUint aProcessId, + TUint32 aIsDebug, + const TDesC8& aAtoolVersion, + const TDesC8& aApiVersion ) +{ + LOGSTR1( "ATFL CATFileLog::ATFileLogProcessStarted()" ); + + // log the current time + iFile << this->CurrentTime(); + + //