[extensions] Add OutgoingFileTransfer.setCallback()

Some methods of OutgoingFileTransfer take already the
NegotiationProgress callback as argument, some do not. The API is not
ideal, and adding a setter for the callback at least makes it possible
to always have the callback.
This commit is contained in:
Florian Schmaus 2021-03-14 17:52:12 +01:00
parent f2b44f65d9
commit c564c89c40
1 changed files with 4 additions and 0 deletions

View File

@ -324,6 +324,10 @@ public class OutgoingFileTransfer extends FileTransfer {
transferThread.start();
}
public void setCallback(NegotiationProgress negotiationProcess) {
this.callback = negotiationProcess;
}
private void handleXMPPException(XMPPErrorException e) {
StanzaError error = e.getStanzaError();
if (error != null) {