core/queue: Remove qop_save()

This callback is no longer used now that saving happens in the playlist
layer.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-09-07 08:33:13 -04:00
parent 62e494f2af
commit 186367afe0
5 changed files with 2 additions and 20 deletions

View File

@ -126,12 +126,6 @@ static inline struct track *__queue_selected(struct queue *queue, unsigned int p
return track;
}
static inline void __queue_save(struct queue *queue, enum queue_flags flag)
{
if (queue->q_ops && queue_has_flag(queue, flag))
queue->q_ops->qop_save(queue, flag);
}
void queue_init(struct queue *queue, unsigned int flags,
const struct queue_ops *ops, void *data)
{

View File

@ -19,8 +19,8 @@ enum queue_flags {
Q_RANDOM = (1 << 1), /* Queue will pick songs randomly. */
Q_REPEAT = (1 << 2), /* Queue will not remove songs when picked. */
Q_NO_SORT = (1 << 3), /* Queue will not be sorted. */
Q_UNUSED_4 = (1 << 4), /* Queue will be saved when flags change. */
Q_UNUSED_5 = (1 << 5), /* Queue will be saved when sorted. */
Q_UNUSED_4 = (1 << 4), /* Removed: 6.5.4 */
Q_UNUSED_5 = (1 << 5), /* Removed: 6.5.4 */
Q_ADD_FRONT = (1 << 6), /* Queue will add new tracks at the front. */
};
@ -46,9 +46,6 @@ struct queue_ops {
/* Called to tell a higher layer that the queue has been cleared. */
void (*qop_cleared)(struct queue *, unsigned int);
/* Called to have a higher layer save the queue. */
void (*qop_save)(struct queue *, enum queue_flags);
/* Called to tell a higher layer that a track has been updated. */
void (*qop_updated)(struct queue *, unsigned int);
};

View File

@ -50,10 +50,6 @@ static void queue_op_cleared(struct queue *queue, unsigned int n)
count_cleared++;
}
static void queue_op_save(struct queue *queue, enum queue_flags flag)
{
}
static void queue_op_updated(struct queue *queue, unsigned int pos)
{
count_updated++;
@ -67,7 +63,6 @@ static const struct queue_ops test_ops = {
.qop_erase = queue_op_erase,
.qop_removed = queue_op_removed,
.qop_cleared = queue_op_cleared,
.qop_save = queue_op_save,
.qop_updated = queue_op_updated,
};

View File

@ -18,7 +18,6 @@ void test_queue_remove(struct queue *queue, unsigned int n)
{ gui_model_remove(queue->q_private, n); }
void test_queue_clear(struct queue *queue, unsigned int n)
{ gui_model_clear(queue->q_private, n); }
void test_queue_save(struct queue *queue, enum queue_flags flag) {}
void test_queue_update(struct queue *queue, unsigned int n)
{ gui_model_update(queue->q_private, n); }
@ -28,7 +27,6 @@ struct queue_ops test_ops = {
.qop_added = test_queue_add,
.qop_removed = test_queue_remove,
.qop_cleared = test_queue_clear,
.qop_save = test_queue_save,
.qop_updated = test_queue_update,
};

View File

@ -33,7 +33,6 @@ void test_queue_remove(struct queue *queue, unsigned int n)
{ gui_model_remove(queue->q_private, n); }
void test_queue_clear(struct queue *queue, unsigned int n)
{ gui_model_clear(queue->q_private, n); }
void test_queue_save(struct queue *queue, enum queue_flags flag) {}
void test_queue_update(struct queue *queue, unsigned int n)
{ gui_model_update(queue->q_private, n); }
void test_on_load(struct track *track) {}
@ -46,7 +45,6 @@ struct queue_ops test_ops = {
.qop_added = test_queue_add,
.qop_removed = test_queue_remove,
.qop_cleared = test_queue_clear,
.qop_save = test_queue_save,
.qop_updated = test_queue_update,
};