aboutsummaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-07-18 16:33:00 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-07-18 16:33:00 +0200
commit2b2b251d5cfd324df9ec3bfdc110568a43f03140 (patch)
treecbd9483edf8ad398f210b730b9f6184ca3a8b86c /src/base
parentc0ddf372e5ccfdda3265bdf33bfc1276d9af6885 (diff)
downloadqxmpp-2b2b251d5cfd324df9ec3bfdc110568a43f03140.tar.gz
restore support for obsolete "invisible" presence (fixes issue #111)
Diffstat (limited to 'src/base')
-rw-r--r--src/base/QXmppPresence.cpp4
-rw-r--r--src/base/QXmppPresence.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/base/QXmppPresence.cpp b/src/base/QXmppPresence.cpp
index 42143b10..e5821068 100644
--- a/src/base/QXmppPresence.cpp
+++ b/src/base/QXmppPresence.cpp
@@ -318,6 +318,8 @@ void QXmppPresence::Status::setTypeFromStr(const QString& str)
m_type = QXmppPresence::Status::DND;
else if(str == "xa")
m_type = QXmppPresence::Status::XA;
+ else if(str == "invisible")
+ m_type = QXmppPresence::Status::Invisible;
else {
qWarning("QXmppPresence::Status::setTypeFromStr() invalid input string type %s",
qPrintable(str));
@@ -341,6 +343,8 @@ QString QXmppPresence::Status::getTypeStr() const
return "dnd";
case QXmppPresence::Status::Chat:
return "chat";
+ case QXmppPresence::Status::Invisible:
+ return "invisible";
default:
qWarning("QXmppPresence::Status::getTypeStr() invalid type %d",
(int)m_type);
diff --git a/src/base/QXmppPresence.h b/src/base/QXmppPresence.h
index b4a12be9..a34526c4 100644
--- a/src/base/QXmppPresence.h
+++ b/src/base/QXmppPresence.h
@@ -77,6 +77,7 @@ public:
XA, ///< The entity or resource is away for an extended period.
DND, ///< The entity or resource is busy ("Do Not Disturb").
Chat, ///< The entity or resource is actively interested in chatting.
+ Invisible ///< obsolete XEP-0018: Invisible Presence
};
Status(QXmppPresence::Status::Type type = QXmppPresence::Status::Online,