core/tags/track: Move track_remove_all() out of the tags namespace

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-10-25 04:43:39 -04:00
parent 7ffaf91617
commit d0ec3e2cac
4 changed files with 6 additions and 10 deletions

View File

@ -192,7 +192,7 @@ void collection :: remove(struct library *library)
{
if (library) {
set_enabled(library, false);
tags :: remove_library_tracks(library);
track_remove_all(library);
library_remove(library);
}
}

View File

@ -169,7 +169,7 @@ void track_remove(struct track *track)
db_remove(&track_db, track);
}
void tags :: remove_library_tracks(struct library *library)
void track_remove_all(struct library *library)
{
struct track *it, *next;

View File

@ -120,13 +120,6 @@ namespace tags
/** Called to read the track_db from disk. */
void init_track_db();
/**
* Called to remove all tracks associated with a specific Library.
*
* @param library The Library tag that will be matched.
*/
void remove_library_tracks(struct library *);
/**
* Called to find the number of rows in the track_db,
* including NULL rows.
@ -148,6 +141,9 @@ struct track *track_add(struct album *, struct artist *, struct genre *,
/* Called to remove a specific track tag. */
void track_remove(struct track *);
/* Called to remove all tracks associated with a specific library. */
void track_remove_all(struct library *);
/* Called to get a track tag with a specific index. */
struct track *track_get(const unsigned int);

View File

@ -167,7 +167,7 @@ static void test_track_tag_lookup()
verify_track_tag(a, 2);
test_equal(tags :: track_size(), a->index() + 1);
tags :: remove_library_tracks(library);
track_remove_all(library);
test_track_tag_load_db(0);
test_equal(library->li_size, (unsigned)0);
}