[][src]Function discid_sys::discid_read_sparse

pub unsafe extern "C" fn discid_read_sparse(
    d: *mut DiscId,
    device: *const c_char,
    features: c_uint
) -> c_int

Read the disc in the given CD-ROM/DVD-ROM drive extracting only the TOC and additionally specified features.

This function will always read the TOC, but additional features like ::DISCID_FEATURE_MCN and ::DISCID_FEATURE_ISRC can be set using the features parameter. Multiple features can be set using bitwise OR.

If you only want to generate a disc ID, you only need the TOC, so set features to 0: \code discid_read_sparse(disc, device, 0) \endcode This is a bit more verbose, but equivalent since ::DISCID_FEATURE_READ is always implied: \code discid_read_sparse(disc, device, DISCID_FEATURE_READ) \endcode

If you want to read all features available, you can use discid_read().

On error, this function returns false and sets the error message which you can access using discid_get_error_msg(). In this case, the other functions won't return meaningful values and should not be used.

This function may be used multiple times with the same DiscId object.

\since libdiscid 0.5.0

@param d a DiscId object created by discid_new() @param device an operating system dependent device identifier, or NULL @param features a list of bit flags from the enum ::discid_feature @return true if successful, or false on error.