aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/xmpp/IqPacket.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-01-30 16:42:35 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-01-30 16:42:35 +0100
commit6c5c3ac2decac75ec3208d47912e67c4e1a33548 (patch)
treec6cdcc5d76608369da08eb76891c48ffefbb9a48 /src/de/gultsch/chat/xmpp/IqPacket.java
parentad11dab6359a1eb2b6921d36117093066999fb96 (diff)
first draft on xml parser and communication. a long way to go. code definitly not perfect. will refactor asap
Diffstat (limited to 'src/de/gultsch/chat/xmpp/IqPacket.java')
-rw-r--r--src/de/gultsch/chat/xmpp/IqPacket.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/de/gultsch/chat/xmpp/IqPacket.java b/src/de/gultsch/chat/xmpp/IqPacket.java
new file mode 100644
index 00000000..062bf1c0
--- /dev/null
+++ b/src/de/gultsch/chat/xmpp/IqPacket.java
@@ -0,0 +1,26 @@
+package de.gultsch.chat.xmpp;
+
+import de.gultsch.chat.xml.Element;
+
+public class IqPacket extends Element {
+
+ public static final int TYPE_SET = 0;
+ public static final int TYPE_RESULT = 1;
+
+ private IqPacket(String name) {
+ super(name);
+ }
+
+ public IqPacket(String id, int type) {
+ super("iq");
+ this.setAttribute("id",id);
+ switch (type) {
+ case TYPE_SET:
+ this.setAttribute("type", "set");
+ break;
+ default:
+ break;
+ }
+ }
+
+}