diff options
author | Spencer Williams <spnw@plexwave.org> | 2025-04-14 15:25:36 -0400 |
---|---|---|
committer | Spencer Williams <spnw@plexwave.org> | 2025-04-14 15:25:36 -0400 |
commit | adaa3396edd425312065a134aec99991bd7b9cdd (patch) | |
tree | ce392fc23f14e629b9a6ba7d4277cca7d6dc243f /mpc/format.h | |
parent | c85630c55c104a88d743c6dfd32bdee7189a6e47 (diff) |
Add mpc sources
Diffstat (limited to 'mpc/format.h')
-rw-r--r-- | mpc/format.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mpc/format.h b/mpc/format.h new file mode 100644 index 0000000..e7aefeb --- /dev/null +++ b/mpc/format.h @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright The Music Player Daemon Project + +#ifndef MPC_FORMAT_H +#define MPC_FORMAT_H + +#include "Compiler.h" + +struct mpd_song; + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Pretty-print an object into a string using the given format + * specification. + * + * @param format the format string + * @param object the object + * @param getter a getter function that extracts a value from the object + * @return the resulting string to be freed by free(); NULL if + * no format string group produced any output + */ +gcc_malloc +char * +format_object(const char *format, const void *object, + const char *(*getter)(const void *object, const char *name)); + +#ifdef __cplusplus +} +#endif + +#endif |