aboutsummaryrefslogtreecommitdiff
path: root/mpc/song_format.h
diff options
context:
space:
mode:
Diffstat (limited to 'mpc/song_format.h')
-rw-r--r--mpc/song_format.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/mpc/song_format.h b/mpc/song_format.h
new file mode 100644
index 0000000..7825982
--- /dev/null
+++ b/mpc/song_format.h
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright The Music Player Daemon Project
+
+#ifndef MPC_SONG_FORMAT_H
+#define MPC_SONG_FORMAT_H
+
+#include "Compiler.h"
+
+struct mpd_song;
+
+/**
+ * Pretty-print song metadata into a string using the given format
+ * specification.
+ *
+ * @param song the song object
+ * @param format the format string
+ * @return the resulting string to be freed by free(); NULL if
+ * no format string group produced any output
+ */
+gcc_malloc
+char *
+format_song(const struct mpd_song *song,
+ const char *format);
+
+#endif