|
| Queue (unsigned max_length) |
|
| ~Queue () |
| Deinitializes a queue object. More...
|
|
| Queue (const Queue &)=delete |
|
Queue & | operator= (const Queue &)=delete |
|
unsigned | GetLength () const |
|
bool | IsEmpty () const |
| Determine if the queue is empty, i.e. More...
|
|
bool | IsFull () const |
| Determine if the maximum number of songs has been reached. More...
|
|
bool | IsValidPosition (unsigned position) const |
| Is that a valid position number? More...
|
|
bool | IsValidOrder (unsigned _order) const |
| Is that a valid order number? More...
|
|
int | IdToPosition (unsigned id) const |
|
int | PositionToId (unsigned position) const |
|
gcc_pure unsigned | OrderToPosition (unsigned _order) const noexcept |
|
gcc_pure unsigned | PositionToOrder (unsigned position) const noexcept |
|
gcc_pure uint8_t | GetPriorityAtPosition (unsigned position) const noexcept |
|
const Item & | GetOrderItem (unsigned i) const |
|
uint8_t | GetOrderPriority (unsigned i) const |
|
DetachedSong & | Get (unsigned position) const |
| Returns the song at the specified position. More...
|
|
DetachedSong & | GetOrder (unsigned _order) const |
| Returns the song at the specified order number. More...
|
|
bool | IsNewerAtPosition (unsigned position, uint32_t _version) const |
| Is the song at the specified position newer than the specified version? More...
|
|
gcc_pure int | GetNextOrder (unsigned order) const noexcept |
| Returns the order number following the specified one. More...
|
|
void | IncrementVersion () noexcept |
| Increments the queue's version number. More...
|
|
void | ModifyAtPosition (unsigned position) |
| Marks the specified song as "modified". More...
|
|
void | ModifyAtOrder (unsigned order) noexcept |
| Marks the specified song as "modified". More...
|
|
unsigned | Append (DetachedSong &&song, uint8_t priority) |
| Appends a song to the queue and returns its position. More...
|
|
void | SwapPositions (unsigned position1, unsigned position2) noexcept |
| Swaps two songs, addressed by their position. More...
|
|
void | SwapOrders (unsigned order1, unsigned order2) |
| Swaps two songs, addressed by their order number. More...
|
|
unsigned | MoveOrder (unsigned from_order, unsigned to_order) noexcept |
| Moves a song to a new position in the "order" list. More...
|
|
unsigned | MoveOrderBefore (unsigned from_order, unsigned to_order) noexcept |
| Moves a song to a new position in the "order" list before the given one. More...
|
|
unsigned | MoveOrderAfter (unsigned from_order, unsigned to_order) noexcept |
| Moves a song to a new position in the "order" list after the given one. More...
|
|
void | MovePostion (unsigned from, unsigned to) noexcept |
| Moves a song to a new position. More...
|
|
void | MoveRange (unsigned start, unsigned end, unsigned to) noexcept |
| Moves a range of songs to a new position. More...
|
|
void | DeletePosition (unsigned position) noexcept |
| Removes a song from the playlist. More...
|
|
void | Clear () noexcept |
| Removes all songs from the playlist. More...
|
|
void | RestoreOrder () |
| Initializes the "order" array, and restores "normal" order. More...
|
|
void | ShuffleOrderRange (unsigned start, unsigned end) |
| Shuffle the order of items in the specified range, ignoring their priorities. More...
|
|
void | ShuffleOrderRangeWithPriority (unsigned start, unsigned end) |
| Shuffle the order of items in the specified range, taking their priorities into account. More...
|
|
void | ShuffleOrder () |
| Shuffles the virtual order of songs, but does not move them physically. More...
|
|
void | ShuffleOrderFirst (unsigned start, unsigned end) |
|
void | ShuffleOrderLastWithPriority (unsigned start, unsigned end) |
| Shuffles the virtual order of the last song in the specified (order) range; only songs which match this song's priority are considered. More...
|
|
void | ShuffleRange (unsigned start, unsigned end) |
| Shuffles a (position) range in the queue. More...
|
|
bool | SetPriority (unsigned position, uint8_t priority, int after_order, bool reorder=true) |
|
bool | SetPriorityRange (unsigned start_position, unsigned end_position, uint8_t priority, int after_order) |
|
A queue of songs.
This is the backend of the playlist: it contains an ordered list of songs.
Songs can be addressed in three possible ways:
- the position in the queue
- the unique id (which stays the same, regardless of moves)
- the order number (which only differs from "position" in random mode)
Definition at line 44 of file Queue.hxx.