c34f0c160d
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
/*
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*
|
|
* 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
|
|
*/
|
|
#ifndef OCARINA_CORE_TAGS_ARTIST_H
|
|
#define OCARINA_CORE_TAGS_ARTIST_H
|
|
|
|
#include <core/containers/database.h>
|
|
|
|
struct artist {
|
|
gchar *ar_name; /* This artist's name. */
|
|
gchar *ar_lower; /* This artist's name (lowercased). */
|
|
struct db_entry ar_dbe;
|
|
};
|
|
|
|
#define ARTIST(dbe) ((struct artist *)DBE_DATA(dbe))
|
|
|
|
|
|
/* Called to initialize the artist database. */
|
|
void artist_db_init();
|
|
|
|
/* Called to clean up the artist database. */
|
|
void artist_db_deinit();
|
|
|
|
/* Called to find an artist tag by name. */
|
|
struct artist *artist_find(const gchar *);
|
|
|
|
/* Called to get an artist tag with a specific index. */
|
|
struct artist *artist_get(const unsigned int);
|
|
|
|
/* Called to compare two artist tags. */
|
|
int artist_compare(struct artist *, struct artist *);
|
|
|
|
#ifdef CONFIG_TESTING
|
|
const struct db_ops *test_artist_ops();
|
|
#endif /* CONFIG_TESTING */
|
|
#endif /* OCARINA_CORE_TAGS_ARTIST_H */
|