aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QXmppPresence.cpp12
-rw-r--r--src/QXmppPresence.h9
2 files changed, 10 insertions, 11 deletions
diff --git a/src/QXmppPresence.cpp b/src/QXmppPresence.cpp
index 64ed0d58..f1201979 100644
--- a/src/QXmppPresence.cpp
+++ b/src/QXmppPresence.cpp
@@ -115,14 +115,14 @@ void QXmppPresence::parse(const QDomElement &element)
{
m_photoHash = QByteArray::fromHex(photoElement.text().toAscii());
if(m_photoHash.isEmpty())
- m_vCardUpdateType = PhotoNotAdvertized;
+ m_vCardUpdateType = VCardUpdateNoPhoto;
else
- m_vCardUpdateType = PhotoAdvertised;
+ m_vCardUpdateType = VCardUpdateValidPhoto;
}
else
{
m_photoHash = QByteArray();
- m_vCardUpdateType = PhotoNotReady;
+ m_vCardUpdateType = VCardUpdateNotReady;
}
}
// XEP-0115: Entity Capabilities
@@ -174,13 +174,13 @@ void QXmppPresence::toXml(QXmlStreamWriter *xmlWriter) const
helperToXmlAddAttribute(xmlWriter, "xmlns", ns_vcard_update);
switch(m_vCardUpdateType)
{
- case PhotoNotAdvertized:
+ case VCardUpdateNoPhoto:
helperToXmlAddTextElement(xmlWriter, "photo", "");
break;
- case PhotoAdvertised:
+ case VCardUpdateValidPhoto:
helperToXmlAddTextElement(xmlWriter, "photo", m_photoHash.toHex());
break;
- case PhotoNotReady:
+ case VCardUpdateNotReady:
break;
default:
break;
diff --git a/src/QXmppPresence.h b/src/QXmppPresence.h
index dddac9cb..6dfef6d8 100644
--- a/src/QXmppPresence.h
+++ b/src/QXmppPresence.h
@@ -49,12 +49,11 @@ public:
// XEP-0153: vCard-Based Avatars
enum VCardUpdateType
{
- // TODO fix the enum names PhotoNotAdvertized is confusing
- // All of these should start with VCardUpdate
VCardUpdateNone = 0, ///< Protocol is not supported
- PhotoNotAdvertized, ///< User is not using any image
- PhotoAdvertised, ///< User is advertising an image
- PhotoNotReady ///< User is not ready to advertise an image
+ VCardUpdateNoPhoto, ///< User is not using any image
+ VCardUpdateValidPhoto, ///< User is advertising an image
+ VCardUpdateNotReady ///< User is not ready to advertise an image
+
/// \note This enables recipients to distinguish between the absence of an image
/// (empty photo element) and mere support for the protocol (empty update child).
};