ocarina/include/core/tags/library.h

66 lines
1.3 KiB
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. */
bool _enabled; /**< Is this library path enabled? */
public:
/** Number of tracks in this library */
unsigned int count;
/** 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 &);
/**
* Called to check if this library path is currently enabled.
*
* @return Library::_enabled.
*/
const bool enabled();
/**
* Called to set if this library path is enabled.
*
* @param enabled True if this path should be enabled, false otherwise.
*/
void set_enabled(bool);
};
#endif /* OCARINA_CORE_TAGS_LIBRARY_H */