3eb27debfb
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
/**
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_CORE_TAGS_ARTIST_H
|
|
#define OCARINA_CORE_TAGS_ARTIST_H
|
|
|
|
#include <core/database.h>
|
|
|
|
/**
|
|
* The Artist tag is used to store the name of artists added
|
|
* to the tag database.
|
|
*/
|
|
struct artist : public db_entry {
|
|
std::string ar_name; /* This artist's name. */
|
|
std::string ar_lower; /* This artist's name (lowercased). */
|
|
|
|
artist(); /**< Artist tag constructor. */
|
|
|
|
/**
|
|
* Artist tag constructor
|
|
*
|
|
* @param name Artist name.
|
|
*/
|
|
artist(const std::string &);
|
|
|
|
const std::string primary_key() const;
|
|
void read(file &);
|
|
void write(file &);
|
|
};
|
|
|
|
|
|
/* 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 std::string &);
|
|
|
|
/* 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 *);
|
|
|
|
#endif /* OCARINA_CORE_TAGS_ARTIST_H */
|