summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-08 19:10:45 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-08 19:10:45 (GMT)
commitd53ceecb25f336fd1e7e5d9a6ae52599ff2cb12b (patch)
treebc59b7ea1adf2b94c1594dfd74d7f9353386e133 /Swiften/VCards/VCardManager.cpp
parent0313b451afbeffc33cc0060ce6fd7b4f2ee9a2bb (diff)
parentf2637331516790242317997ca099e1bc1901c935 (diff)
downloadswift-d53ceecb25f336fd1e7e5d9a6ae52599ff2cb12b.zip
swift-d53ceecb25f336fd1e7e5d9a6ae52599ff2cb12b.tar.bz2
Merge branch 'copyrights'
Diffstat (limited to 'Swiften/VCards/VCardManager.cpp')
-rw-r--r--Swiften/VCards/VCardManager.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/VCards/VCardManager.cpp b/Swiften/VCards/VCardManager.cpp
new file mode 100644
index 0000000..0174dea
--- /dev/null
+++ b/Swiften/VCards/VCardManager.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include "Swiften/VCards/VCardManager.h"
+
+namespace Swift {
+
+VCardManager::VCardManager(IQRouter* iqRouter, VCardStorage* vcardStorage) : iqRouter(iqRouter), storage(vcardStorage) {
+}
+
+boost::shared_ptr<VCard> VCardManager::getVCardAndRequestWhenNeeded(const JID& jid) const {
+ boost::shared_ptr<VCard> vcard = storage->getVCard(jid);
+ if (!vcard) {
+ // TODO: Request vcard if necessary
+ }
+ return vcard;
+}
+
+}