|
| static unsigned | queue_length (const struct queue *queue) |
| |
| static bool | queue_is_empty (const struct queue *queue) |
| | Determine if the queue is empty, i.e.
|
| |
| static bool | queue_is_full (const struct queue *queue) |
| | Determine if the maximum number of songs has been reached.
|
| |
| static bool | queue_valid_position (const struct queue *queue, unsigned position) |
| | Is that a valid position number?
|
| |
| static bool | queue_valid_order (const struct queue *queue, unsigned order) |
| | Is that a valid order number?
|
| |
| static int | queue_id_to_position (const struct queue *queue, unsigned id) |
| |
| static int | queue_position_to_id (const struct queue *queue, unsigned position) |
| |
| static unsigned | queue_order_to_position (const struct queue *queue, unsigned order) |
| |
| static unsigned | queue_position_to_order (const struct queue *queue, unsigned position) |
| |
| static struct song * | queue_get (const struct queue *queue, unsigned position) |
| | Returns the song at the specified position.
|
| |
| static struct song * | queue_get_order (const struct queue *queue, unsigned order) |
| | Returns the song at the specified order number.
|
| |
| static bool | queue_song_newer (const struct queue *queue, unsigned position, uint32_t version) |
| | Is the song at the specified position newer than the specified version?
|
| |
| void | queue_init (struct queue *queue, unsigned max_length) |
| | Initialize a queue object.
|
| |
| void | queue_finish (struct queue *queue) |
| | Deinitializes a queue object.
|
| |
| int | queue_next_order (const struct queue *queue, unsigned order) |
| | Returns the order number following the specified one.
|
| |
| void | queue_increment_version (struct queue *queue) |
| | Increments the queue's version number.
|
| |
| void | queue_modify (struct queue *queue, unsigned order) |
| | Marks the specified song as "modified" and increments the version number.
|
| |
| void | queue_modify_all (struct queue *queue) |
| | Marks all songs as "modified" and increments the version number.
|
| |
| unsigned | queue_append (struct queue *queue, struct song *song) |
| | Appends a song to the queue and returns its position.
|
| |
| void | queue_swap (struct queue *queue, unsigned position1, unsigned position2) |
| | Swaps two songs, addressed by their position.
|
| |
| static void | queue_swap_order (struct queue *queue, unsigned order1, unsigned order2) |
| | Swaps two songs, addressed by their order number.
|
| |
| void | queue_move (struct queue *queue, unsigned from, unsigned to) |
| | Moves a song to a new position.
|
| |
| void | queue_move_range (struct queue *queue, unsigned start, unsigned end, unsigned to) |
| | Moves a range of songs to a new position.
|
| |
| void | queue_delete (struct queue *queue, unsigned position) |
| | Removes a song from the playlist.
|
| |
| void | queue_clear (struct queue *queue) |
| | Removes all songs from the playlist.
|
| |
| static void | queue_restore_order (struct queue *queue) |
| | Initializes the "order" array, and restores "normal" order.
|
| |
| void | queue_shuffle_order (struct queue *queue) |
| | Shuffles the virtual order of songs, but does not move them physically.
|
| |
| void | queue_shuffle_order_last (struct queue *queue, unsigned start, unsigned end) |
| | Shuffles the virtual order of the last song in the specified (order) range.
|
| |
| void | queue_shuffle_range (struct queue *queue, unsigned start, unsigned end) |
| | Shuffles a (position) range in the queue.
|
| |