remove support for sm:2

This commit is contained in:
Daniel Gultsch 2022-09-03 12:16:06 +02:00
parent cb1d7c69a1
commit 00dd9a8058
8 changed files with 745 additions and 411 deletions

View file

@ -25,6 +25,9 @@ public final class Namespace {
public static final String NICK = "http://jabber.org/protocol/nick";
public static final String FLEXIBLE_OFFLINE_MESSAGE_RETRIEVAL = "http://jabber.org/protocol/offline";
public static final String BIND = "urn:ietf:params:xml:ns:xmpp-bind";
public static final String BIND2 = "urn:xmpp:bind2:0";
public static final String STREAM_MANAGEMENT = "urn:xmpp:sm:3";
public static final String CSI = "urn:xmpp:csi:0";
public static final String BOOKMARKS_CONVERSION = "urn:xmpp:bookmarks-conversion:0";
public static final String BOOKMARKS = "storage:bookmarks";
public static final String SYNCHRONIZATION = "im.quicksy.synchronization:0";

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,11 @@
package eu.siacs.conversations.xmpp.stanzas.csi;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.stanzas.AbstractStanza;
public class ActivePacket extends AbstractStanza {
public ActivePacket() {
super("active");
setAttribute("xmlns", "urn:xmpp:csi:0");
setAttribute("xmlns", Namespace.CSI);
}
}

View file

@ -1,10 +1,11 @@
package eu.siacs.conversations.xmpp.stanzas.csi;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.stanzas.AbstractStanza;
public class InactivePacket extends AbstractStanza {
public InactivePacket() {
super("inactive");
setAttribute("xmlns", "urn:xmpp:csi:0");
setAttribute("xmlns", Namespace.CSI);
}
}

View file

@ -1,12 +1,13 @@
package eu.siacs.conversations.xmpp.stanzas.streammgmt;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.stanzas.AbstractStanza;
public class AckPacket extends AbstractStanza {
public AckPacket(int sequence, int smVersion) {
public AckPacket(final int sequence) {
super("a");
this.setAttribute("xmlns", "urn:xmpp:sm:" + smVersion);
this.setAttribute("xmlns", Namespace.STREAM_MANAGEMENT);
this.setAttribute("h", Integer.toString(sequence));
}

View file

@ -1,12 +1,13 @@
package eu.siacs.conversations.xmpp.stanzas.streammgmt;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.stanzas.AbstractStanza;
public class EnablePacket extends AbstractStanza {
public EnablePacket(int smVersion) {
public EnablePacket() {
super("enable");
this.setAttribute("xmlns", "urn:xmpp:sm:" + smVersion);
this.setAttribute("xmlns", Namespace.STREAM_MANAGEMENT);
this.setAttribute("resume", "true");
}

View file

@ -1,12 +1,13 @@
package eu.siacs.conversations.xmpp.stanzas.streammgmt;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.stanzas.AbstractStanza;
public class RequestPacket extends AbstractStanza {
public RequestPacket(int smVersion) {
public RequestPacket() {
super("r");
this.setAttribute("xmlns", "urn:xmpp:sm:" + smVersion);
this.setAttribute("xmlns", Namespace.STREAM_MANAGEMENT);
}
}

View file

@ -1,12 +1,13 @@
package eu.siacs.conversations.xmpp.stanzas.streammgmt;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.stanzas.AbstractStanza;
public class ResumePacket extends AbstractStanza {
public ResumePacket(String id, int sequence, int smVersion) {
public ResumePacket(final String id, final int sequence) {
super("resume");
this.setAttribute("xmlns", "urn:xmpp:sm:" + smVersion);
this.setAttribute("xmlns", Namespace.STREAM_MANAGEMENT);
this.setAttribute("previd", id);
this.setAttribute("h", Integer.toString(sequence));
}