diff -r 50c53e893c3f -r 1221b68b8a5f inc/buffercontainers.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/buffercontainers.h Tue Aug 31 15:29:38 2010 +0300 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2010 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: CBase derived container classes for easening +* dynamic memory allocation of TBuf type variables +* (TName etc.) +*/ +#ifndef BUFFERCONTAINERS_H +#define BUFFERCONTAINERS_H + +#include +namespace DRM +{ +template +NONSHARABLE_CLASS( CBufferContainer ): public CBase + { + // Note, this class is not intendend to be part of any API + public: + inline static CBufferContainer* NewL(); + inline static CBufferContainer* NewLC(); + + inline virtual ~CBufferContainer(); + private: + inline CBufferContainer(); + + //data + public: + // Contained TBuf member + T iBuffer; + }; + +//Containers for some TBuf based types defined at e32cmn.h +typedef CBufferContainer CNameContainer; +typedef CBufferContainer CFullNameContainer; +typedef CBufferContainer CExitCategoryNameContainer; +typedef CBufferContainer CFileNameContainer; +typedef CBufferContainer CPathContainer; +typedef CBufferContainer CVersionNameContainer; +typedef CBufferContainer CUidNameContainer; +} + +#include "buffercontainers.inl" +#endif // BUFFERCONTAINERS_H