syncmlfw/common/wbxml/inc/WBXMLAttributes.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:  WBXML attribute classes.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __WBXMLATTRIBUTES_H__
       
    20 #define __WBXMLATTRIBUTES_H__
       
    21 
       
    22 // ------------------------------------------------------------------------------------------------
       
    23 // Includes
       
    24 // ------------------------------------------------------------------------------------------------
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 #include "WBXMLDefs.h"
       
    29 
       
    30 // ------------------------------------------------------------------------------------------------
       
    31 // CWBXMLAttribute
       
    32 // ------------------------------------------------------------------------------------------------
       
    33 
       
    34 class CWBXMLAttribute : CBase
       
    35 	{
       
    36 public:
       
    37 	static CWBXMLAttribute* NewL( TWBXMLTag aName, const TDesC8& aValue );
       
    38 	~CWBXMLAttribute();
       
    39 	IMPORT_C TWBXMLTag Name() const;
       
    40 	IMPORT_C TPtrC8 Value() const;
       
    41 
       
    42 private:
       
    43 	void ConstructL( TWBXMLTag aName, const TDesC8& aValue );
       
    44 
       
    45 private:
       
    46 	TWBXMLTag iName;
       
    47 	HBufC8* iValue;
       
    48 	};
       
    49 
       
    50 // ------------------------------------------------------------------------------------------------
       
    51 // CWBXMLAttributes
       
    52 // ------------------------------------------------------------------------------------------------
       
    53 
       
    54 class CWBXMLAttributes : public CBase
       
    55 	{
       
    56 public:
       
    57 	IMPORT_C static CWBXMLAttributes* NewL();
       
    58 	IMPORT_C static CWBXMLAttributes* NewLC();
       
    59 	~CWBXMLAttributes();
       
    60 
       
    61 	IMPORT_C TInt Count() const;
       
    62 	IMPORT_C const CWBXMLAttribute& Attribute( TInt aIndex ) const;
       
    63 	IMPORT_C void AddAttributeL( TWBXMLTag aName, const TDesC8& aValue );
       
    64 
       
    65 private:
       
    66 	void ConstructL();
       
    67 
       
    68 private:
       
    69 	CArrayPtr<CWBXMLAttribute>* iAttributeList;
       
    70 	};
       
    71 
       
    72 #endif // __WBXMLATTRIBUTES_H__