48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*
|
|
* Copyright 2013 (c) Anna Schumaker.
|
|
*
|
|
* The collection manager is in charge of creating, updating, and removing
|
|
* Library and Track tags. This code also manages a special queue used by
|
|
* the GUI to display all tracks in the collection.
|
|
*
|
|
* The entire collection queue does not need to be saved, so instead the
|
|
* collection manager only stores flags and the current sort order:
|
|
*
|
|
* flags sort.length ... sort[N].field sort[N].ascending ...
|
|
*/
|
|
#ifndef OCARINA_CORE_COLLECTION_H
|
|
#define OCARINA_CORE_COLLECTION_H
|
|
|
|
#include <core/queue.h>
|
|
|
|
|
|
/* Called to initialize the collection manager. */
|
|
void collection_init(void);
|
|
|
|
|
|
/* Called to add a new library directory to the collection manager. */
|
|
struct library *collection_add(const gchar *);
|
|
|
|
/* Called to remove a library directory from the collection manager. */
|
|
void collection_remove(struct library *);
|
|
|
|
/* Called to update a library directory. */
|
|
void collection_update(struct library *);
|
|
|
|
/* Called to update all library paths. */
|
|
void collection_update_all();
|
|
|
|
|
|
/* Called to enable or disable a library directory. */
|
|
void collection_set_enabled(struct library *, bool);
|
|
|
|
/* Called to check if the library path is good. */
|
|
int collection_check_library(struct library *);
|
|
|
|
|
|
#ifdef CONFIG_TESTING
|
|
extern bool test_collection_error;
|
|
#endif /* CONFIG_TESTING */
|
|
|
|
#endif /* OCARINA_CORE_COLLECTION_H */
|