diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-01-13 16:10:09 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-01-13 16:10:09 +0100 |
commit | 8644c4676a5fda9d642244ff70e72c5fe524a24d (patch) | |
tree | aa3638db5eb30c25cbd250f675a5a1e61b2a99ab /src/main/java/de/thedevstack/conversationsplus/generator | |
parent | 0fe5ce481fe72d3821a93b2792d6ae16b04bec7d (diff) |
Moved all avatar related work to AvatarService
- fetchAvatar, fetchAvatarPep, fetchAvatarVcard, checkForAvatar moved from XmppConnectionService to AvatarService
- Several unused imports removed
- XmppSendUtil introduced to enable presencePacket and iqPacket sending without using XmppConnectionService since the account has everything needed
- UiUpdateHelper introduced to enable UI updates without using XmppConnectionService directly
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/generator')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java b/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java index 3d3dd360..7409b4fd 100644 --- a/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java +++ b/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java @@ -52,7 +52,7 @@ public class IqGenerator extends AbstractGenerator { return packet; } - protected IqPacket retrieve(String node, Element item) { + protected static IqPacket retrieve(String node, Element item) { final IqPacket packet = new IqPacket(IqPacket.TYPE.GET); final Element pubsub = packet.addChild("pubsub", "http://jabber.org/protocol/pubsub"); @@ -86,7 +86,7 @@ public class IqGenerator extends AbstractGenerator { return publish("urn:xmpp:avatar:metadata", item); } - public IqPacket retrievePepAvatar(final Avatar avatar) { + public static IqPacket retrievePepAvatar(final Avatar avatar) { final Element item = new Element("item"); item.setAttribute("id", avatar.sha1sum); final IqPacket packet = retrieve("urn:xmpp:avatar:data", item); @@ -94,14 +94,14 @@ public class IqGenerator extends AbstractGenerator { return packet; } - public IqPacket retrieveVcardAvatar(final Avatar avatar) { + public static IqPacket retrieveVcardAvatar(final Avatar avatar) { final IqPacket packet = new IqPacket(IqPacket.TYPE.GET); packet.setTo(avatar.owner); packet.addChild("vCard", "vcard-temp"); return packet; } - public IqPacket retrieveAvatarMetaData(final Jid to) { + public static IqPacket retrieveAvatarMetaData(final Jid to) { final IqPacket packet = retrieve("urn:xmpp:avatar:metadata", null); if (to != null) { packet.setTo(to); |