2015-11-11 10:49:23 -05:00
|
|
|
/*
|
2014-11-08 12:59:27 -05:00
|
|
|
* Copyright 2014 (c) Anna Schumaker.
|
2015-11-11 10:49:23 -05:00
|
|
|
*
|
|
|
|
* The Artist tag is used to store the name of artists
|
|
|
|
* added to the tag database.
|
|
|
|
*
|
|
|
|
* When writing an Artist tag to disk, only write out the
|
|
|
|
* artist_name field:
|
|
|
|
*
|
|
|
|
* ... Koji Kondo
|
|
|
|
* ... Hajime Wakai
|
2014-11-08 12:59:27 -05:00
|
|
|
*/
|
|
|
|
#ifndef OCARINA_CORE_TAGS_ARTIST_H
|
|
|
|
#define OCARINA_CORE_TAGS_ARTIST_H
|
|
|
|
|
2015-11-30 09:48:19 -05:00
|
|
|
#include <core/containers/database.h>
|
2014-11-08 12:59:27 -05:00
|
|
|
|
2015-11-11 10:04:03 -05:00
|
|
|
struct artist {
|
2015-11-11 10:42:17 -05:00
|
|
|
gchar *ar_name; /* This artist's name. */
|
|
|
|
gchar *ar_lower; /* This artist's name (lowercased). */
|
2015-11-11 10:04:03 -05:00
|
|
|
struct db_entry ar_dbe;
|
2014-11-08 12:59:27 -05:00
|
|
|
};
|
|
|
|
|
2015-11-11 10:04:03 -05:00
|
|
|
#define ARTIST(dbe) ((struct artist *)DBE_DATA(dbe))
|
2015-11-04 12:23:00 -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. */
|
2015-11-11 10:42:17 -05:00
|
|
|
struct artist *artist_find(const gchar *);
|
2015-10-22 12:05:28 -04:00
|
|
|
|
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 */
|