ocarina/include/core/tags/library.h

52 lines
997 B
C
Raw Normal View History

/**
* @file
* Copyright 2014 (c) Anna Schumaker.
*/
#ifndef OCARINA_CORE_TAGS_LIBRARY_H
#define OCARINA_CORE_TAGS_LIBRARY_H
#include <core/database.h>
/**
* Library tag
*/
class Library : public DatabaseEntry {
private:
std::string _path; /**< Path to the root directory of this library. */
public:
/** Number of tracks in this library */
unsigned int count;
/** True if the library is enabled, false otherwise */
bool enabled;
/** Library constructor */
Library();
/**
* Library constructor
* @param path Path to the library on disk.
*/
Library(const std::string &);
/**
* Called to access the library tag's primary key.
* @return Library::root_path
*/
const std::string primary_key() const;
/**
* Read library information from file.
* @param file The file to read from.
*/
void read(File &);
/**
* Write library information to file.
* @param file The file to write to.
*/
void write(File &);
};
#endif /* OCARINA_CORE_TAGS_LIBRARY_H */