From 259bb446cac55ea7367488dfd63eb2b8a3eb6139 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 11 Apr 2014 22:49:26 +0200 Subject: first file transfer between gajim and conversations. still a lot to do though --- src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/eu/siacs/conversations/xmpp/jingle/stanzas') diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java index 5ea4619f4..27d6b9e36 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"); + } + } } -- cgit v1.2.3