aboutsummaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-04-20 17:24:49 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2012-04-20 17:24:49 +0000
commit633f408fe98e6af5542d0261e71ff452a9183920 (patch)
tree520906b1d641585f9219d0b0746df5adde559c6a /src/base
parent9684bb108207ae64ddbb0a0708f69890b250783c (diff)
downloadqxmpp-633f408fe98e6af5542d0261e71ff452a9183920.tar.gz
Remove QXmppPacket class.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/QXmppPacket.cpp34
-rw-r--r--src/base/QXmppPacket.h50
-rw-r--r--src/base/QXmppStanza.cpp5
-rw-r--r--src/base/QXmppStanza.h10
-rw-r--r--src/base/base.pri2
5 files changed, 8 insertions, 93 deletions
diff --git a/src/base/QXmppPacket.cpp b/src/base/QXmppPacket.cpp
deleted file mode 100644
index 1d284325..00000000
--- a/src/base/QXmppPacket.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2008-2011 The QXmpp developers
- *
- * Author:
- * Manjeet Dahiya
- *
- * Source:
- * http://code.google.com/p/qxmpp
- *
- * This file is a part of QXmpp library.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- */
-
-
-#include "QXmppPacket.h"
-
-QXmppPacket::QXmppPacket()
-{
-}
-
-QXmppPacket::~QXmppPacket()
-{
-}
-
diff --git a/src/base/QXmppPacket.h b/src/base/QXmppPacket.h
deleted file mode 100644
index a1163aaa..00000000
--- a/src/base/QXmppPacket.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2008-2011 The QXmpp developers
- *
- * Author:
- * Manjeet Dahiya
- *
- * Source:
- * http://code.google.com/p/qxmpp
- *
- * This file is a part of QXmpp library.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- */
-
-
-#ifndef QXMPPPACKET_H
-#define QXMPPPACKET_H
-
-#include <QByteArray>
-
-// forward declarations of QXmlStream* classes will not work on Mac, we need to
-// include the whole header.
-// See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html
-// for an explanation.
-#include <QXmlStreamWriter>
-
-#include "QXmppGlobal.h"
-
-class QDomElement;
-
-class QXMPP_EXPORT QXmppPacket
-{
-public:
- QXmppPacket();
- virtual ~QXmppPacket();
-
- virtual void parse(const QDomElement &element) = 0;
- virtual void toXml( QXmlStreamWriter *writer ) const = 0;
-};
-
-#endif // QXMPPPACKET_H
diff --git a/src/base/QXmppStanza.cpp b/src/base/QXmppStanza.cpp
index e8937b6f..0d7e55de 100644
--- a/src/base/QXmppStanza.cpp
+++ b/src/base/QXmppStanza.cpp
@@ -299,9 +299,8 @@ void QXmppStanza::Error::toXml( QXmlStreamWriter *writer ) const
/// \param to
QXmppStanza::QXmppStanza(const QString& from, const QString& to)
- : QXmppPacket(),
- m_to(to),
- m_from(from)
+ : m_to(to)
+ , m_from(from)
{
}
diff --git a/src/base/QXmppStanza.h b/src/base/QXmppStanza.h
index bd29cbab..287b7382 100644
--- a/src/base/QXmppStanza.h
+++ b/src/base/QXmppStanza.h
@@ -25,8 +25,7 @@
#ifndef QXMPPSTANZA_H
#define QXMPPSTANZA_H
-#include "QXmppElement.h"
-#include "QXmppPacket.h"
+#include <QByteArray>
#include <QString>
// forward declarations of QXmlStream* classes will not work on Mac, we need to
@@ -35,13 +34,15 @@
// for an explanation.
#include <QXmlStreamWriter>
+#include "QXmppElement.h"
+
/// \defgroup Stanzas
/// \brief The QXmppStanza class is the base class for all XMPP stanzas.
///
/// \ingroup Stanzas
-class QXMPP_EXPORT QXmppStanza : public QXmppPacket
+class QXMPP_EXPORT QXmppStanza
{
public:
class QXMPP_EXPORT Error
@@ -143,10 +144,11 @@ public:
/// \cond
// FIXME : why is this needed?
bool isErrorStanza() const;
+ virtual void parse(const QDomElement &element);
+ virtual void toXml(QXmlStreamWriter *writer) const;
protected:
void generateAndSetNextId();
- void parse(const QDomElement &element);
/// \endcond
private:
diff --git a/src/base/base.pri b/src/base/base.pri
index 9115bc82..db0be9bd 100644
--- a/src/base/base.pri
+++ b/src/base/base.pri
@@ -20,7 +20,6 @@ INSTALL_HEADERS += \
base/QXmppMessage.h \
base/QXmppMucIq.h \
base/QXmppNonSASLAuth.h \
- base/QXmppPacket.h \
base/QXmppPingIq.h \
base/QXmppPresence.h \
base/QXmppPubSubIq.h \
@@ -59,7 +58,6 @@ SOURCES += \
base/QXmppMessage.cpp \
base/QXmppMucIq.cpp \
base/QXmppNonSASLAuth.cpp \
- base/QXmppPacket.cpp \
base/QXmppPingIq.cpp \
base/QXmppPresence.cpp \
base/QXmppPubSubIq.cpp \