Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
e7f034dc
Commit
e7f034dc
authored
Mar 03, 2009
by
Avuton Olrich
Committed by
Max Kellermann
Mar 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmdline: Print available protocols when --version is run.
parent
0f64e658
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
NEWS
NEWS
+1
-0
cmdline.c
src/cmdline.c
+5
-0
ls.c
src/ls.c
+20
-0
ls.h
src/ls.h
+6
-0
No files found.
NEWS
View file @
e7f034dc
...
@@ -49,6 +49,7 @@ ver 0.15 - (200?/??/??)
...
@@ -49,6 +49,7 @@ ver 0.15 - (200?/??/??)
* daemon: ignore "user" setting if already running as that user
* daemon: ignore "user" setting if already running as that user
* listen: fix broken client IP addresses in log
* listen: fix broken client IP addresses in log
* 32 bit audio support
* 32 bit audio support
* Print available protocols in --version
ver 0.14.2 (2009/02/13)
ver 0.14.2 (2009/02/13)
...
...
src/cmdline.c
View file @
e7f034dc
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "decoder_list.h"
#include "decoder_list.h"
#include "config.h"
#include "config.h"
#include "audioOutput.h"
#include "audioOutput.h"
#include "ls.h"
#ifdef ENABLE_ARCHIVE
#ifdef ENABLE_ARCHIVE
#include "archive_list.h"
#include "archive_list.h"
...
@@ -63,6 +64,10 @@ static void version(void)
...
@@ -63,6 +64,10 @@ static void version(void)
archive_plugin_print_all_suffixes
(
stdout
);
archive_plugin_print_all_suffixes
(
stdout
);
#endif
#endif
puts
(
"
\n
"
"Supported protocols:
\n
"
);
print_supported_uri_schemes_to_fp
(
stdout
);
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
}
}
...
...
src/ls.c
View file @
e7f034dc
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
#include <assert.h>
#include <assert.h>
#include <string.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
[]
=
{
static
const
char
*
remoteUrlPrefixes
[]
=
{
#ifdef HAVE_CURL
#ifdef HAVE_CURL
"http://"
,
"http://"
,
...
@@ -40,6 +46,20 @@ static const char *remoteUrlPrefixes[] = {
...
@@ -40,6 +46,20 @@ static const char *remoteUrlPrefixes[] = {
NULL
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
)
void
print_supported_uri_schemes
(
struct
client
*
client
)
{
{
const
char
**
prefixes
=
remoteUrlPrefixes
;
const
char
**
prefixes
=
remoteUrlPrefixes
;
...
...
src/ls.h
View file @
e7f034dc
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#define MPD_LS_H
#define MPD_LS_H
#include <stdbool.h>
#include <stdbool.h>
#include <stdio.h>
struct
client
;
struct
client
;
...
@@ -36,4 +37,9 @@ bool uri_supported_scheme(const char *url);
...
@@ -36,4 +37,9 @@ bool uri_supported_scheme(const char *url);
*/
*/
void
print_supported_uri_schemes
(
struct
client
*
client
);
void
print_supported_uri_schemes
(
struct
client
*
client
);
/**
* Send a list of supported URI schemes to a file pointer.
*/
void
print_supported_uri_schemes_to_fp
(
FILE
*
fp
);
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment