Definitions of the most important structures track and track_list
More...
Go to the source code of this file.
Definitions of the most important structures track and track_list
| #define FLAG_BOOKMARKED 4 |
this track is within the cache
this track is currently pause
this track is currently being played
| #define TRACK |
( |
|
LST, |
|
|
|
ID |
|
) |
| (LST->entries[ID].name ? &LST->entries[ID] : LST->entries[ID].href) |
| void track_destroy |
( |
struct track * |
track | ) |
|
Add a single track to an existing track_list.
- Parameters
-
| list | The list receiving the new track |
| track | The track, which will be added to list |
| bool track_list_del |
( |
struct track_list * |
list, |
|
|
size_t |
track_id |
|
) |
| |
| void track_list_destroy |
( |
struct track_list * |
list, |
|
|
bool |
free_trackdata |
|
) |
| |
Free the memory occupied by a track_list.
Do not use the list after calling this function. Do not use any of the tracks within the list if free_trackdata is set to true.
- Parameters
-
| list | the list to free |
| free_trackdata | if true every single track within the list will be freed too |
| struct track* track_list_get |
( |
struct track_list * |
list, |
|
|
char * |
permalink |
|
) |
| |
Check if list contains a track, identified by its permalink and return it.
- Parameters
-
| list | The list to search in |
| permalink | The permalink to use for searching |
- Returns
- The track, if found,
NULL otherwise
Merge an array of track_lists.
The resulting list is not sorted, entries from all lists are simply concatinated. Both input lists are not modified, call track_list_destroy() if they are no longer needed. The struct tracks within the list are duplicated, the struct tracks' members are not - set free_trackdata to false!
- Parameters
-
| lists | A NULL-terminated array containing the track_lists to be merged into one |
- Returns
- a new list containing all tracks all lists
Sort a track_list by creation time.
- Parameters
-
| list | The list to be sorted |