summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-09 16:05:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-11 21:53:45 (GMT)
commit8bdc3c2e2e520407027ac3a3e09d7af8054a0e5b (patch)
treeaada96d0c28d46b771d4afb59cb84a93ea358df4 /Swiften/VCards
parent37511b6d30cb9cb6c1f5b1fdcca5f6658e4425da (diff)
downloadswift-8bdc3c2e2e520407027ac3a3e09d7af8054a0e5b.zip
swift-8bdc3c2e2e520407027ac3a3e09d7af8054a0e5b.tar.bz2
Added VCardAvatarManager for offline avatars.
Resolves: #418
Diffstat (limited to 'Swiften/VCards')
-rw-r--r--Swiften/VCards/VCardManager.cpp4
-rw-r--r--Swiften/VCards/VCardManager.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/VCards/VCardManager.cpp b/Swiften/VCards/VCardManager.cpp
index 628f4c8..673b937 100644
--- a/Swiften/VCards/VCardManager.cpp
+++ b/Swiften/VCards/VCardManager.cpp
@@ -17,6 +17,10 @@ namespace Swift {
VCardManager::VCardManager(const JID& ownJID, IQRouter* iqRouter, VCardStorage* vcardStorage) : ownJID(ownJID), iqRouter(iqRouter), storage(vcardStorage) {
}
+VCard::ref VCardManager::getVCard(const JID& jid) const {
+ return storage->getVCard(jid);
+}
+
VCard::ref VCardManager::getVCardAndRequestWhenNeeded(const JID& jid) {
VCard::ref vcard = storage->getVCard(jid);
if (!vcard) {
diff --git a/Swiften/VCards/VCardManager.h b/Swiften/VCards/VCardManager.h
index 61fc50d..67a2ef8 100644
--- a/Swiften/VCards/VCardManager.h
+++ b/Swiften/VCards/VCardManager.h
@@ -22,6 +22,7 @@ namespace Swift {
public:
VCardManager(const JID& ownJID, IQRouter* iqRouter, VCardStorage* vcardStorage);
+ VCard::ref getVCard(const JID& jid) const;
VCard::ref getVCardAndRequestWhenNeeded(const JID& jid);
void requestVCard(const JID& jid);
void requestOwnVCard();