ocarina/include/core/tags.h
Anna Schumaker 3e0fb88b1d Track: Move the track tag into a new header file
This is the first step in converting it to use the GenericTag class.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:51 -05:00

62 lines
1.3 KiB
C++

/**
* @file
* Copyright 2014 (c) Anna Schumaker.
*/
#ifndef OCARINA_CORE_TAGS_H
#define OCARINA_CORE_TAGS_H
#include <core/database.h>
#include <core/tags/album.h>
#include <core/tags/artist.h>
#include <core/tags/genre.h>
#include <core/tags/library.h>
#include <core/tags/track.h>
/** Functions for accessing the tag database */
namespace tagdb
{
/** Load tag databases from disk */
void init();
/** Write track database to disk */
void commit();
/**
* Add a track to the database
* @param filepath Filepath to be added
* @param library Library containing the new track
* @return A pointer to the newly created track
*/
Track *add_track(const std::string &, Library *);
/**
* Remove a track from the database
* @param track_id The index of the track in the database.
*/
void remove_track(unsigned int);
/**
* Remove a library from the database.
* @param library_id The index of the library in the database.
*/
void remove_library(unsigned int);
/**
* Find a track based on track_id
* @param track_id Track id to look up
* @return A pointer to the found track, or NULL
*/
Track *lookup(unsigned int);
/**
* Call to access the track database
* @return The track database
*/
Database<Track> &get_track_db();
}
#endif /* OCARINA_CORE_TAGS_H */