[−][src]Type Definition libmtp_sys::bindings::LIBMTP_progressfunc_t
type LIBMTP_progressfunc_t = Option<unsafe extern "C" fn(sent: u64, total: u64, data: *const c_void) -> c_int>;
The callback type definition. Notice that a progress percentage ratio
is easy to calculate by dividing sent
by
total
.
@param sent the number of bytes sent so far
@param total the total number of bytes to send
@param data a user-defined dereferencable pointer
@return if anything else than 0 is returned, the current transfer will be
interrupted / cancelled.