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
b48ac2df
Commit
b48ac2df
authored
Jun 02, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add urlhandlers command, but prolly not needed
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1307
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
8fca32b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
command.c
src/command.c
+8
-0
decode.c
src/decode.c
+1
-0
ls.c
src/ls.c
+11
-0
ls.h
src/ls.h
+2
-0
No files found.
src/command.c
View file @
b48ac2df
...
...
@@ -73,6 +73,7 @@
#define COMMAND_SETVOL "setvol"
#define COMMAND_PASSWORD "password"
#define COMMAND_CROSSFADE "crossfade"
#define COMMAND_URL_HANDLERS "urlhandlers"
#define COMMAND_STATUS_VOLUME "volume"
#define COMMAND_STATUS_STATE "state"
...
...
@@ -135,6 +136,12 @@ void addCommand(char * name, unsigned int reqPermission, int minargs,
insertInList
(
commandList
,
cmd
->
cmd
,
cmd
);
}
int
handleUrlHandlers
(
FILE
*
fp
,
unsigned
int
*
permission
,
int
argArrayLength
,
char
**
argArray
)
{
return
printRemoteUrlHandlers
(
fp
);
}
int
handlePlay
(
FILE
*
fp
,
unsigned
int
*
permission
,
int
argArrayLength
,
char
**
argArray
)
{
...
...
@@ -628,6 +635,7 @@ void initCommands() {
addCommand
(
COMMAND_SETVOL
,
PERMISSION_CONTROL
,
1
,
1
,
handleSetVol
,
NULL
);
addCommand
(
COMMAND_PASSWORD
,
0
,
1
,
1
,
handlePassword
,
NULL
);
addCommand
(
COMMAND_CROSSFADE
,
PERMISSION_CONTROL
,
1
,
1
,
handleCrossfade
,
NULL
);
addCommand
(
COMMAND_URL_HANDLERS
,
PERMISSION_READ
,
0
,
0
,
handleUrlHandlers
,
NULL
);
sortList
(
commandList
);
}
...
...
src/decode.c
View file @
b48ac2df
...
...
@@ -27,6 +27,7 @@
#include "log.h"
#include "sig_handlers.h"
#include "ls.h"
#include "utf8.h"
#include <signal.h>
#include <sys/types.h>
...
...
src/ls.c
View file @
b48ac2df
...
...
@@ -48,6 +48,17 @@ static char * remoteUrlPrefixes[] =
NULL
};
int
printRemoteUrlHandlers
(
FILE
*
fp
)
{
char
**
prefixes
=
remoteUrlPrefixes
;
while
(
*
prefixes
)
{
myfprintf
(
fp
,
"handler: %s
\n
"
,
*
prefixes
);
prefixes
++
;
}
return
0
;
}
int
isValidRemoteUtf8Url
(
char
*
utf8url
)
{
int
ret
=
0
;
char
*
lat1
=
utf8StrToLatin1Dup
(
utf8url
);
...
...
src/ls.h
View file @
b48ac2df
...
...
@@ -44,5 +44,7 @@ InputPlugin * isMusic(char * utf8file, time_t * mtime);
char
*
dupAndStripPlaylistSuffix
(
char
*
file
);
int
printRemoteUrlHandlers
(
FILE
*
fp
);
#endif
/* vim:set shiftwidth=4 tabstop=8 expandtab: */
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