mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
Presence class cleanup
This commit is contained in:
parent
66be759ce6
commit
644ddf3d4c
1 changed files with 4 additions and 4 deletions
|
@ -57,6 +57,8 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||||
*/
|
*/
|
||||||
public class Presence extends Packet {
|
public class Presence extends Packet {
|
||||||
|
|
||||||
|
public static final String ELEMENT = "presence";
|
||||||
|
|
||||||
private Type type = Type.available;
|
private Type type = Type.available;
|
||||||
private String status = null;
|
private String status = null;
|
||||||
private int priority = Integer.MIN_VALUE;
|
private int priority = Integer.MIN_VALUE;
|
||||||
|
@ -69,7 +71,6 @@ public class Presence extends Packet {
|
||||||
* @param type the type.
|
* @param type the type.
|
||||||
*/
|
*/
|
||||||
public Presence(Type type) {
|
public Presence(Type type) {
|
||||||
super();
|
|
||||||
setType(type);
|
setType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +83,6 @@ public class Presence extends Packet {
|
||||||
* @param mode the mode type for this presence update.
|
* @param mode the mode type for this presence update.
|
||||||
*/
|
*/
|
||||||
public Presence(Type type, String status, int priority, Mode mode) {
|
public Presence(Type type, String status, int priority, Mode mode) {
|
||||||
super();
|
|
||||||
setType(type);
|
setType(type);
|
||||||
setStatus(status);
|
setStatus(status);
|
||||||
setPriority(priority);
|
setPriority(priority);
|
||||||
|
@ -227,7 +227,7 @@ public class Presence extends Packet {
|
||||||
@Override
|
@Override
|
||||||
public XmlStringBuilder toXML() {
|
public XmlStringBuilder toXML() {
|
||||||
XmlStringBuilder buf = new XmlStringBuilder();
|
XmlStringBuilder buf = new XmlStringBuilder();
|
||||||
buf.halfOpenElement("presence");
|
buf.halfOpenElement(ELEMENT);
|
||||||
buf.xmlnsAttribute(getXmlns());
|
buf.xmlnsAttribute(getXmlns());
|
||||||
buf.xmllangAttribute(getLanguage());
|
buf.xmllangAttribute(getLanguage());
|
||||||
addCommonAttributes(buf);
|
addCommonAttributes(buf);
|
||||||
|
@ -250,7 +250,7 @@ public class Presence extends Packet {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
buf.append(error.toXML());
|
buf.append(error.toXML());
|
||||||
}
|
}
|
||||||
buf.closeElement("presence");
|
buf.closeElement(ELEMENT);
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue