installationservices/swi/source/sisregistry/server/sisregistryserveripcbuf.h
author hgs
Thu, 08 Jul 2010 20:28:00 +0300
changeset 50 c6e8afe0ba85
parent 0 ba25891c3a9e
permissions -rw-r--r--
201027_01

/*
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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: 
* Library to add s32strm support for IPC (ie. stream via multiple IPC read/writes instead of
* copying to a buffer and streaming to/from there.
*
*/


/**
 @file
 @released
 @internalComponent
*/
#ifndef __SISREGISTRYSERVERIPCBUF_H__
#define __SISREGISTRYSERVERIPCBUF_H__

#include <e32base.h>
#include <s32buf.h>

_LIT(KIpcBufPanic, "IpcBuf");

class RIpcBuf : public MStreamBuf
	{
public:
	void Open(const RMessage2& aMessage, TInt aMessageSlot);

protected:
	
	TInt DoReadL(TAny *aPtr, TInt aMaxLength);
	void DoWriteL(const TAny* aPtr,TInt aLength);

private:
	enum TIpcBufPanic
		{
		EIpcBufSeekUnknownLocation,
		EIpcBufSeekBadOffset
		};

private:
	TInt iReadPos;
	TInt iWritePos;
	RMessage2 iMessage;
	TInt iMessageSlot;
	};



#endif /* __SISREGISTRYSERVERIPCBUF_H__ */