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