diff -r 73b88125830c -r b8d1455fddc0 testconns/statapi/device/source/statapi/inc/filedump.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testconns/statapi/device/source/statapi/inc/filedump.h Mon Oct 04 02:58:21 2010 +0300 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2005-2009 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: +* +*/ + + + +#ifndef FILEDUMP_H +#define FILEDUMP_H + +#include +#include +#include + +#include "stat_interfaces.h" + +#define ST_MAXMESSAGELENGTH 510 + +class FileDump : public MNotifyLogMessage +{ +public: + FileDump():bInitialised(EFalse), pConsole(NULL){} + + // from MNotifyLogMessage + GLDEF_C TInt Init(RFs &fsSession, TPtrC16 filename, CConsoleBase* console); + GLDEF_C TBool IsInitialised() const; + GLDEF_C void Msg(TPtrC16 text, ...); + GLDEF_C void CloseFile(); + +private: + TBool bInitialised; + RFile file; + CConsoleBase* pConsole; + TBuf16 buf; // temp buffer + + GLDEF_C TBool WriteBuffer16ToFile(TDesC16 &buffer, RFile &handle); +}; + +#endif