2020-04-04 08:45:42 +00:00
|
|
|
package eu.siacs.conversations.xmpp.jingle;
|
|
|
|
|
2020-04-04 14:51:51 +00:00
|
|
|
import com.google.common.collect.ArrayListMultimap;
|
|
|
|
|
2020-04-04 08:45:42 +00:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class SessionDescriptionBuilder {
|
|
|
|
private int version;
|
|
|
|
private String name;
|
|
|
|
private String connectionData;
|
2020-04-04 14:51:51 +00:00
|
|
|
private ArrayListMultimap<String,String> attributes;
|
2020-04-04 08:45:42 +00:00
|
|
|
private List<SessionDescription.Media> media;
|
|
|
|
|
|
|
|
public SessionDescriptionBuilder setVersion(int version) {
|
|
|
|
this.version = version;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public SessionDescriptionBuilder setName(String name) {
|
|
|
|
this.name = name;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public SessionDescriptionBuilder setConnectionData(String connectionData) {
|
|
|
|
this.connectionData = connectionData;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2020-04-04 14:51:51 +00:00
|
|
|
public SessionDescriptionBuilder setAttributes(ArrayListMultimap<String,String> attributes) {
|
2020-04-04 08:45:42 +00:00
|
|
|
this.attributes = attributes;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public SessionDescriptionBuilder setMedia(List<SessionDescription.Media> media) {
|
|
|
|
this.media = media;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public SessionDescription createSessionDescription() {
|
|
|
|
return new SessionDescription(version, name, connectionData, attributes, media);
|
|
|
|
}
|
|
|
|
}
|