diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | src/AllCommands.cxx | 5 | ||||
-rw-r--r-- | src/AllCommands.h | 34 | ||||
-rw-r--r-- | src/client_internal.h | 2 | ||||
-rw-r--r-- | src/client_process.c | 1 | ||||
-rw-r--r-- | src/command.h | 17 | ||||
-rw-r--r-- | src/main.c | 2 |
7 files changed, 44 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am index 23d2f4e4d..8cdc72c7d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -235,7 +235,7 @@ src_mpd_SOURCES = \ src/protocol/argparser.c src/protocol/argparser.h \ src/protocol/result.c src/protocol/result.h \ src/CommandError.cxx src/CommandError.hxx \ - src/AllCommands.cxx \ + src/AllCommands.cxx src/AllCommands.h \ src/QueueCommands.cxx src/QueueCommands.hxx \ src/PlayerCommands.cxx src/PlayerCommands.hxx \ src/PlaylistCommands.cxx src/PlaylistCommands.hxx \ diff --git a/src/AllCommands.cxx b/src/AllCommands.cxx index 003fcbe3b..28e3d3ebd 100644 --- a/src/AllCommands.cxx +++ b/src/AllCommands.cxx @@ -18,6 +18,11 @@ */ #include "config.h" + +extern "C" { +#include "AllCommands.h" +} + #include "command.h" #include "QueueCommands.hxx" #include "PlayerCommands.hxx" diff --git a/src/AllCommands.h b/src/AllCommands.h new file mode 100644 index 000000000..8325094f5 --- /dev/null +++ b/src/AllCommands.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2003-2012 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_ALL_COMMANDS_H +#define MPD_ALL_COMMANDS_H + +#include "command.h" + +struct client; + +void command_init(void); + +void command_finish(void); + +enum command_return +command_process(struct client *client, unsigned num, char *line); + +#endif diff --git a/src/client_internal.h b/src/client_internal.h index ba97e4b8f..5c2b9f11c 100644 --- a/src/client_internal.h +++ b/src/client_internal.h @@ -24,6 +24,8 @@ #include "client_message.h" #include "command.h" +#include <glib.h> + #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "client" diff --git a/src/client_process.c b/src/client_process.c index ec9eacb93..7217b35ab 100644 --- a/src/client_process.c +++ b/src/client_process.c @@ -20,6 +20,7 @@ #include "config.h" #include "client_internal.h" #include "protocol/result.h" +#include "AllCommands.h" #include <string.h> diff --git a/src/command.h b/src/command.h index 295d71ab6..9ea5bb52f 100644 --- a/src/command.h +++ b/src/command.h @@ -20,10 +20,6 @@ #ifndef MPD_COMMAND_H #define MPD_COMMAND_H -#include "ack.h" - -#include <stdbool.h> - enum command_return { /** * The command has succeeded, but the "OK" response was not @@ -54,17 +50,4 @@ enum command_return { COMMAND_RETURN_KILL, }; -struct client; - -G_BEGIN_DECLS - -void command_init(void); - -void command_finish(void); - -enum command_return -command_process(struct client *client, unsigned num, char *line); - -G_END_DECLS - #endif diff --git a/src/main.c b/src/main.c index fea31782f..f08a2ec31 100644 --- a/src/main.c +++ b/src/main.c @@ -24,7 +24,7 @@ #include "client.h" #include "client_idle.h" #include "idle.h" -#include "command.h" +#include "AllCommands.h" #include "playlist.h" #include "stored_playlist.h" #include "database.h" |