/* * 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 struct artist { gchar *ar_name; /* This artist's name. */ gchar *ar_lower; /* This artist's name (lowercased). */ void *ar_playlist; /* This artist's associated playlist. */ 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. The difference is that artist_find() * will allocate a new artiststruct if the requested one doesn't exist yet, * but library_lookup() will return NULL in this situation. */ struct artist *artist_find(const gchar *); struct artist *artist_lookup(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 */