aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/stanzas
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-17 14:52:10 +0200
committerAndreas Straub <andy@strb.org>2014-04-18 00:17:34 +0200
commit07cf07ad58b9e99d9b63da1e00529c4e3bda721f (patch)
treea1dc28f88ce193f9d6e7ae84dac344d64570d0b2 /src/eu/siacs/conversations/xmpp/jingle/stanzas
parent8006931f80fcba014c141bc726307ceea782f4fe (diff)
lot of cleanup in jingle part
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/stanzas')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
index 79e04610..3cd30251 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
@@ -77,6 +77,14 @@ public class Content extends Element {
}
}
+ public boolean hasCandidateError() {
+ Element transport = this.findChild("transport", "urn:xmpp:jingle:transports:s5b:1");
+ if (transport==null) {
+ return false;
+ }
+ return transport.hasChild("candidate-error");
+ }
+
public void setUsedCandidate(String transportId, String cid) {
Element transport = this.findChild("transport", "urn:xmpp:jingle:transports:s5b:1");
if (transport==null) {
@@ -95,4 +103,22 @@ public class Content extends Element {
}
transport.addChild(candidate);
}
+
+ public void setFileOffer(Element fileOffer) {
+ Element description = this.findChild("description", "urn:xmpp:jingle:apps:file-transfer:3");
+ if (description==null) {
+ description = this.addChild("description", "urn:xmpp:jingle:apps:file-transfer:3");
+ }
+ description.addChild(fileOffer);
+ }
+
+ public void setCandidateError(String transportId) {
+ Element transport = this.findChild("transport", "urn:xmpp:jingle:transports:s5b:1");
+ if (transport==null) {
+ transport = this.addChild("transport", "urn:xmpp:jingle:transports:s5b:1");
+ }
+ transport.setAttribute("sid", transportId);
+ transport.clearChildren();
+ transport.addChild("candidate-error");
+ }
}