/** * Copyright 2014 (c) Anna Schumaker. */ #ifndef OCARINA_CORE_TAGS_ALBUM_H #define OCARINA_CORE_TAGS_ALBUM_H extern "C" { #include } #include /** * 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 _year field and * then call GenericTag to write anything else. * * ... << year1 << GenericTag::write() * ... << year2 << GenericTag::write() * ... << year3 << GenericTag::write() */ 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 */