Add more errors

This commit is contained in:
vanitasvitae 2017-06-18 14:11:37 +02:00
parent d3af7cd9c1
commit e5502564b1
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 25 additions and 0 deletions

View File

@ -353,4 +353,29 @@ public class JingleUtil {
throws SmackException.NotConnectedException, InterruptedException {
connection.sendStanza(createErrorUnsupportedInfo(request));
}
public IQ createErrorTieBreak(Jingle request) {
XMPPError.Builder error = XMPPError.getBuilder();
error.setCondition(XMPPError.Condition.conflict)
.addExtension(JingleError.TIE_BREAK);
return IQ.createErrorResponse(request, error);
}
public void sendErrorTieBreak(Jingle request)
throws SmackException.NotConnectedException, InterruptedException {
connection.sendStanza(createErrorTieBreak(request));
}
public IQ createErrorOutOfOrder(Jingle request) {
XMPPError.Builder error = XMPPError.getBuilder();
error.setCondition(XMPPError.Condition.unexpected_request)
.addExtension(JingleError.OUT_OF_ORDER);
return IQ.createErrorResponse(request, error);
}
public void sendErrorOutOfOrder(Jingle request)
throws SmackException.NotConnectedException, InterruptedException {
connection.sendStanza(createErrorOutOfOrder(request));
}
}