2014-11-08 12:59:27 -05:00
|
|
|
/**
|
|
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
|
|
*/
|
|
|
|
#ifndef OCARINA_CORE_TAGS_ARTIST_H
|
|
|
|
#define OCARINA_CORE_TAGS_ARTIST_H
|
|
|
|
|
2015-10-22 13:19:09 -04:00
|
|
|
#include <core/database.h>
|
2014-11-08 12:59:27 -05:00
|
|
|
|
|
|
|
/**
|
2014-11-08 13:56:54 -05:00
|
|
|
* The Artist tag is used to store the name of artists added
|
|
|
|
* to the tag database.
|
2014-11-08 12:59:27 -05:00
|
|
|
*/
|
2015-10-31 11:44:29 -04:00
|
|
|
struct artist : public db_entry {
|
2015-10-22 13:19:09 -04:00
|
|
|
std::string ar_name; /* This artist's name. */
|
|
|
|
std::string ar_lower; /* This artist's name (lowercased). */
|
|
|
|
|
2015-10-22 11:28:45 -04:00
|
|
|
artist(); /**< Artist tag constructor. */
|
2014-11-08 12:59:27 -05:00
|
|
|
};
|
|
|
|
|
2014-11-16 10:08:12 -05:00
|
|
|
|
2015-10-22 13:06:12 -04:00
|
|
|
/* Called to initialize the artist database. */
|
|
|
|
void artist_db_init();
|
2014-11-16 10:08:12 -05:00
|
|
|
|
2015-10-22 13:06:12 -04:00
|
|
|
/* Called to clean up the artist database. */
|
|
|
|
void artist_db_deinit();
|
2015-10-22 12:01:25 -04:00
|
|
|
|
2015-10-22 12:05:28 -04:00
|
|
|
/* Called to find an artist tag by name. */
|
|
|
|
struct artist *artist_find(const std::string &);
|
|
|
|
|
2015-10-22 12:01:25 -04:00
|
|
|
/* Called to get an artist tag with a specific index. */
|
|
|
|
struct artist *artist_get(const unsigned int);
|
|
|
|
|
2015-10-22 13:19:09 -04:00
|
|
|
/* Called to compare two artist tags. */
|
|
|
|
int artist_compare(struct artist *, struct artist *);
|
|
|
|
|
2015-11-03 10:39:06 -05:00
|
|
|
#ifdef CONFIG_TESTING
|
|
|
|
const struct db_ops *test_artist_ops();
|
|
|
|
#endif /* CONFIG_TESTING */
|
2014-11-08 12:59:27 -05:00
|
|
|
#endif /* OCARINA_CORE_TAGS_ARTIST_H */
|