[−][src]Function transmission_sys::tr_torrentSetCompletenessCallback
pub unsafe extern "C" fn tr_torrentSetCompletenessCallback(
torrent: *mut tr_torrent,
func: tr_torrent_completeness_func,
user_data: *mut c_void
)
Register to be notified whenever a torrent's "completeness" changes. This will be called, for example, when a torrent finishes downloading and changes from TR_LEECH to either TR_SEED or TR_PARTIAL_SEED.
func is invoked FROM LIBTRANSMISSION'S THREAD! This means func must be fast (to avoid blocking peers), shouldn't call libtransmission functions (to avoid deadlock), and shouldn't modify client-level memory without using a mutex!
@see tr_completeness