summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-09 13:20:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-11 21:53:44 (GMT)
commit904db4e398210192093b688ebf1ad66fb017b6d2 (patch)
tree083f01449f64dc27aff63e2be0aa00a73cbd511b /Swiften/Avatars/CombinedAvatarProvider.h
parent10d8ba50a9e09517cfe4a6d4c3d51a768e989125 (diff)
downloadswift-contrib-904db4e398210192093b688ebf1ad66fb017b6d2.zip
swift-contrib-904db4e398210192093b688ebf1ad66fb017b6d2.tar.bz2
Added CombinedAvatarProvider
Diffstat (limited to 'Swiften/Avatars/CombinedAvatarProvider.h')
-rw-r--r--Swiften/Avatars/CombinedAvatarProvider.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/Swiften/Avatars/CombinedAvatarProvider.h b/Swiften/Avatars/CombinedAvatarProvider.h
new file mode 100644
index 0000000..fbd6ce7
--- /dev/null
+++ b/Swiften/Avatars/CombinedAvatarProvider.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <vector>
+#include <map>
+
+#include "Swiften/Avatars/AvatarProvider.h"
+#include "Swiften/JID/JID.h"
+
+namespace Swift {
+ class CombinedAvatarProvider : public AvatarProvider {
+ public:
+ virtual String getAvatarHash(const JID&) const;
+
+ void addProvider(AvatarProvider*);
+ void removeProvider(AvatarProvider*);
+
+ private:
+ void handleAvatarChanged(const JID&);
+
+ private:
+ std::vector<AvatarProvider*> providers;
+ std::map<JID, String> avatars;
+ };
+}