2015-12-14 13:55:50 -05:00
|
|
|
/*
|
2013-12-22 22:21:19 -05:00
|
|
|
* Copyright 2013 (c) Anna Schumaker.
|
2015-12-14 13:55:50 -05:00
|
|
|
*
|
|
|
|
* The temporary queue manager controls access to any temporary
|
|
|
|
* queues created by the user. When saving to disk:
|
|
|
|
*
|
|
|
|
* length(tempq_list)
|
|
|
|
* flags num_tracks track_0 track_1 ... track_N
|
|
|
|
* flags num_tracks track_0 track_1 ... track_N
|
2013-12-22 22:21:19 -05:00
|
|
|
*/
|
2014-06-21 09:37:47 -04:00
|
|
|
#ifndef OCARINA_CORE_DECK_H
|
|
|
|
#define OCARINA_CORE_DECK_H
|
2013-12-22 22:21:19 -05:00
|
|
|
|
2014-06-05 10:19:22 -04:00
|
|
|
#include <core/queue.h>
|
2014-05-31 09:09:44 -04:00
|
|
|
|
2015-12-13 09:27:52 -05:00
|
|
|
|
|
|
|
/* Called to initialize the temporary queue manager. */
|
|
|
|
void tempq_init(struct queue_ops *);
|
|
|
|
|
2015-12-14 10:56:39 -05:00
|
|
|
/* Called to deinitialize the temporary queue manager. */
|
|
|
|
void tempq_deinit();
|
|
|
|
|
2015-12-14 11:08:17 -05:00
|
|
|
/* Called to save the temporary queue list. */
|
|
|
|
void tempq_save(struct queue *, enum queue_flags);
|
|
|
|
|
2015-12-14 09:05:54 -05:00
|
|
|
|
|
|
|
/* Called to allocate a new temporary queue. */
|
2016-01-21 10:42:20 -05:00
|
|
|
struct queue *tempq_alloc(unsigned int);
|
2015-12-14 09:05:54 -05:00
|
|
|
|
2015-12-14 09:26:58 -05:00
|
|
|
/* Called to free a temporary queue. */
|
|
|
|
void tempq_free(struct queue *);
|
|
|
|
|
2015-12-14 09:50:38 -05:00
|
|
|
/* Called to find a temporary queue by index. */
|
|
|
|
struct queue *tempq_get(unsigned int);
|
|
|
|
|
2016-01-13 16:23:37 -05:00
|
|
|
/* Called to find the index of a temporary queue. */
|
|
|
|
unsigned int tempq_index(struct queue *);
|
|
|
|
|
2015-12-14 10:01:08 -05:00
|
|
|
/* Called to move a temporary queue to a new index in the list. */
|
|
|
|
void tempq_move(struct queue *, unsigned int);
|
|
|
|
|
2015-12-14 10:24:36 -05:00
|
|
|
/* Called to find the next track to play. */
|
|
|
|
struct track *tempq_next();
|
|
|
|
|
|
|
|
/* Called to find the number of temporary queues currently allocated. */
|
|
|
|
unsigned int tempq_count();
|
|
|
|
|
2016-06-07 08:59:43 -04:00
|
|
|
/* Called to tell temporary queues that a track has been updated. */
|
|
|
|
void tempq_updated(struct track *);
|
|
|
|
|
2014-06-21 09:37:47 -04:00
|
|
|
#endif /* OCARINA_CORE_DECK_H */
|