IqPacket.java
1package de.gultsch.chat.xmpp;
2
3import de.gultsch.chat.xml.Element;
4
5public class IqPacket extends Element {
6
7 public static final int TYPE_SET = 0;
8 public static final int TYPE_RESULT = 1;
9
10 private IqPacket(String name) {
11 super(name);
12 }
13
14 public IqPacket(String id, int type) {
15 super("iq");
16 this.setAttribute("id",id);
17 switch (type) {
18 case TYPE_SET:
19 this.setAttribute("type", "set");
20 break;
21 default:
22 break;
23 }
24 }
25
26}