// EIKBMSTR.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

#if !defined(__EIKBMSTR_H__)
#define __EIKBMSTR_H__

#if !defined(__E32BASE_H__)
#include <e32base.h>
#endif

#if !defined(__S32MEM_H__)
#include <s32mem.h>
#endif

class CEmbeddedStore;
class CStreamDictionary;
class CBufBase;
class CBeamingStore : public CBase
	{
public:
	IMPORT_C static CBeamingStore* NewForSendingL();
	IMPORT_C static CBeamingStore* NewForReceivingL();
	IMPORT_C ~CBeamingStore();

	// Necessary only for sending
	IMPORT_C void ReadyToSendL();
	//

	// Necessary only for receiving
	IMPORT_C void ReceiveCompleteL();
	//

	inline CEmbeddedStore& Store() const;
	inline CStreamDictionary& StreamDictionary() const;
	inline CBufBase* Buf();
private:
	inline CBeamingStore() {}
	void ConstructForSendingL();
	void ConstructForReceivingL();
private:
	CEmbeddedStore* iStore;
	CStreamDictionary* iStrmDict;
	CBufBase* iBuf;
	TBufBuf iStreamBuf;
	};

inline CEmbeddedStore& CBeamingStore::Store() const { return *iStore; }
inline CStreamDictionary& CBeamingStore::StreamDictionary() const { return *iStrmDict; }
inline CBufBase* CBeamingStore::Buf() { return iBuf; }

#endif