2013-12-22 17:22:40 -05:00
|
|
|
== Files ==
|
|
|
|
ocarina/include/
|
|
|
|
deck.h
|
|
|
|
ocarina/lib/
|
|
|
|
deck.cpp
|
|
|
|
$HOME/.ocarina{-debug}/
|
|
|
|
playlists.lst
|
|
|
|
|
|
|
|
== Depends ==
|
2013-12-28 14:01:38 -05:00
|
|
|
playqueue
|
2013-12-22 17:22:40 -05:00
|
|
|
|
|
|
|
Deck: (lib/deck.cpp)
|
2013-12-28 14:01:38 -05:00
|
|
|
The playqueue deck is used to hold the temporary playqueues created by
|
2013-12-22 17:22:40 -05:00
|
|
|
the user.
|
|
|
|
|
|
|
|
- Deck:
|
2013-12-28 14:01:38 -05:00
|
|
|
list<Playqueue> deck;
|
2013-12-22 17:22:40 -05:00
|
|
|
|
2013-12-23 10:37:22 -05:00
|
|
|
File << deck.size() << endl;
|
2013-12-22 17:22:40 -05:00
|
|
|
File << deck[0] << endl;
|
|
|
|
File << deck[N] << endl;
|
|
|
|
|
|
|
|
- API
|
2013-12-22 22:21:19 -05:00
|
|
|
void deck :: read(File &);
|
|
|
|
void deck :: write(File &);
|
2013-12-28 14:01:38 -05:00
|
|
|
Read or write the playqueue file. This will be called
|
2013-12-22 22:21:19 -05:00
|
|
|
from the audio layer to store state.
|
2013-12-22 17:22:40 -05:00
|
|
|
|
2013-12-28 14:01:38 -05:00
|
|
|
Playqueue *deck :: create();
|
|
|
|
Adds a new playqueue to the end of the deck and returns a
|
2013-12-22 22:21:19 -05:00
|
|
|
pointer to it.
|
2013-12-22 17:22:40 -05:00
|
|
|
|
2013-12-22 22:21:19 -05:00
|
|
|
void deck :: remove(N);
|
2013-12-28 14:01:38 -05:00
|
|
|
Remove playqueue N from the deck.
|
2013-12-22 17:22:40 -05:00
|
|
|
|
2013-12-28 14:01:38 -05:00
|
|
|
Playqueue *deck :: get(N);
|
|
|
|
Return playqueue N from the deck.
|
2013-12-22 17:22:40 -05:00
|
|
|
|
2013-12-22 22:21:19 -05:00
|
|
|
void deck :: move(M, N);
|
2013-12-28 14:01:38 -05:00
|
|
|
Move playqueue at index M to index N.
|
2013-12-22 22:21:19 -05:00
|
|
|
|
2013-12-22 17:22:40 -05:00
|
|
|
unsigned int deck :: next();
|
2013-12-28 14:01:38 -05:00
|
|
|
Iterate through the deck until you find a playqueue with the
|
|
|
|
flag PL_ENABLED set. Call next() on this playqueue and return
|
2013-12-22 17:22:40 -05:00
|
|
|
the result.
|
|
|
|
|
2013-12-28 14:01:38 -05:00
|
|
|
If the playqueue is empty after calling next(), remove it from
|
2013-12-22 17:22:40 -05:00
|
|
|
the deck.
|
2013-12-22 22:21:19 -05:00
|
|
|
|
2013-12-23 10:22:37 -05:00
|
|
|
If there are no playable IDs, throw -1.
|
|
|
|
|
2013-12-22 22:21:19 -05:00
|
|
|
void deck :: reset();
|
2013-12-29 11:45:43 -05:00
|
|
|
This function only exists if CONFIG_TEST is enabled. Erase
|
2013-12-28 14:01:38 -05:00
|
|
|
all the playqueue information and reset the deck list.
|
2013-12-22 22:21:19 -05:00
|
|
|
|
|
|
|
void deck :: print_info();
|
2013-12-29 11:45:43 -05:00
|
|
|
This function only exists if CONFIG_TEST is enabled. Print
|
2013-12-28 14:01:38 -05:00
|
|
|
out helpful stats about the current state of the playqueue deck.
|