mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 00:02:06 +01:00
Add JingleContentTransportInfo class
This commit is contained in:
parent
acc98b4b2f
commit
d49dc71bae
2 changed files with 42 additions and 0 deletions
|
@ -31,20 +31,35 @@ 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 JingleContentTransport(List<JingleContentTransportCandidate> candidates) {
|
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates) {
|
||||||
|
this(candidates, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected JingleContentTransport(List<JingleContentTransportCandidate> candidates, List<JingleContentTransportInfo> infos) {
|
||||||
if (candidates != null) {
|
if (candidates != null) {
|
||||||
this.candidates = Collections.unmodifiableList(candidates);
|
this.candidates = Collections.unmodifiableList(candidates);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.candidates = Collections.emptyList();
|
this.candidates = Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (infos != null) {
|
||||||
|
this.infos = infos;
|
||||||
|
} else {
|
||||||
|
this.infos = Collections.emptyList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JingleContentTransportCandidate> getCandidates() {
|
public List<JingleContentTransportCandidate> getCandidates() {
|
||||||
return candidates;
|
return candidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<JingleContentTransportInfo> getInfos() {
|
||||||
|
return infos;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getElementName() {
|
public String getElementName() {
|
||||||
return ELEMENT;
|
return ELEMENT;
|
||||||
|
@ -66,6 +81,7 @@ public abstract class JingleContentTransport implements ExtensionElement {
|
||||||
|
|
||||||
xml.rightAngleBracket();
|
xml.rightAngleBracket();
|
||||||
xml.append(candidates);
|
xml.append(candidates);
|
||||||
|
xml.append(infos);
|
||||||
xml.closeElement(this);
|
xml.closeElement(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright 2017 Paul Schaub
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
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