syncmlfw/common/wbxml/inc/XMLWorkspace.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:  Base workspace class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __XMLWORKSPACE_H__
       
    20 #define __XMLWORKSPACE_H__
       
    21 
       
    22 // ------------------------------------------------------------------------------------------------
       
    23 // Includes
       
    24 // ------------------------------------------------------------------------------------------------
       
    25 #include <e32base.h>
       
    26 
       
    27 // ------------------------------------------------------------------------------------------------
       
    28 // CXMLWorkspace
       
    29 // ------------------------------------------------------------------------------------------------
       
    30 class CXMLWorkspace : public CBase
       
    31 	{
       
    32 public:
       
    33 	virtual ~CXMLWorkspace();
       
    34 
       
    35 	// transaction handling
       
    36 	virtual void BeginTransaction();
       
    37 	virtual void CommitAll();
       
    38 	virtual TInt Commit();
       
    39 	virtual TInt Rollback();
       
    40 
       
    41 	// pure virtuals
       
    42 	virtual void Reset() = 0;
       
    43 	virtual void WriteL( const TDesC8& aData ) = 0;
       
    44 	virtual void WriteL( const TUint8 aData ) = 0;
       
    45 	virtual TPtrC8 Buffer() const = 0;
       
    46 
       
    47 	virtual TInt FreeSize() const = 0;
       
    48 	virtual TInt MaxSize() const = 0;
       
    49 	virtual TInt Size() const = 0;
       
    50 
       
    51 protected:
       
    52 	void ConstructL();
       
    53 
       
    54 private:
       
    55 	// pure virtuals
       
    56 	virtual void Delete( TInt aPos, TInt aLength ) = 0;
       
    57 
       
    58 private:
       
    59 	RArray<TUint>* iTransactions;
       
    60 	};
       
    61 
       
    62 #endif // __XMLWORKSPACE_H__