diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/isode/stroke/client/Client.java | 8 | ||||
-rw-r--r-- | src/com/isode/stroke/client/MemoryStorages.java | 11 | ||||
-rw-r--r-- | src/com/isode/stroke/client/Storages.java | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/com/isode/stroke/client/Client.java b/src/com/isode/stroke/client/Client.java index 0ea6ad7..6938225 100644 --- a/src/com/isode/stroke/client/Client.java +++ b/src/com/isode/stroke/client/Client.java @@ -4,6 +4,8 @@ */ package com.isode.stroke.client; +import com.isode.stroke.avatars.AvatarManager; +import com.isode.stroke.avatars.AvatarManagerImpl; import com.isode.stroke.disco.CapsManager; import com.isode.stroke.disco.ClientDiscoManager; import com.isode.stroke.disco.EntityCapsManager; @@ -54,6 +56,7 @@ public class Client extends CoreClient { private final NickResolver nickResolver; private final SubscriptionManager subscriptionManager; private final ClientDiscoManager discoManager; + private final AvatarManager avatarManager; final Signal1<Presence> onPresenceChange = new Signal1<Presence>(); @@ -98,6 +101,7 @@ public class Client extends CoreClient { mucManager = new MUCManager(getStanzaChannel(), getIQRouter(), directedPresenceSender, mucRegistry); vcardManager = new VCardManager(jid, getIQRouter(), getStorages().getVCardStorage()); + avatarManager = new AvatarManagerImpl(vcardManager, getStanzaChannel(), getStorages().getAvatarStorage(), networkFactories.getCryptoProvider(), mucRegistry); capsManager = new CapsManager(getStorages().getCapsStorage(), getStanzaChannel(), getIQRouter(), networkFactories.getCryptoProvider()); entityCapsManager = new EntityCapsManager(capsManager, getStanzaChannel()); @@ -190,6 +194,10 @@ public class Client extends CoreClient { return vcardManager; } + public AvatarManager getAvatarManager() { + return avatarManager; + } + private Storages getStorages() { if (storages != null) { return storages; diff --git a/src/com/isode/stroke/client/MemoryStorages.java b/src/com/isode/stroke/client/MemoryStorages.java index 9bd97a8..16d235d 100644 --- a/src/com/isode/stroke/client/MemoryStorages.java +++ b/src/com/isode/stroke/client/MemoryStorages.java @@ -4,6 +4,8 @@ */ package com.isode.stroke.client; +import com.isode.stroke.avatars.AvatarMemoryStorage; +import com.isode.stroke.avatars.AvatarStorage; import com.isode.stroke.crypto.CryptoProvider; import com.isode.stroke.disco.CapsMemoryStorage; import com.isode.stroke.disco.CapsStorage; @@ -14,7 +16,7 @@ import com.isode.stroke.vcards.VCardStorage; public class MemoryStorages implements Storages { private VCardStorage vcardStorage; -// private AvatarStorage avatarStorage; + private AvatarStorage avatarStorage; private CapsStorage capsStorage; private RosterStorage rosterStorage; // private HistoryStorage historyStorage; @@ -22,7 +24,7 @@ public class MemoryStorages implements Storages { public MemoryStorages(CryptoProvider crypto) { vcardStorage = new VCardMemoryStorage(crypto); capsStorage = new CapsMemoryStorage(); -// avatarStorage = new AvatarMemoryStorage(); + avatarStorage = new AvatarMemoryStorage(); rosterStorage = new RosterMemoryStorage(); // #ifdef SWIFT_EXPERIMENTAL_HISTORY // historyStorage = new SQLiteHistoryStorage(":memory:"); @@ -46,4 +48,9 @@ public class MemoryStorages implements Storages { return capsStorage; } + @Override + public AvatarStorage getAvatarStorage() { + return avatarStorage; + } + } diff --git a/src/com/isode/stroke/client/Storages.java b/src/com/isode/stroke/client/Storages.java index 188d1c6..25821e5 100644 --- a/src/com/isode/stroke/client/Storages.java +++ b/src/com/isode/stroke/client/Storages.java @@ -4,14 +4,14 @@ */ package com.isode.stroke.client; +import com.isode.stroke.avatars.AvatarStorage; import com.isode.stroke.disco.CapsStorage; import com.isode.stroke.roster.RosterStorage; import com.isode.stroke.vcards.VCardStorage; public interface Storages { VCardStorage getVCardStorage(); -// AvatarStorage getAvatarStorage(); -// CapsStorage getCapsStorage(); + AvatarStorage getAvatarStorage(); RosterStorage getRosterStorage(); // HistoryStorage getHistoryStorage(); CapsStorage getCapsStorage(); |