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:
commit
f528e4dd9d
2 changed files with 26 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
}
|
Loading…
Reference in a new issue