c34f0c160d
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*
|
|
* The album tag is used to store the name and year of albums
|
|
* added to the tag database.
|
|
*
|
|
* When writing an album tag to disk, write out the album_year field
|
|
* followed by the album_name on the same line:
|
|
*
|
|
* ... 1998 Hyrule Symphony
|
|
* ... 2006 Twilight Princess
|
|
* ... 2011 Skyward Sword
|
|
*/
|
|
#ifndef OCARINA_CORE_TAGS_ALBUM_H
|
|
#define OCARINA_CORE_TAGS_ALBUM_H
|
|
|
|
#include <core/containers/database.h>
|
|
|
|
struct album {
|
|
unsigned int al_year; /* This album's year. */
|
|
gchar *al_name; /* This album's name. */
|
|
gchar *al_lower; /* This album's name (lowercased). */
|
|
struct db_entry al_dbe;
|
|
};
|
|
|
|
#define ALBUM(dbe) ((struct album *)DBE_DATA(dbe))
|
|
|
|
|
|
/* Called to initialize the album database. */
|
|
void album_db_init();
|
|
|
|
/* Called to clean up the album database. */
|
|
void album_db_deinit();
|
|
|
|
/* Called to find an album tag by name and year. */
|
|
struct album *album_find(const gchar *, unsigned int);
|
|
|
|
/* Called to get an album tag with a specific index. */
|
|
struct album *album_get(const unsigned int);
|
|
|
|
/* Called to compare two album tags. */
|
|
int album_compare(struct album *, struct album *);
|
|
|
|
#ifdef CONFIG_TESTING
|
|
const struct db_ops *test_album_ops();
|
|
#endif /* CONFIG_TESTING */
|
|
#endif /* OCARINA_CORE_TAGS_ALBUM_H */
|