aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/xmpp/IqPacket.java
blob: 062bf1c0f3c988446bdc7cdc84401e9e92e497be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
		}
	}

}