aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistInfo.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-02 22:04:03 +0100
committerMax Kellermann <max@duempel.org>2013-01-02 22:16:05 +0100
commit8331de424a67b137cd83ce817da0fceec647dc2f (patch)
treeb5243fbff385d9732c683cb1efc64eec85f3189f /src/PlaylistInfo.hxx
parent98dbdf72b3c35878494df4954a447cec250a835d (diff)
downloadmpd-8331de424a67b137cd83ce817da0fceec647dc2f.tar.gz
mpd-8331de424a67b137cd83ce817da0fceec647dc2f.tar.xz
mpd-8331de424a67b137cd83ce817da0fceec647dc2f.zip
PlaylistInfo: rename class, use std::string
Diffstat (limited to '')
-rw-r--r--src/PlaylistInfo.hxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/PlaylistInfo.hxx b/src/PlaylistInfo.hxx
index 2d21178ed..fffafd819 100644
--- a/src/PlaylistInfo.hxx
+++ b/src/PlaylistInfo.hxx
@@ -23,26 +23,29 @@
#include "check.h"
#include "util/list.h"
+#include <string>
+
#include <sys/time.h>
/**
* 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<typename N>
+ PlaylistInfo(N &&_name, time_t _mtime)
+ :name(std::forward<N>(_name)), mtime(_mtime) {}
-void
-playlist_metadata_free(struct playlist_metadata *pm);
+ PlaylistInfo(const PlaylistInfo &other) = delete;
+ PlaylistInfo(PlaylistInfo &&) = default;
+};
#endif