|
This returns a long list of all tracks available on the current MTP device. Typical usage:
LIBMTP_track_t *tracklist;
tracklist = LIBMTP_Get_Tracklisting_With_Callback(device, callback, data);
while (tracklist != NULL) {
LIBMTP_track_t *tmp;
// Do something on each element in the list here...
tmp = tracklist;
tracklist = tracklist->next;
LIBMTP_destroy_track_t(tmp);
}
- Parameters:
-
| device | a pointer to the device to get the track listing for. |
| callback | a function to be called during the tracklisting retrieveal for displaying progress bars etc, or NULL if you don't want any callbacks. |
| data | a user-defined pointer that is passed along to the progress function in order to pass along some user defined data to the progress updates. If not used, set this to NULL. |
- Returns:
- a list of tracks that can be followed using the
next field of the LIBMTP_track_t data structure. Each of the metadata tags must be freed after use, and may contain only partial metadata information, i.e. one or several fields may be NULL or 0.
- See also:
- LIBMTP_Get_Trackmetadata()
|