aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls.cxx')
-rw-r--r--src/ls.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/ls.cxx b/src/ls.cxx
index 6ab68b6ab..41bd4ba97 100644
--- a/src/ls.cxx
+++ b/src/ls.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -19,9 +19,9 @@
#include "config.h"
#include "ls.hxx"
+#include "client/Response.hxx"
#include "util/StringUtil.hxx"
#include "util/UriUtil.hxx"
-#include "client/Client.hxx"
#include <assert.h>
@@ -30,7 +30,7 @@
* is detected at runtime and displayed as a urlhandler if the client is
* connected by IPC socket.
*/
-static const char *remoteUrlPrefixes[] = {
+static const char *const remoteUrlPrefixes[] = {
#if defined(ENABLE_CURL)
"http://",
"https://",
@@ -41,7 +41,7 @@ static const char *remoteUrlPrefixes[] = {
"mmst://",
"mmsu://",
#endif
-#ifdef HAVE_FFMPEG
+#ifdef ENABLE_FFMPEG
"gopher://",
"rtp://",
"rtsp://",
@@ -58,7 +58,7 @@ static const char *remoteUrlPrefixes[] = {
#ifdef ENABLE_CDIO_PARANOIA
"cdda://",
#endif
-#ifdef HAVE_ALSA
+#ifdef ENABLE_ALSA
"alsa://",
#endif
NULL
@@ -66,7 +66,7 @@ static const char *remoteUrlPrefixes[] = {
void print_supported_uri_schemes_to_fp(FILE *fp)
{
- const char **prefixes = remoteUrlPrefixes;
+ const char *const*prefixes = remoteUrlPrefixes;
#ifdef HAVE_UN
fprintf(fp, " file://");
@@ -78,19 +78,20 @@ void print_supported_uri_schemes_to_fp(FILE *fp)
fprintf(fp,"\n");
}
-void print_supported_uri_schemes(Client &client)
+void
+print_supported_uri_schemes(Response &r)
{
- const char **prefixes = remoteUrlPrefixes;
+ const char *const *prefixes = remoteUrlPrefixes;
while (*prefixes) {
- client_printf(client, "handler: %s\n", *prefixes);
+ r.Format("handler: %s\n", *prefixes);
prefixes++;
}
}
bool uri_supported_scheme(const char *uri)
{
- const char **urlPrefixes = remoteUrlPrefixes;
+ const char *const*urlPrefixes = remoteUrlPrefixes;
assert(uri_has_scheme(uri));