1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 02:27:58 +01:00

[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

View file

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