org.kde.koala

Interface TransferJobSignals

public interface TransferJobSignals

Method Summary
voidcanResume(Job job, long offset)
Emitted if the "put" job found an existing partial file (in which case offset is the size of that file) and emitted by the "get" job if it supports resuming to the given offset - in this case offset is unused)
voiddata(Job job, byte[] data)
Data from the slave has arrived.
voiddataReq(Job job, byte[] data)
Request for data.
voidmimetype(Job job, String type)
Mimetype determined.
voidpermanentRedirection(Job job, KURL fromUrl, KURL toUrl)
Signals a permanent redirection.
voidredirection(Job job, KURL url)
Signals a redirection.

Method Detail

canResume

public void canResume(Job job, long offset)
Emitted if the "put" job found an existing partial file (in which case offset is the size of that file) and emitted by the "get" job if it supports resuming to the given offset - in this case offset is unused)

UNKNOWN:

data

public void data(Job job, byte[] data)
Data from the slave has arrived.

Parameters: job the job that emitted this signal data data received from the slave. End of data (EOD) has been reached if data.size() == 0, however, you should not be certain of data.size() == 0 ever happening (e.g. in case of an error), so you should rely on result() instead.

UNKNOWN: Data from the slave has arrived.

dataReq

public void dataReq(Job job, byte[] data)
Request for data. Please note, that you shouldn't put too large chunks of data in it as this requires copies within the frame work, so you should rather split the data you want to pass here in reasonable chunks (about 1MB maximum)

Parameters: job the job that emitted this signal data buffer to fill with data to send to the slave. An empty buffer indicates end of data. (EOD)

UNKNOWN: Request for data.

mimetype

public void mimetype(Job job, String type)
Mimetype determined.

Parameters: job the job that emitted this signal type the mime type

UNKNOWN: Mimetype determined.

permanentRedirection

public void permanentRedirection(Job job, KURL fromUrl, KURL toUrl)
Signals a permanent redirection. The redirection itself is handled internally.

Parameters: job the job that emitted this signal fromUrl the original URL toUrl the new URL

UNKNOWN: Signals a permanent redirection.

redirection

public void redirection(Job job, KURL url)
Signals a redirection. Use to update the URL shown to the user. The redirection itself is handled internally.

Parameters: job the job that emitted this signal url the new URL

UNKNOWN: Signals a redirection.