syncmlfw/common/wbxml/inc/XMLDynamicWorkspace.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:  Dynamic workspace class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __XMLDYNAMICWORKSPACE_H__
       
    20 #define __XMLDYNAMICWORKSPACE_H__
       
    21 
       
    22 // ------------------------------------------------------------------------------------------------
       
    23 // Includes
       
    24 // ------------------------------------------------------------------------------------------------
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "XMLWorkspace.h"
       
    28 
       
    29 // ------------------------------------------------------------------------------------------------
       
    30 // CXMLWorkspace
       
    31 // ------------------------------------------------------------------------------------------------
       
    32 class CXMLDynamicWorkspace : public CXMLWorkspace
       
    33 	{
       
    34 public:
       
    35 	IMPORT_C static CXMLDynamicWorkspace* NewL();
       
    36 	IMPORT_C ~CXMLDynamicWorkspace();
       
    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();
       
    50 	CXMLDynamicWorkspace();
       
    51 
       
    52 private:
       
    53 	CBufFlat* iBuffer;
       
    54 	};
       
    55 
       
    56 #endif // __XMLWORKSPACE_H__