aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/stanzas
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/stanzas')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java13
1 files changed, 13 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 5ea4619f..27d6b9e3 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
@@ -43,4 +43,17 @@ public class Content extends Element {
return transport.getChildren();
}
}
+
+ public String getUsedCandidate() {
+ Element transport = this.findChild("transport", "urn:xmpp:jingle:transports:s5b:1");
+ if (transport==null) {
+ return null;
+ }
+ Element usedCandidate = transport.findChild("candidate-used");
+ if (usedCandidate==null) {
+ return null;
+ } else {
+ return usedCandidate.getAttribute("cid");
+ }
+ }
}