From 8331de424a67b137cd83ce817da0fceec647dc2f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 2 Jan 2013 22:04:03 +0100 Subject: PlaylistInfo: rename class, use std::string --- src/PlaylistInfo.hxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/PlaylistInfo.hxx') diff --git a/src/PlaylistInfo.hxx b/src/PlaylistInfo.hxx index 2d21178e..fffafd81 100644 --- a/src/PlaylistInfo.hxx +++ b/src/PlaylistInfo.hxx @@ -23,26 +23,29 @@ #include "check.h" #include "util/list.h" +#include + #include /** * A directory entry pointing to a playlist file. */ -struct playlist_metadata { +struct PlaylistInfo { struct list_head siblings; /** * The UTF-8 encoded name of the playlist file. */ - char *name; + std::string name; time_t mtime; -}; -struct playlist_metadata * -playlist_metadata_new(const char *name, time_t mtime); + template + PlaylistInfo(N &&_name, time_t _mtime) + :name(std::forward(_name)), mtime(_mtime) {} -void -playlist_metadata_free(struct playlist_metadata *pm); + PlaylistInfo(const PlaylistInfo &other) = delete; + PlaylistInfo(PlaylistInfo &&) = default; +}; #endif -- cgit v1.2.3