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
7dc3e737
Commit
7dc3e737
authored
Feb 17, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command: add command "listpartitions"
The first step to multi-player support. Not much, just a dummy command.
parent
47dffe66
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
0 deletions
+94
-0
Makefile.am
Makefile.am
+1
-0
protocol.xml
doc/protocol.xml
+29
-0
AllCommands.cxx
src/command/AllCommands.cxx
+2
-0
PartitionCommands.cxx
src/command/PartitionCommands.cxx
+30
-0
PartitionCommands.hxx
src/command/PartitionCommands.hxx
+32
-0
No files found.
Makefile.am
View file @
7dc3e737
...
...
@@ -91,6 +91,7 @@ libmpd_a_SOURCES = \
src/command/OutputCommands.cxx src/command/OutputCommands.hxx
\
src/command/MessageCommands.cxx src/command/MessageCommands.hxx
\
src/command/ClientCommands.cxx src/command/ClientCommands.hxx
\
src/command/PartitionCommands.cxx src/command/PartitionCommands.hxx
\
src/command/OtherCommands.cxx src/command/OtherCommands.hxx
\
src/command/CommandListBuilder.cxx src/command/CommandListBuilder.hxx
\
src/Idle.cxx src/Idle.hxx
\
...
...
doc/protocol.xml
View file @
7dc3e737
...
...
@@ -2350,6 +2350,35 @@ OK
</variablelist>
</section>
<section
id=
"partition_commands"
>
<title>
Partition commands
</title>
<para>
These commands allow a client to inspect and manage
"partitions". A partition is one frontend of a multi-player
MPD process: it has separate queue, player and outputs. A
client is assigned to one partition at a time.
</para>
<variablelist>
<varlistentry
id=
"command_listpartitions"
>
<term>
<cmdsynopsis>
<command>
listpartitions
</command>
</cmdsynopsis>
</term>
<listitem>
<para>
Print a list of partitions. Each partition starts with
a
<varname>
partition
</varname>
keyword and the
partition's name, followed by information about the
partition.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section
id=
"output_commands"
>
<title>
Audio output devices
</title>
...
...
src/command/AllCommands.cxx
View file @
7dc3e737
...
...
@@ -32,6 +32,7 @@
#include "MessageCommands.hxx"
#include "NeighborCommands.hxx"
#include "ClientCommands.hxx"
#include "PartitionCommands.hxx"
#include "OtherCommands.hxx"
#include "Permission.hxx"
#include "tag/Type.h"
...
...
@@ -119,6 +120,7 @@ static constexpr struct command commands[] = {
#ifdef ENABLE_NEIGHBOR_PLUGINS
{
"listneighbors"
,
PERMISSION_READ
,
0
,
0
,
handle_listneighbors
},
#endif
{
"listpartitions"
,
PERMISSION_READ
,
0
,
0
,
handle_listpartitions
},
{
"listplaylist"
,
PERMISSION_READ
,
1
,
1
,
handle_listplaylist
},
{
"listplaylistinfo"
,
PERMISSION_READ
,
1
,
1
,
handle_listplaylistinfo
},
{
"listplaylists"
,
PERMISSION_READ
,
0
,
0
,
handle_listplaylists
},
...
...
src/command/PartitionCommands.cxx
0 → 100644
View file @
7dc3e737
/*
* Copyright 2003-2017 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "PartitionCommands.hxx"
#include "Request.hxx"
#include "client/Response.hxx"
CommandResult
handle_listpartitions
(
Client
&
,
Request
,
Response
&
r
)
{
r
.
Write
(
"partition: default
\n
"
);
return
CommandResult
::
OK
;
}
src/command/PartitionCommands.hxx
0 → 100644
View file @
7dc3e737
/*
* Copyright 2003-2017 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_PARTITION_COMMANDS_HXX
#define MPD_PARTITION_COMMANDS_HXX
#include "CommandResult.hxx"
class
Client
;
class
Request
;
class
Response
;
CommandResult
handle_listpartitions
(
Client
&
client
,
Request
request
,
Response
&
response
);
#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