aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/stanzas/streammgmt
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/stanzas/streammgmt')
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java13
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java13
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java12
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java14
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 000000000..7bc66e9b9
--- /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 000000000..ae6a513aa
--- /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 000000000..4d409fd28
--- /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 000000000..bebfa1a2c
--- /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);
+ }
+
+}