epoc32/include/xmlengnodelist_impl.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:       Node list implementation functions
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
williamr@2
    21
williamr@2
    22
williamr@2
    23
williamr@2
    24
#ifndef XMLENGINE_NODELIST_IMPL_H_INCLUDED
williamr@2
    25
#define XMLENGINE_NODELIST_IMPL_H_INCLUDED
williamr@2
    26
williamr@2
    27
#include <e32def.h>
williamr@2
    28
#include "xmlengnode.h"
williamr@2
    29
williamr@2
    30
/** 
williamr@2
    31
 * Class implements list container.
williamr@2
    32
 * 
williamr@2
    33
 * @lib XmlEngineDOM.lib
williamr@2
    34
 * @since S60 v3.2
williamr@2
    35
 */
williamr@2
    36
class RXmlEngNodeListImpl
williamr@2
    37
{
williamr@2
    38
public:
williamr@2
    39
williamr@2
    40
    /**
williamr@2
    41
     *  Default constructor
williamr@2
    42
     *
williamr@2
    43
     * @since S60 v3.2
williamr@2
    44
     */
williamr@2
    45
    IMPORT_C RXmlEngNodeListImpl();
williamr@2
    46
williamr@2
    47
    /** 
williamr@2
    48
     * Closes node list
williamr@2
    49
     *
williamr@2
    50
     * @since S60 v3.2
williamr@2
    51
     */
williamr@2
    52
    IMPORT_C void Close();
williamr@2
    53
williamr@2
    54
    /** 
williamr@2
    55
     * Get list length.
williamr@2
    56
     *
williamr@2
    57
     * @since S60 v3.2
williamr@2
    58
     * @return Number of nodes in a node list
williamr@2
    59
     */
williamr@2
    60
    IMPORT_C TInt  Count() const;
williamr@2
    61
williamr@2
    62
    /** 
williamr@2
    63
     * Checks whether next node exists in a node list
williamr@2
    64
     *
williamr@2
    65
     * @since S60 v3.2
williamr@2
    66
     * @return TRUE if next node exists, FALSE otherwise
williamr@2
    67
     */
williamr@2
    68
    IMPORT_C TBool HasNext() const;
williamr@2
    69
williamr@2
    70
    /** 
williamr@2
    71
     * Retrieves next node from a node list
williamr@2
    72
     *
williamr@2
    73
     * @since S60 v3.2
williamr@2
    74
     * @return Next node 
williamr@2
    75
     */
williamr@2
    76
    IMPORT_C TXmlEngNode Next();
williamr@2
    77
williamr@2
    78
    /** 
williamr@2
    79
     * Opens node.
williamr@2
    80
     *
williamr@2
    81
     * @since S60 v3.2
williamr@2
    82
     * @param aHead node pointer to the node from which the searching 
williamr@2
    83
            of list elements is started
williamr@2
    84
     * @param aType type of list elements
williamr@2
    85
     * @param aName name of list elements 
williamr@2
    86
     * @param aNs namespace of list elements
williamr@2
    87
     *
williamr@2
    88
     * @note If aType is NULL, aName and aNs are ignored
williamr@2
    89
     */
williamr@2
    90
    void OpenL( 
williamr@2
    91
			void* aHead,
williamr@2
    92
			TXmlEngNode::TXmlEngDOMNodeType aType,
williamr@2
    93
			const TDesC8&	aName = KNullDesC8,
williamr@2
    94
			const TDesC8&	aNs = KNullDesC8);
williamr@2
    95
williamr@2
    96
    /** 
williamr@2
    97
     * Opens node.
williamr@2
    98
     *
williamr@2
    99
     * @since S60 v3.2
williamr@2
   100
     * @param aHead node pointer to the node from which the searching 
williamr@2
   101
            of list elements is started
williamr@2
   102
     * @param aType type of list elements
williamr@2
   103
     */
williamr@2
   104
    void Open( 
williamr@2
   105
			void* aHead,
williamr@2
   106
			TXmlEngNode::TXmlEngDOMNodeType aType);
williamr@2
   107
williamr@2
   108
private:
williamr@2
   109
williamr@2
   110
    void* FindNextNode(void* aCurrentNode) const;
williamr@2
   111
williamr@2
   112
    void*	        iCurrentNode;
williamr@2
   113
	TInt		    iType;  // NodeType:4 bits (0-3) & MatchName flag (bit 4)
williamr@2
   114
	unsigned char*	iName;
williamr@2
   115
	unsigned char*	iNsUri;
williamr@2
   116
};
williamr@2
   117
williamr@2
   118
TBool StrEqualOrNull(const void* aStr1, const void* aStr2);
williamr@2
   119
			
williamr@2
   120
williamr@2
   121
williamr@2
   122
#endif /* XMLENGINE_NODELIST_IMPL_H_INCLUDED */