aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/stanzas/streammgmt
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-10 19:22:13 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-11 02:53:10 +0100
commit08023210ba875f3cd088eca2b4b3df7410966344 (patch)
tree4cfbbe21353559664ccbc4c5ffb7e33cb8e6ea4a /src/eu/siacs/conversations/xmpp/stanzas/streammgmt
parente441005c8768091e9e975f3d5f797fab8466861b (diff)
basic stream managment functionality
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 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);
+ }
+
+}