aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-13 19:35:11 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-13 19:35:11 +0000
commita6e4cd9f22be063120f45ca7249edb343b3ab27b (patch)
treeb4c92f3b85478609c7871f5120cfdbd47099a544 /examples/GuiClient
parentcbd5752bd5a1165e93edfad15bbbfac0ccebb81d (diff)
downloadqxmpp-a6e4cd9f22be063120f45ca7249edb343b3ab27b.tar.gz
add getPhotoHash
Diffstat (limited to 'examples/GuiClient')
-rw-r--r--examples/GuiClient/vCardCache.cpp6
-rw-r--r--examples/GuiClient/vCardCache.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/examples/GuiClient/vCardCache.cpp b/examples/GuiClient/vCardCache.cpp
index 85c91993..49396f35 100644
--- a/examples/GuiClient/vCardCache.cpp
+++ b/examples/GuiClient/vCardCache.cpp
@@ -132,3 +132,9 @@ QImage vCardCache::getAvatar(const QString& bareJid) const
else
return QImage();
}
+
+QByteArray vCardCache::getPhotoHash(const QString& bareJid) const
+{
+ return QCryptographicHash::hash(m_mapBareJidVcard[bareJid].photo(),
+ QCryptographicHash::Sha1);
+}
diff --git a/examples/GuiClient/vCardCache.h b/examples/GuiClient/vCardCache.h
index 9116142b..4abbd497 100644
--- a/examples/GuiClient/vCardCache.h
+++ b/examples/GuiClient/vCardCache.h
@@ -46,6 +46,8 @@ public:
void loadFromFile();
+ QByteArray getPhotoHash(const QString& bareJid) const;
+
signals:
void vCardReadyToUse(const QString& bareJid);