From a5d8b27671b829d2b17554b056b681c66ae7fb74 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 25 Sep 2012 12:16:42 +0200 Subject: command.h: move function prototypes to AllCommands.h --- src/AllCommands.cxx | 5 +++++ src/AllCommands.h | 34 ++++++++++++++++++++++++++++++++++ src/client_internal.h | 2 ++ src/client_process.c | 1 + src/command.h | 17 ----------------- src/main.c | 2 +- 6 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 src/AllCommands.h (limited to 'src') 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 + #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 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 - 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" -- cgit v1.2.3