35 lines
696 B
Java
35 lines
696 B
Java
|
package org.webrtc;
|
||
|
|
||
|
import java.util.Locale;
|
||
|
public class SessionDescription {
|
||
|
public final String description;
|
||
|
public final Type type;
|
||
|
|
||
|
public enum Type {
|
||
|
OFFER,
|
||
|
PRANSWER,
|
||
|
ANSWER,
|
||
|
ROLLBACK;
|
||
|
|
||
|
public String canonicalForm() {
|
||
|
return name().toLowerCase(Locale.US);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@CalledByNative
|
||
|
public SessionDescription(Type type, String str) {
|
||
|
this.type = type;
|
||
|
this.description = str;
|
||
|
}
|
||
|
|
||
|
@CalledByNative
|
||
|
public String getDescription() {
|
||
|
return this.description;
|
||
|
}
|
||
|
|
||
|
@CalledByNative
|
||
|
public String getTypeInCanonicalForm() {
|
||
|
return this.type.canonicalForm();
|
||
|
}
|
||
|
}
|