summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-11-28 21:44:26 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-12-24 13:43:44 (GMT)
commitf08d7dc30a1242ea5a148377c5593188a8fb1317 (patch)
treef55fd5175d21c804528c5f531c08880621274e71 /Swiften/Avatars/AvatarManager.h
parent39209e6b419af417d3db011d7fd29433e88c8b3a (diff)
downloadswift-f08d7dc30a1242ea5a148377c5593188a8fb1317.zip
swift-f08d7dc30a1242ea5a148377c5593188a8fb1317.tar.bz2
Extract the Chat dialog management from MainController into ChatsManager.
There is a single unit test so far - but that's more than was there before, so I'm pushing. Expect more unit tests shortly. Resolves: #139
Diffstat (limited to 'Swiften/Avatars/AvatarManager.h')
-rw-r--r--Swiften/Avatars/AvatarManager.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Swiften/Avatars/AvatarManager.h b/Swiften/Avatars/AvatarManager.h
index 65ec372..448526e 100644
--- a/Swiften/Avatars/AvatarManager.h
+++ b/Swiften/Avatars/AvatarManager.h
@@ -20,14 +20,19 @@ namespace Swift {
class AvatarManager {
public:
AvatarManager(StanzaChannel*, IQRouter*, AvatarStorage*, MUCRegistry*);
+ virtual ~AvatarManager();
- String getAvatarHash(const JID&) const;
- boost::filesystem::path getAvatarPath(const JID&) const;
- void setAvatar(const JID&, const ByteArray& avatar);
+ virtual String getAvatarHash(const JID&) const;
+ virtual boost::filesystem::path getAvatarPath(const JID&) const;
+ virtual void setAvatar(const JID&, const ByteArray& avatar);
public:
boost::signal<void (const JID&, const String&)> onAvatarChanged;
+ protected:
+ /** Used only for testing. Leads to a non-functional object. */
+ AvatarManager();
+
private:
void handlePresenceReceived(boost::shared_ptr<Presence>);
void handleVCardReceived(const JID& from, const String& hash, boost::shared_ptr<VCard>, const boost::optional<ErrorPayload>&);