diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-10 19:22:13 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-11 02:53:10 +0100 |
commit | 08023210ba875f3cd088eca2b4b3df7410966344 (patch) | |
tree | 4cfbbe21353559664ccbc4c5ffb7e33cb8e6ea4a /src/eu/siacs/conversations/xmpp/stanzas/streammgmt | |
parent | e441005c8768091e9e975f3d5f797fab8466861b (diff) |
basic stream managment functionality
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/stanzas/streammgmt')
4 files changed, 52 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java new file mode 100644 index 00000000..7bc66e9b --- /dev/null +++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java @@ -0,0 +1,13 @@ +package eu.siacs.conversations.xmpp.stanzas.streammgmt; + +import eu.siacs.conversations.xmpp.stanzas.AbstractStanza; + +public class AckPacket extends AbstractStanza { + + public AckPacket(int sequence) { + super("a"); + this.setAttribute("xmlns","urn:xmpp:sm:3"); + this.setAttribute("h", ""+sequence); + } + +} diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java new file mode 100644 index 00000000..ae6a513a --- /dev/null +++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java @@ -0,0 +1,13 @@ +package eu.siacs.conversations.xmpp.stanzas.streammgmt; + +import eu.siacs.conversations.xmpp.stanzas.AbstractStanza; + +public class EnablePacket extends AbstractStanza { + + public EnablePacket() { + super("enable"); + this.setAttribute("xmlns","urn:xmpp:sm:3"); + this.setAttribute("resume", "true"); + } + +} diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java new file mode 100644 index 00000000..4d409fd2 --- /dev/null +++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java @@ -0,0 +1,12 @@ +package eu.siacs.conversations.xmpp.stanzas.streammgmt; + +import eu.siacs.conversations.xmpp.stanzas.AbstractStanza; + +public class RequestPacket extends AbstractStanza { + + public RequestPacket() { + super("r"); + this.setAttribute("xmlns","urn:xmpp:sm:3"); + } + +} diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java new file mode 100644 index 00000000..bebfa1a2 --- /dev/null +++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java @@ -0,0 +1,14 @@ +package eu.siacs.conversations.xmpp.stanzas.streammgmt; + +import eu.siacs.conversations.xmpp.stanzas.AbstractStanza; + +public class ResumePacket extends AbstractStanza { + + public ResumePacket(String id, int sequence) { + super("resume"); + this.setAttribute("xmlns","urn:xmpp:sm:3"); + this.setAttribute("previd", id); + this.setAttribute("h", ""+sequence); + } + +} |