aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java
new file mode 100644
index 00000000..961277cb
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java
@@ -0,0 +1,33 @@
+package de.thedevstack.conversationsplus.xmpp.pubsub;
+
+import eu.siacs.conversations.xml.Element;
+import eu.siacs.conversations.xmpp.stanzas.IqPacket;
+
+/**
+ * Created by tzur on 15.01.2016.
+ */
+public class PubSubPacket extends IqPacket {
+ public static final String NAMESPACE = "http://jabber.org/protocol/pubsub";
+ public static final String ELEMENT_NAME = "pubsub";
+ private Element pubSubElement;
+
+ public PubSubPacket(IqPacket.TYPE type) {
+ super(type);
+ this.pubSubElement = super.addChild(PubSubPacket.ELEMENT_NAME, PubSubPacket.NAMESPACE);
+ }
+
+ @Override
+ public Element addChild(Element child) {
+ return this.pubSubElement.addChild(child);
+ }
+
+ @Override
+ public Element addChild(String name) {
+ return this.pubSubElement.addChild(name);
+ }
+
+ @Override
+ public Element addChild(String name, String xmlns) {
+ return this.pubSubElement.addChild(name, xmlns);
+ }
+}