28 #include <boost/intrusive/list.hpp>
45 static constexpr
auto link_mode = boost::intrusive::normal_link;
46 typedef boost::intrusive::link_mode<link_mode>
LinkMode;
47 typedef boost::intrusive::list_member_hook<LinkMode>
Hook;
89 char uri[
sizeof(int)];
114 #ifdef ENABLE_ARCHIVE
116 const char *name_utf8,
126 std::string
GetURI() const noexcept;
132 typedef boost::intrusive::list<
Song,
133 boost::intrusive::member_hook<Song, Song::Hook,
135 boost::intrusive::constant_time_size<false>>
SongList;
Hook siblings
Pointers to the siblings of this directory within the parent directory.
gcc_pure LightSong Export() const noexcept
The meta information about a song file.
boost::intrusive::list< Song, boost::intrusive::member_hook< Song, Song::Hook,&Song::siblings >, boost::intrusive::constant_time_size< false > > SongList
boost::intrusive::link_mode< link_mode > LinkMode
A time stamp within a song.
SongTime start_time
Start of this sub-song within the file.
const Storage const char const char * path_utf8
static gcc_malloc Song * LoadFile(Storage &storage, const char *name_utf8, Directory &parent)
allocate a new song structure with a local file name and attempt to load its metadata.
static gcc_malloc Song * NewFile(const char *path_utf8, Directory &parent)
allocate a new song with a local file name
bool UpdateFile(Storage &storage)
A song file inside the configured music directory.
boost::intrusive::list_member_hook< LinkMode > Hook
SongTime end_time
End of this sub-song within the file.
Song(const char *_uri, size_t uri_length, Directory &parent)
void operator()(Song *song) const
Directory *const parent
The Directory that contains this song.
static constexpr auto link_mode
static gcc_malloc Song * NewFrom(DetachedSong &&other, Directory &parent)
char uri[sizeof(int)]
The file name.
gcc_pure std::string GetURI() const noexcept
Returns the URI of the song in UTF-8 encoding, including its location within the music directory...
A reference to a song file.