aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppElement.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-02-19 15:40:42 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-02-19 15:40:42 +0000
commit1ce7a46bf44ee6317f8bb5dd2bb80fde2df759de (patch)
tree2ffba5750bfd1b93d0c67a335a87d248f3ca61d8 /source/QXmppElement.h
parentff76789c8405dd396a3902bd9c6a37e48e9989cd (diff)
downloadqxmpp-1ce7a46bf44ee6317f8bb5dd2bb80fde2df759de.tar.gz
make QXmppElement API closer to QDomElement
Diffstat (limited to 'source/QXmppElement.h')
-rw-r--r--source/QXmppElement.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/QXmppElement.h b/source/QXmppElement.h
index 58ec6918..780d00c0 100644
--- a/source/QXmppElement.h
+++ b/source/QXmppElement.h
@@ -30,6 +30,7 @@
class QDomElement;
class QXmppElement;
+class QXmppElementPrivate;
class QXmppElementList : public QList<QXmppElement>
{
@@ -43,16 +44,19 @@ class QXmppElement
{
public:
QXmppElement();
+ QXmppElement(const QXmppElement &other);
QXmppElement(const QDomElement &element);
+ ~QXmppElement();
QStringList attributeNames() const;
QString attribute(const QString &name) const;
void setAttribute(const QString &name, const QString &value);
+ void appendChild(const QXmppElement &child);
QXmppElementList children() const;
- QXmppElement firstChild(const QString &name) const;
- void setChildren(const QXmppElementList &children);
+ QXmppElement firstChildElement(const QString &name = QString()) const;
+ void removeChild(const QXmppElement &child);
QString tagName() const;
void setTagName(const QString &type);
@@ -63,11 +67,11 @@ public:
bool isNull() const;
void toXml(QXmlStreamWriter *writer) const;
+ QXmppElement &operator=(const QXmppElement &other);
+
private:
- QMap<QString, QString> m_attributes;
- QXmppElementList m_children;
- QString m_tagName;
- QString m_value;
+ QXmppElement(QXmppElementPrivate *other);
+ QXmppElementPrivate *d;
};
#endif