diff -r 000000000000 -r a03f92240627 memspy/Driver/Kernel/Include/MemSpyDriverStreamWriter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/memspy/Driver/Kernel/Include/MemSpyDriverStreamWriter.h Tue Feb 02 01:57:15 2010 +0200 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 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 MEMSPYDRIVERSTREAMWRITER_H +#define MEMSPYDRIVERSTREAMWRITER_H + +// System includes +#include +#include + +// Classes referenced +class DMemSpyDriverXferBuffer; + + +class RMemSpyMemStreamWriter + { +public: + RMemSpyMemStreamWriter(); + RMemSpyMemStreamWriter( DMemSpyDriverXferBuffer& aBuffer ); + +public: // API - closure + void Close(); + TInt WriteAndClose( TDes8* aDestinationPointer ); + +public: // API - writing + TInt32* WriteInt32( TInt32 aValue ); + TUint32* WriteUint32( TUint32 aValue ); + +public: // API - positioning + TUint8* Current() const; + void Seek( TInt aPosition ); + TUint32 Remaining() const; + +public: // API - marking + void MarkSet(); + void MarkResume(); + +public: // API - misc + TBool IsFull() const; + TBool IsOpen() const; + +public: // API - operators + RMemSpyMemStreamWriter& operator=( const RMemSpyMemStreamWriter& aCopy ); + +private: // Internal methods + void IncrementPos( TInt aAmount ); + +private: + DMemSpyDriverXferBuffer* iBuffer; + TUint8* iCurrent; + TUint8* iMax; + TUint8* iMark; + TInt iCommitted; + }; + + +#endif