pub type LIBMTP_progressfunc_t = Option<unsafe extern "C" fn(sent: u64, total: u64, data: *const c_void) -> c_int>;Expand description
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.
Aliased Type§
pub enum LIBMTP_progressfunc_t {
None,
Some(unsafe extern "C" fn(u64, u64, *const c_void) -> i32),
}