aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-02 18:20:46 +0200
committerMax Kellermann <max@duempel.org>2012-08-02 19:12:06 +0200
commitedf811fa0271da729e9962e3976f2a68ac35a395 (patch)
treeedae1c9330ea0bdc7eff132ef15deed6a20fc8d8
parentb25b7693baa8be5ab7f0fc727f17fb560b6208ae (diff)
downloadmpd-edf811fa0271da729e9962e3976f2a68ac35a395.tar.gz
mpd-edf811fa0271da729e9962e3976f2a68ac35a395.tar.xz
mpd-edf811fa0271da729e9962e3976f2a68ac35a395.zip
DatabaseVisitor, ...: use GError forward declaration
-rw-r--r--Makefile.am1
-rw-r--r--src/DatabaseVisitor.hxx4
-rw-r--r--src/audio_parser.h2
-rw-r--r--src/dbUtils.h2
-rw-r--r--src/db_print.h2
-rw-r--r--src/db_save.h3
-rw-r--r--src/db_selection.h1
-rw-r--r--src/encoder_plugin.h2
-rw-r--r--src/event_pipe.h2
-rw-r--r--src/filter/null_filter_plugin.c1
-rw-r--r--src/filter_plugin.h2
-rw-r--r--src/gerror.h25
-rw-r--r--src/inotify_source.c2
-rw-r--r--src/inotify_source.h2
-rw-r--r--src/input_init.h3
-rw-r--r--src/listen.h2
-rw-r--r--src/mapper.h2
-rw-r--r--src/mixer_control.h2
-rw-r--r--src/mixer_plugin.h2
-rw-r--r--src/output/pulse_output_plugin.h4
-rw-r--r--src/output_plugin.h2
-rw-r--r--src/server_socket.h5
-rw-r--r--src/socket_util.c2
-rw-r--r--src/socket_util.h4
-rw-r--r--src/sticker.h10
-rw-r--r--src/sticker_print.c2
-rw-r--r--src/tag_id3.h1
-rw-r--r--src/tokenizer.c2
-rw-r--r--src/tokenizer.h2
-rw-r--r--src/utils.h3
-rw-r--r--test/run_inotify.c2
31 files changed, 72 insertions, 29 deletions
diff --git a/Makefile.am b/Makefile.am
index 12c76b89c..a39267f4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,6 +87,7 @@ mpd_headers = \
src/encoder_api.h \
src/exclude.h \
src/fd_util.h \
+ src/gerror.h \
src/glib_compat.h \
src/update.h \
src/inotify_source.h \
diff --git a/src/DatabaseVisitor.hxx b/src/DatabaseVisitor.hxx
index 1676cae19..96d24911f 100644
--- a/src/DatabaseVisitor.hxx
+++ b/src/DatabaseVisitor.hxx
@@ -20,9 +20,9 @@
#ifndef MPD_DATABASE_VISITOR_HXX
#define MPD_DATABASE_VISITOR_HXX
-#include <functional>
+#include "gerror.h"
-#include <glib.h>
+#include <functional>
struct directory;
struct song;
diff --git a/src/audio_parser.h b/src/audio_parser.h
index a963eb467..49926999e 100644
--- a/src/audio_parser.h
+++ b/src/audio_parser.h
@@ -25,7 +25,7 @@
#ifndef AUDIO_PARSER_H
#define AUDIO_PARSER_H
-#include <glib.h>
+#include "gerror.h"
#include <stdbool.h>
diff --git a/src/dbUtils.h b/src/dbUtils.h
index 706c807fd..95884daa1 100644
--- a/src/dbUtils.h
+++ b/src/dbUtils.h
@@ -21,8 +21,8 @@
#define MPD_DB_UTILS_H
#include "gcc.h"
+#include "gerror.h"
-#include <glib.h>
#include <stdbool.h>
struct locate_item_list;
diff --git a/src/db_print.h b/src/db_print.h
index 1b957da18..078d4e582 100644
--- a/src/db_print.h
+++ b/src/db_print.h
@@ -21,8 +21,8 @@
#define MPD_DB_PRINT_H
#include "gcc.h"
+#include "gerror.h"
-#include <glib.h>
#include <stdbool.h>
struct client;
diff --git a/src/db_save.h b/src/db_save.h
index e760ec881..d232d7331 100644
--- a/src/db_save.h
+++ b/src/db_save.h
@@ -20,7 +20,8 @@
#ifndef MPD_DB_SAVE_H
#define MPD_DB_SAVE_H
-#include <glib.h>
+#include "gerror.h"
+
#include <stdbool.h>
#include <stdio.h>
diff --git a/src/db_selection.h b/src/db_selection.h
index 2cebb4907..002acdc73 100644
--- a/src/db_selection.h
+++ b/src/db_selection.h
@@ -23,6 +23,7 @@
#include "gcc.h"
#include <assert.h>
+#include <stddef.h>
struct directory;
struct song;
diff --git a/src/encoder_plugin.h b/src/encoder_plugin.h
index 33a379115..68a89d573 100644
--- a/src/encoder_plugin.h
+++ b/src/encoder_plugin.h
@@ -20,7 +20,7 @@
#ifndef MPD_ENCODER_PLUGIN_H
#define MPD_ENCODER_PLUGIN_H
-#include <glib.h>
+#include "gerror.h"
#include <assert.h>
#include <stdbool.h>
diff --git a/src/event_pipe.h b/src/event_pipe.h
index 3734bb86c..3749ccf79 100644
--- a/src/event_pipe.h
+++ b/src/event_pipe.h
@@ -20,8 +20,6 @@
#ifndef EVENT_PIPE_H
#define EVENT_PIPE_H
-#include <glib.h>
-
enum pipe_event {
/** database update was finished */
PIPE_EVENT_UPDATE,
diff --git a/src/filter/null_filter_plugin.c b/src/filter/null_filter_plugin.c
index e7c998827..7728c55bf 100644
--- a/src/filter/null_filter_plugin.c
+++ b/src/filter/null_filter_plugin.c
@@ -29,6 +29,7 @@
#include "filter_internal.h"
#include "filter_registry.h"
+#include <glib.h>
#include <assert.h>
struct null_filter {
diff --git a/src/filter_plugin.h b/src/filter_plugin.h
index 58e34dfb2..d45faee1f 100644
--- a/src/filter_plugin.h
+++ b/src/filter_plugin.h
@@ -26,7 +26,7 @@
#ifndef MPD_FILTER_PLUGIN_H
#define MPD_FILTER_PLUGIN_H
-#include <glib.h>
+#include "gerror.h"
#include <stdbool.h>
#include <stddef.h>
diff --git a/src/gerror.h b/src/gerror.h
new file mode 100644
index 000000000..fe4c54da9
--- /dev/null
+++ b/src/gerror.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2003-2011 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_GERROR_H
+#define MPD_GERROR_H
+
+typedef struct _GError GError;
+
+#endif
diff --git a/src/inotify_source.c b/src/inotify_source.c
index e415f5e72..2fbfdff7e 100644
--- a/src/inotify_source.c
+++ b/src/inotify_source.c
@@ -23,6 +23,8 @@
#include "fd_util.h"
#include "mpd_error.h"
+#include <glib.h>
+
#include <sys/inotify.h>
#include <unistd.h>
#include <errno.h>
diff --git a/src/inotify_source.h b/src/inotify_source.h
index f92e18e39..7aec18b3d 100644
--- a/src/inotify_source.h
+++ b/src/inotify_source.h
@@ -20,7 +20,7 @@
#ifndef MPD_INOTIFY_SOURCE_H
#define MPD_INOTIFY_SOURCE_H
-#include <glib.h>
+#include "gerror.h"
typedef void (*mpd_inotify_callback_t)(int wd, unsigned mask,
const char *name, void *ctx);
diff --git a/src/input_init.h b/src/input_init.h
index ad92cda08..1a73e5ef9 100644
--- a/src/input_init.h
+++ b/src/input_init.h
@@ -20,9 +20,8 @@
#ifndef MPD_INPUT_INIT_H
#define MPD_INPUT_INIT_H
-#include "check.h"
+#include "gerror.h"
-#include <glib.h>
#include <stdbool.h>
/**
diff --git a/src/listen.h b/src/listen.h
index 246e83706..100fe252e 100644
--- a/src/listen.h
+++ b/src/listen.h
@@ -20,7 +20,7 @@
#ifndef MPD_LISTEN_H
#define MPD_LISTEN_H
-#include <glib.h>
+#include "gerror.h"
#include <stdbool.h>
diff --git a/src/mapper.h b/src/mapper.h
index ed4a60b56..da2bf3daf 100644
--- a/src/mapper.h
+++ b/src/mapper.h
@@ -24,6 +24,8 @@
#ifndef MPD_MAPPER_H
#define MPD_MAPPER_H
+#include "gerror.h"
+
#include <glib.h>
#include <stdbool.h>
diff --git a/src/mixer_control.h b/src/mixer_control.h
index 6c3468aca..307298e47 100644
--- a/src/mixer_control.h
+++ b/src/mixer_control.h
@@ -25,7 +25,7 @@
#ifndef MPD_MIXER_CONTROL_H
#define MPD_MIXER_CONTROL_H
-#include <glib.h>
+#include "gerror.h"
#include <stdbool.h>
diff --git a/src/mixer_plugin.h b/src/mixer_plugin.h
index 9532b95cb..2f3beed1d 100644
--- a/src/mixer_plugin.h
+++ b/src/mixer_plugin.h
@@ -27,7 +27,7 @@
#ifndef MPD_MIXER_PLUGIN_H
#define MPD_MIXER_PLUGIN_H
-#include <glib.h>
+#include "gerror.h"
#include <stdbool.h>
diff --git a/src/output/pulse_output_plugin.h b/src/output/pulse_output_plugin.h
index 02a51f27b..b285b5e4d 100644
--- a/src/output/pulse_output_plugin.h
+++ b/src/output/pulse_output_plugin.h
@@ -20,9 +20,9 @@
#ifndef MPD_PULSE_OUTPUT_PLUGIN_H
#define MPD_PULSE_OUTPUT_PLUGIN_H
-#include <stdbool.h>
+#include "gerror.h"
-#include <glib.h>
+#include <stdbool.h>
struct pulse_output;
struct pulse_mixer;
diff --git a/src/output_plugin.h b/src/output_plugin.h
index 209ca6221..7ac8e0c4f 100644
--- a/src/output_plugin.h
+++ b/src/output_plugin.h
@@ -20,6 +20,8 @@
#ifndef MPD_OUTPUT_PLUGIN_H
#define MPD_OUTPUT_PLUGIN_H
+#include "gerror.h"
+
#include <glib.h>
#include <stdbool.h>
diff --git a/src/server_socket.h b/src/server_socket.h
index 7caa4bbf2..f7e9aa4cf 100644
--- a/src/server_socket.h
+++ b/src/server_socket.h
@@ -20,9 +20,10 @@
#ifndef MPD_SERVER_SOCKET_H
#define MPD_SERVER_SOCKET_H
-#include <stdbool.h>
+#include "gerror.h"
-#include <glib.h>
+#include <stdbool.h>
+#include <stddef.h>
struct sockaddr;
diff --git a/src/socket_util.c b/src/socket_util.c
index a06a0cbd5..ee8bf7e1a 100644
--- a/src/socket_util.c
+++ b/src/socket_util.c
@@ -21,6 +21,8 @@
#include "socket_util.h"
#include "fd_util.h"
+#include <glib.h>
+
#include <errno.h>
#include <unistd.h>
diff --git a/src/socket_util.h b/src/socket_util.h
index 93bd27362..4cf845d8e 100644
--- a/src/socket_util.h
+++ b/src/socket_util.h
@@ -26,7 +26,9 @@
#ifndef SOCKET_UTIL_H
#define SOCKET_UTIL_H
-#include <glib.h>
+#include "gerror.h"
+
+#include <stddef.h>
struct sockaddr;
diff --git a/src/sticker.h b/src/sticker.h
index 5545206a5..66f12294b 100644
--- a/src/sticker.h
+++ b/src/sticker.h
@@ -42,7 +42,7 @@
#ifndef STICKER_H
#define STICKER_H
-#include <glib.h>
+#include "gerror.h"
#include <stdbool.h>
@@ -127,8 +127,8 @@ sticker_get_value(const struct sticker *sticker, const char *name);
void
sticker_foreach(const struct sticker *sticker,
void (*func)(const char *name, const char *value,
- gpointer user_data),
- gpointer user_data);
+ void *user_data),
+ void *user_data);
/**
* Loads the sticker for the specified resource.
@@ -153,7 +153,7 @@ sticker_load(const char *type, const char *uri);
bool
sticker_find(const char *type, const char *base_uri, const char *name,
void (*func)(const char *uri, const char *value,
- gpointer user_data),
- gpointer user_data);
+ void *user_data),
+ void *user_data);
#endif
diff --git a/src/sticker_print.c b/src/sticker_print.c
index 65e79513c..b19dcdc9c 100644
--- a/src/sticker_print.c
+++ b/src/sticker_print.c
@@ -30,7 +30,7 @@ sticker_print_value(struct client *client,
}
static void
-print_sticker_cb(const char *name, const char *value, gpointer data)
+print_sticker_cb(const char *name, const char *value, void *data)
{
struct client *client = data;
diff --git a/src/tag_id3.h b/src/tag_id3.h
index 049c53ad9..055d0a3d1 100644
--- a/src/tag_id3.h
+++ b/src/tag_id3.h
@@ -21,6 +21,7 @@
#define MPD_TAG_ID3_H
#include "check.h"
+#include "gerror.h"
#include <glib.h>
diff --git a/src/tokenizer.c b/src/tokenizer.c
index bbb34e100..4a98e882f 100644
--- a/src/tokenizer.c
+++ b/src/tokenizer.c
@@ -21,6 +21,8 @@
#include "tokenizer.h"
#include "string_util.h"
+#include <glib.h>
+
#include <stdbool.h>
#include <assert.h>
#include <string.h>
diff --git a/src/tokenizer.h b/src/tokenizer.h
index d55eb3ca6..2026e5ad6 100644
--- a/src/tokenizer.h
+++ b/src/tokenizer.h
@@ -20,7 +20,7 @@
#ifndef MPD_TOKENIZER_H
#define MPD_TOKENIZER_H
-#include <glib.h>
+#include "gerror.h"
/**
* Reads the next word from the input string. This function modifies
diff --git a/src/utils.h b/src/utils.h
index f8d6657f2..ba7307ded 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -20,7 +20,8 @@
#ifndef MPD_UTILS_H
#define MPD_UTILS_H
-#include <glib.h>
+#include "gerror.h"
+
#include <stdbool.h>
#ifndef assert_static
diff --git a/test/run_inotify.c b/test/run_inotify.c
index 3e7c70dba..4ceb60229 100644
--- a/test/run_inotify.c
+++ b/test/run_inotify.c
@@ -20,6 +20,8 @@
#include "config.h"
#include "inotify_source.h"
+#include <glib.h>
+
#include <stdbool.h>
#include <sys/inotify.h>
#include <signal.h>