1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-24 04:52:05 +01:00

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

View file

@ -353,4 +353,29 @@ public class JingleUtil {
throws SmackException.NotConnectedException, InterruptedException { throws SmackException.NotConnectedException, InterruptedException {
connection.sendStanza(createErrorUnsupportedInfo(request)); 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));
}
} }