1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 20:42:06 +01:00

Merge branch 'TransportInfo' into jingle

This commit is contained in:
vanitasvitae 2017-06-07 23:29:03 +02:00
commit f528e4dd9d
2 changed files with 26 additions and 0 deletions

View file

@ -31,20 +31,35 @@ public abstract class JingleContentTransport implements ExtensionElement {
public static final String ELEMENT = "transport";
protected final List<JingleContentTransportCandidate> candidates;
protected final List<JingleContentTransportInfo> infos;
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates) {
this(candidates, null);
}
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates, List<JingleContentTransportInfo> infos) {
if (candidates != null) {
this.candidates = Collections.unmodifiableList(candidates);
}
else {
this.candidates = Collections.emptyList();
}
if (infos != null) {
this.infos = infos;
} else {
this.infos = Collections.emptyList();
}
}
public List<JingleContentTransportCandidate> getCandidates() {
return candidates;
}
public List<JingleContentTransportInfo> getInfos() {
return infos;
}
@Override
public String getElementName() {
return ELEMENT;
@ -66,6 +81,7 @@ public abstract class JingleContentTransport implements ExtensionElement {
xml.rightAngleBracket();
xml.append(candidates);
xml.append(infos);
xml.closeElement(this);
}

View file

@ -0,0 +1,10 @@
package org.jivesoftware.smackx.jingle.element;
import org.jivesoftware.smack.packet.NamedElement;
/**
* Abstract JingleContentTransportInfo element.
*/
public abstract class JingleContentTransportInfo implements NamedElement {
}