63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
/**
|
|
* Copyright 2013 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_CORE_LIBRARY_H
|
|
#define OCARINA_CORE_LIBRARY_H
|
|
|
|
extern "C" {
|
|
#include <core/queue.h>
|
|
}
|
|
#include <string>
|
|
|
|
|
|
/**
|
|
* The Library is in charge of scanning and updating Library tags along
|
|
* with every other tag in the tag database. This code will also manage
|
|
* a special Queue used by the UI to display all enabled Tracks.
|
|
*
|
|
* The library queue is dynamic, so saving involves only storing the current
|
|
* flags and sort order.
|
|
*
|
|
* ... << flags << _sort_order.size()
|
|
* ... << _sort_order[N].field << _sort_order[N].ascending << ...
|
|
*/
|
|
namespace collection
|
|
{
|
|
|
|
void save(struct queue *, enum queue_flags);
|
|
|
|
/**
|
|
* Use to access the library queue.
|
|
*
|
|
* @return The queue of tracks currently in the library.
|
|
*/
|
|
queue *get_queue();
|
|
|
|
};
|
|
|
|
|
|
/* Called to initialize the collection manager. */
|
|
void collection_init(struct queue_ops *);
|
|
|
|
/* Called to deinitialize the collection manager. */
|
|
void collection_deinit();
|
|
|
|
|
|
/* 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);
|
|
|
|
#endif /* OCARINA_CORE_LIBRARY_H */
|