aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppElement.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-02-18 12:37:52 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-02-18 12:37:52 +0000
commit54576ab2d36c6736d3720fc4cfbcfc659c279e23 (patch)
tree22b5e62b3e684563d71a3a2d075b464fa37cefc1 /source/QXmppElement.h
parent5479c36ba68c9b06300a0b1b4830d21a5415daf7 (diff)
downloadqxmpp-54576ab2d36c6736d3720fc4cfbcfc659c279e23.tar.gz
introduce QXmppElementList
Diffstat (limited to 'source/QXmppElement.h')
-rw-r--r--source/QXmppElement.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/QXmppElement.h b/source/QXmppElement.h
index d684ddd3..58ec6918 100644
--- a/source/QXmppElement.h
+++ b/source/QXmppElement.h
@@ -29,6 +29,15 @@
#include <QXmlStreamWriter>
class QDomElement;
+class QXmppElement;
+
+class QXmppElementList : public QList<QXmppElement>
+{
+public:
+ QXmppElementList();
+ QXmppElementList(const QXmppElement &element);
+ QXmppElementList(const QList<QXmppElement> &other);
+};
class QXmppElement
{
@@ -41,8 +50,9 @@ public:
QString attribute(const QString &name) const;
void setAttribute(const QString &name, const QString &value);
- QList<QXmppElement> children() const;
- void setChildren(QList<QXmppElement> &children);
+ QXmppElementList children() const;
+ QXmppElement firstChild(const QString &name) const;
+ void setChildren(const QXmppElementList &children);
QString tagName() const;
void setTagName(const QString &type);
@@ -55,7 +65,7 @@ public:
private:
QMap<QString, QString> m_attributes;
- QList<QXmppElement> m_children;
+ QXmppElementList m_children;
QString m_tagName;
QString m_value;
};