From 186367afe0b0c502a50bbac08bf376d0b9732eff Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 7 Sep 2016 08:33:13 -0400 Subject: [PATCH] core/queue: Remove qop_save() This callback is no longer used now that saving happens in the playlist layer. Signed-off-by: Anna Schumaker --- core/queue.c | 6 ------ include/core/queue.h | 7 ++----- tests/core/queue.c | 5 ----- tests/gui/filter.c | 2 -- tests/gui/model.c | 2 -- 5 files changed, 2 insertions(+), 20 deletions(-) diff --git a/core/queue.c b/core/queue.c index 077c6c32..b9dd5647 100644 --- a/core/queue.c +++ b/core/queue.c @@ -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) { diff --git a/include/core/queue.h b/include/core/queue.h index 26ccbfe4..393dcfbd 100644 --- a/include/core/queue.h +++ b/include/core/queue.h @@ -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); }; diff --git a/tests/core/queue.c b/tests/core/queue.c index 4c084a1c..e6d4e7f1 100644 --- a/tests/core/queue.c +++ b/tests/core/queue.c @@ -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, }; diff --git a/tests/gui/filter.c b/tests/gui/filter.c index acc0fc13..990835b7 100644 --- a/tests/gui/filter.c +++ b/tests/gui/filter.c @@ -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, }; diff --git a/tests/gui/model.c b/tests/gui/model.c index 12b96d9c..8f8ccaee 100644 --- a/tests/gui/model.c +++ b/tests/gui/model.c @@ -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, };