1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/xml/dom/xmlengnodelist_impl.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,122 @@
1.4 +/*
1.5 +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* 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
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Node list implementation functions
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +#ifndef XMLENGINE_NODELIST_IMPL_H_INCLUDED
1.28 +#define XMLENGINE_NODELIST_IMPL_H_INCLUDED
1.29 +
1.30 +#include <e32def.h>
1.31 +#include "xmlengnode.h"
1.32 +
1.33 +/**
1.34 + * Class implements list container.
1.35 + *
1.36 + * @lib XmlEngineDOM.lib
1.37 + * @since S60 v3.2
1.38 + */
1.39 +class RXmlEngNodeListImpl
1.40 +{
1.41 +public:
1.42 +
1.43 + /**
1.44 + * Default constructor
1.45 + *
1.46 + * @since S60 v3.2
1.47 + */
1.48 + IMPORT_C RXmlEngNodeListImpl();
1.49 +
1.50 + /**
1.51 + * Closes node list
1.52 + *
1.53 + * @since S60 v3.2
1.54 + */
1.55 + IMPORT_C void Close();
1.56 +
1.57 + /**
1.58 + * Get list length.
1.59 + *
1.60 + * @since S60 v3.2
1.61 + * @return Number of nodes in a node list
1.62 + */
1.63 + IMPORT_C TInt Count() const;
1.64 +
1.65 + /**
1.66 + * Checks whether next node exists in a node list
1.67 + *
1.68 + * @since S60 v3.2
1.69 + * @return TRUE if next node exists, FALSE otherwise
1.70 + */
1.71 + IMPORT_C TBool HasNext() const;
1.72 +
1.73 + /**
1.74 + * Retrieves next node from a node list
1.75 + *
1.76 + * @since S60 v3.2
1.77 + * @return Next node
1.78 + */
1.79 + IMPORT_C TXmlEngNode Next();
1.80 +
1.81 + /**
1.82 + * Opens node.
1.83 + *
1.84 + * @since S60 v3.2
1.85 + * @param aHead node pointer to the node from which the searching
1.86 + of list elements is started
1.87 + * @param aType type of list elements
1.88 + * @param aName name of list elements
1.89 + * @param aNs namespace of list elements
1.90 + *
1.91 + * @note If aType is NULL, aName and aNs are ignored
1.92 + */
1.93 + void OpenL(
1.94 + void* aHead,
1.95 + TXmlEngNode::TXmlEngDOMNodeType aType,
1.96 + const TDesC8& aName = KNullDesC8,
1.97 + const TDesC8& aNs = KNullDesC8);
1.98 +
1.99 + /**
1.100 + * Opens node.
1.101 + *
1.102 + * @since S60 v3.2
1.103 + * @param aHead node pointer to the node from which the searching
1.104 + of list elements is started
1.105 + * @param aType type of list elements
1.106 + */
1.107 + void Open(
1.108 + void* aHead,
1.109 + TXmlEngNode::TXmlEngDOMNodeType aType);
1.110 +
1.111 +private:
1.112 +
1.113 + void* FindNextNode(void* aCurrentNode) const;
1.114 +
1.115 + void* iCurrentNode;
1.116 + TInt iType; // NodeType:4 bits (0-3) & MatchName flag (bit 4)
1.117 + unsigned char* iName;
1.118 + unsigned char* iNsUri;
1.119 +};
1.120 +
1.121 +TBool StrEqualOrNull(const void* aStr1, const void* aStr2);
1.122 +
1.123 +
1.124 +
1.125 +#endif /* XMLENGINE_NODELIST_IMPL_H_INCLUDED */