diff options
author | Avuton Olrich <avuton@gmail.com> | 2009-03-03 08:01:42 -0800 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-03 21:25:19 +0100 |
commit | e7f034dceff196b7588bca995a5e22bd480f71ca (patch) | |
tree | 47001ccd8bd98bc84925f8925b250458cb39b26a /src/ls.c | |
parent | 0f64e658fd34923a3be815582be500b8248019a0 (diff) | |
download | mpd-e7f034dceff196b7588bca995a5e22bd480f71ca.tar.gz mpd-e7f034dceff196b7588bca995a5e22bd480f71ca.tar.xz mpd-e7f034dceff196b7588bca995a5e22bd480f71ca.zip |
cmdline: Print available protocols when --version is run.
Diffstat (limited to '')
-rw-r--r-- | src/ls.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -24,6 +24,12 @@ #include <assert.h> #include <string.h> + +/** + * file:// is not included in remoteUrlPrefixes, the connection method + * is detected at runtime and displayed as a urlhandler if the client is + * connected by IPC socket. + */ static const char *remoteUrlPrefixes[] = { #ifdef HAVE_CURL "http://", @@ -40,6 +46,20 @@ static const char *remoteUrlPrefixes[] = { NULL }; +void print_supported_uri_schemes_to_fp(FILE *fp) +{ + const char **prefixes = remoteUrlPrefixes; + +#ifdef HAVE_UN + fprintf(fp, "file:// "); +#endif + while (*prefixes) { + fprintf(fp, "%s ", *prefixes); + prefixes++; + } + puts("\n"); +} + void print_supported_uri_schemes(struct client *client) { const char **prefixes = remoteUrlPrefixes; |