aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
index 55700609..77a73643 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
@@ -7,18 +7,18 @@ public class JinglePacket extends IqPacket {
Content content = null;
Reason reason = null;
Element jingle = new Element("jingle");
-
+
@Override
public Element addChild(Element child) {
if ("jingle".equals(child.getName())) {
Element contentElement = child.findChild("content");
- if (contentElement!=null) {
+ if (contentElement != null) {
this.content = new Content();
this.content.setChildren(contentElement.getChildren());
this.content.setAttributes(contentElement.getAttributes());
}
Element reasonElement = child.findChild("reason");
- if (reasonElement!=null) {
+ if (reasonElement != null) {
this.reason = new Reason();
this.reason.setChildren(reasonElement.getChildren());
this.reason.setAttributes(reasonElement.getAttributes());
@@ -27,33 +27,33 @@ public class JinglePacket extends IqPacket {
}
return child;
}
-
+
public JinglePacket setContent(Content content) {
this.content = content;
return this;
}
-
+
public Content getJingleContent() {
- if (this.content==null) {
+ if (this.content == null) {
this.content = new Content();
}
return this.content;
}
-
+
public JinglePacket setReason(Reason reason) {
this.reason = reason;
return this;
}
-
+
public Reason getReason() {
return this.reason;
}
-
+
private void build() {
this.children.clear();
this.jingle.clearChildren();
this.jingle.setAttribute("xmlns", "urn:xmpp:jingle:1");
- if (this.content!=null) {
+ if (this.content != null) {
jingle.addChild(this.content);
}
if (this.reason != null) {
@@ -66,11 +66,11 @@ public class JinglePacket extends IqPacket {
public String getSessionId() {
return this.jingle.getAttribute("sid");
}
-
+
public void setSessionId(String sid) {
this.jingle.setAttribute("sid", sid);
}
-
+
@Override
public String toString() {
this.build();
@@ -80,11 +80,11 @@ public class JinglePacket extends IqPacket {
public void setAction(String action) {
this.jingle.setAttribute("action", action);
}
-
+
public String getAction() {
return this.jingle.getAttribute("action");
}
-
+
public void setInitiator(String initiator) {
this.jingle.setAttribute("initiator", initiator);
}