mmtestenv/mmtestfw/Source/TestFrameworkServer/LogFile.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __LOGFILE_H__
       
    17 #define __LOGFILE_H__
       
    18 
       
    19 #include <f32file.h>
       
    20 
       
    21 #include <testframework.h>
       
    22 
       
    23 /**
       
    24  *
       
    25  * File logger class for server sessions.
       
    26  * Manages one logfile which is shareable and mutex-safe.
       
    27  *
       
    28  * @xxxx
       
    29  *
       
    30  */
       
    31 class CFileLogger : public CBase
       
    32 {
       
    33 public:
       
    34 	static CFileLogger* NewL();
       
    35 	~CFileLogger();
       
    36 	void CreateLog(const TDesC& aDir, const TDesC& aName);
       
    37 	void OpenLog(const TDesC& aDir, const TDesC& aName);
       
    38 	void CloseLog();
       
    39 	void WriteLog(const TDesC& aMsg);
       
    40 	TInt Connect();
       
    41 	void Close();
       
    42 
       
    43 private:
       
    44 	TBuf<KMaxLogFilenameLength> iLogName;
       
    45 	RFile iLogfile;
       
    46 	RFs	  iFs;
       
    47 	TBool iEnabled;
       
    48 	TBool iFsOpen;	// connected to File system if true
       
    49 };
       
    50 
       
    51 
       
    52 #endif // __LOGFILE_H__