/* * Copyright 2013 (c) Anna Schumaker. * * Queues are lists of tracks that the user has requested to play next. * Users of queues are expected to implement their own save and load functions, * and to provide a filled out queue_ops structure during initialization. */ #ifndef OCARINA_CORE_QUEUE_H #define OCARINA_CORE_QUEUE_H #include #include struct queue; struct queue_ops { /* Called to tell a higher layer that a queue has been initialized. */ void *(*qop_init)(struct queue *, void *); }; struct queue { void *q_private; /* The queue's private data. */ const struct queue_ops *q_ops; /* The queue's operations vector. */ }; /* Called to initialize a queue. */ void queue_init(struct queue *, const struct queue_ops *, void *); #endif /* OCARINA_CORE_QUEUE_H */