mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-18 00:27:57 +01:00
Merge branch 'singleJingleTransport' into jingle2
This commit is contained in:
commit
5eba48b7d8
1 changed files with 6 additions and 10 deletions
|
@ -31,13 +31,13 @@ public abstract class JingleContentTransport implements ExtensionElement {
|
||||||
public static final String ELEMENT = "transport";
|
public static final String ELEMENT = "transport";
|
||||||
|
|
||||||
protected final List<JingleContentTransportCandidate> candidates;
|
protected final List<JingleContentTransportCandidate> candidates;
|
||||||
protected final List<JingleContentTransportInfo> infos;
|
protected final JingleContentTransportInfo info;
|
||||||
|
|
||||||
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates) {
|
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates) {
|
||||||
this(candidates, null);
|
this(candidates, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates, List<JingleContentTransportInfo> infos) {
|
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates, JingleContentTransportInfo info) {
|
||||||
if (candidates != null) {
|
if (candidates != null) {
|
||||||
this.candidates = Collections.unmodifiableList(candidates);
|
this.candidates = Collections.unmodifiableList(candidates);
|
||||||
}
|
}
|
||||||
|
@ -45,19 +45,15 @@ public abstract class JingleContentTransport implements ExtensionElement {
|
||||||
this.candidates = Collections.emptyList();
|
this.candidates = Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infos != null) {
|
this.info = info;
|
||||||
this.infos = infos;
|
|
||||||
} else {
|
|
||||||
this.infos = Collections.emptyList();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JingleContentTransportCandidate> getCandidates() {
|
public List<JingleContentTransportCandidate> getCandidates() {
|
||||||
return candidates;
|
return candidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JingleContentTransportInfo> getInfos() {
|
public JingleContentTransportInfo getInfo() {
|
||||||
return infos;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,7 +77,7 @@ public abstract class JingleContentTransport implements ExtensionElement {
|
||||||
|
|
||||||
xml.rightAngleBracket();
|
xml.rightAngleBracket();
|
||||||
xml.append(candidates);
|
xml.append(candidates);
|
||||||
xml.append(infos);
|
xml.optElement(info);
|
||||||
xml.closeElement(this);
|
xml.closeElement(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue