syncmlfw/common/wbxml/inc/XMLStaticWorkspace.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Static workspace class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __XMLSTATICWORKSPACE_H__
       
    20 #define __XMLSTATICWORKSPACE_H__
       
    21 
       
    22 // ------------------------------------------------------------------------------------------------
       
    23 // Includes
       
    24 // ------------------------------------------------------------------------------------------------
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "XMLWorkspace.h"
       
    28 
       
    29 // ------------------------------------------------------------------------------------------------
       
    30 // CXMLWorkspace
       
    31 // ------------------------------------------------------------------------------------------------
       
    32 class CXMLStaticWorkspace : public CXMLWorkspace
       
    33 	{
       
    34 public:
       
    35 	IMPORT_C static CXMLStaticWorkspace* NewL( TInt aBufferSize );
       
    36 	IMPORT_C ~CXMLStaticWorkspace();
       
    37 	
       
    38 	IMPORT_C void Reset();
       
    39 	IMPORT_C void WriteL( const TDesC8& aData );
       
    40 	IMPORT_C void WriteL( const TUint8 aData );
       
    41 	IMPORT_C TPtrC8 Buffer() const;
       
    42 
       
    43 	IMPORT_C TInt FreeSize() const;
       
    44 	IMPORT_C TInt MaxSize() const;
       
    45 	IMPORT_C TInt Size() const;
       
    46 
       
    47 private:
       
    48 	void Delete( TInt aPos, TInt aLength );
       
    49 	void ConstructL( TInt aBufferSize );
       
    50 	inline TPtr8 Ptr() const;
       
    51 	CXMLStaticWorkspace();
       
    52 
       
    53 private:
       
    54 	HBufC8* iBuffer;
       
    55 	TUint32 iMaxLength;
       
    56 	};
       
    57 
       
    58 #include "xmlstaticworkspace.inl"
       
    59 
       
    60 #endif // __XMLSTATICWORKSPACE_H__