[][src]Function transmission_sys::tr_torrentNew

pub unsafe extern "C" fn tr_torrentNew(
    ctor: *const tr_ctor,
    setme_error: *mut c_int,
    setme_duplicate_id: *mut c_int
) -> *mut tr_torrent

Instantiate a single torrent.

Returns a pointer to the torrent on success, or NULL on failure.

@param ctor the builder struct @param setme_error TR_PARSE_ERR if the parsing failed; TR_PARSE_OK if parsing succeeded and it's not a duplicate; TR_PARSE_DUPLICATE if parsing succeeded but it's a duplicate. @param setme_duplicate_id when setmeError is TR_PARSE_DUPLICATE, this field is set to the duplicate torrent's id.