xml/xmlparser/inc/CXMLAttributes.h
author hgs
Thu, 01 Jul 2010 15:13:40 +0530
changeset 25 417699dc19c9
parent 24 74f0b3eb154c
permissions -rw-r--r--
201024_01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  ?Description
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#ifndef __CXMLATTRIBUTES_H
hgs
parents:
diff changeset
    21
#define __CXMLATTRIBUTES_H
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
//  INCLUDES
hgs
parents:
diff changeset
    24
#include <e32std.h>
hgs
parents:
diff changeset
    25
#include <badesca.h>  
hgs
parents:
diff changeset
    26
#include <xml/MXMLAttributes.h>
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
// CLASS DECLARATION
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
/**
hgs
parents:
diff changeset
    32
*  Implementation of MXMLAttributes interface.
hgs
parents:
diff changeset
    33
*  @lib XMLInterface.dll
hgs
parents:
diff changeset
    34
*  @since ?Series60_version
hgs
parents:
diff changeset
    35
*/
hgs
parents:
diff changeset
    36
class CXMLAttributes : public CBase, public MXMLAttributes 
hgs
parents:
diff changeset
    37
{
hgs
parents:
diff changeset
    38
public:  // Constructors and destructor
hgs
parents:
diff changeset
    39
        
hgs
parents:
diff changeset
    40
 /**
hgs
parents:
diff changeset
    41
 * Two-phased constructor.
hgs
parents:
diff changeset
    42
 */
hgs
parents:
diff changeset
    43
	static CXMLAttributes* NewL();
hgs
parents:
diff changeset
    44
hgs
parents:
diff changeset
    45
	static CXMLAttributes* NewLC();
hgs
parents:
diff changeset
    46
        
hgs
parents:
diff changeset
    47
/**
hgs
parents:
diff changeset
    48
* Destructor.
hgs
parents:
diff changeset
    49
*/
hgs
parents:
diff changeset
    50
	virtual ~CXMLAttributes();
hgs
parents:
diff changeset
    51
hgs
parents:
diff changeset
    52
public: // Implementation of MXMLAttributes Functions 
hgs
parents:
diff changeset
    53
        
hgs
parents:
diff changeset
    54
/**
hgs
parents:
diff changeset
    55
* Implementation of MXMLAttributes::GetIndexL(TDesC& aName)
hgs
parents:
diff changeset
    56
*/
hgs
parents:
diff changeset
    57
	TInt GetIndex(TDesC& aName);
hgs
parents:
diff changeset
    58
hgs
parents:
diff changeset
    59
/**
hgs
parents:
diff changeset
    60
* Implementation of MXMLAttributes::GetLenght()
hgs
parents:
diff changeset
    61
*/
hgs
parents:
diff changeset
    62
	TInt GetLength();
hgs
parents:
diff changeset
    63
	
hgs
parents:
diff changeset
    64
/**
hgs
parents:
diff changeset
    65
* Implementation of MXMLAttributes::GetNameL(TInt aIndex).
hgs
parents:
diff changeset
    66
*/
hgs
parents:
diff changeset
    67
	TPtrC GetName(TInt  aIndex);
hgs
parents:
diff changeset
    68
hgs
parents:
diff changeset
    69
/**
hgs
parents:
diff changeset
    70
* Implementation of MXMLAttributes::GetValueL(TDesC& aName, TDesC& aValue).
hgs
parents:
diff changeset
    71
*/
hgs
parents:
diff changeset
    72
	TPtrC GetValue(TDesC& aName);
hgs
parents:
diff changeset
    73
hgs
parents:
diff changeset
    74
/**
hgs
parents:
diff changeset
    75
* Implementation of MXMLAttributes::GetValueL(TInt& aIndex, TDesC& aValue).
hgs
parents:
diff changeset
    76
*/
hgs
parents:
diff changeset
    77
	TPtrC GetValue(TInt& aIndex);
hgs
parents:
diff changeset
    78
hgs
parents:
diff changeset
    79
/**
hgs
parents:
diff changeset
    80
* Implementation of MXMLAttributes::GetTypeL(Tint aIndex, TDesC& aType).
hgs
parents:
diff changeset
    81
*/
hgs
parents:
diff changeset
    82
// R&D: Feature: GetType missing from Attributes
hgs
parents:
diff changeset
    83
	TPtrC GetType(TInt aIndex);
hgs
parents:
diff changeset
    84
hgs
parents:
diff changeset
    85
/**
hgs
parents:
diff changeset
    86
* Implementation of MXMLAttributes::GetTypeL(TDesC& aName, TDesC& aType).
hgs
parents:
diff changeset
    87
*/
hgs
parents:
diff changeset
    88
// R&D: Feature: GetType missing from Attributes
hgs
parents:
diff changeset
    89
	TPtrC GetType(TDesC& aName);
hgs
parents:
diff changeset
    90
hgs
parents:
diff changeset
    91
public: // New Functions		
hgs
parents:
diff changeset
    92
		
hgs
parents:
diff changeset
    93
/**
hgs
parents:
diff changeset
    94
* Appends new attribute to attrinbuteslist.
hgs
parents:
diff changeset
    95
* @since ?Series60_version
hgs
parents:
diff changeset
    96
* @param aName: Attribute name.
hgs
parents:
diff changeset
    97
* @param aValue: Attribute value.
hgs
parents:
diff changeset
    98
* @return none.
hgs
parents:
diff changeset
    99
*/
hgs
parents:
diff changeset
   100
	void AppendL(const TDesC& aName, const TDesC& aValue);
hgs
parents:
diff changeset
   101
hgs
parents:
diff changeset
   102
/**
hgs
parents:
diff changeset
   103
* Resets the attribute list.
hgs
parents:
diff changeset
   104
* @since ?Series60_version
hgs
parents:
diff changeset
   105
* @param aName: Attribute name.
hgs
parents:
diff changeset
   106
* @param aValue: Attribute value.
hgs
parents:
diff changeset
   107
* @return none.
hgs
parents:
diff changeset
   108
*/
hgs
parents:
diff changeset
   109
	void Reset();
hgs
parents:
diff changeset
   110
hgs
parents:
diff changeset
   111
protected:
hgs
parents:
diff changeset
   112
/**
hgs
parents:
diff changeset
   113
 * C++ default constructor.
hgs
parents:
diff changeset
   114
 */
hgs
parents:
diff changeset
   115
	CXMLAttributes();
hgs
parents:
diff changeset
   116
hgs
parents:
diff changeset
   117
private:
hgs
parents:
diff changeset
   118
hgs
parents:
diff changeset
   119
	void ConstructL();
hgs
parents:
diff changeset
   120
hgs
parents:
diff changeset
   121
private:    // Data
hgs
parents:
diff changeset
   122
		
hgs
parents:
diff changeset
   123
	// Store Attribute Names
hgs
parents:
diff changeset
   124
	CDesCArraySeg* iDescAttName;
hgs
parents:
diff changeset
   125
	// Store Attribute Values
hgs
parents:
diff changeset
   126
	CDesCArraySeg* iDescAttValue;
hgs
parents:
diff changeset
   127
};
hgs
parents:
diff changeset
   128
hgs
parents:
diff changeset
   129
#endif     // __CXMLATTRIBUTES_H  
hgs
parents:
diff changeset
   130
            
hgs
parents:
diff changeset
   131
// End of File