diff options
author | Max Kellermann <max@duempel.org> | 2009-03-02 20:13:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-02 20:13:08 +0100 |
commit | 2e51365ea4b636560d234b0b937a6c8dfb528c10 (patch) | |
tree | 2ccaf460e326b6d474aa0b2df7873bf6c0a475d7 /src | |
parent | 8694574f6329ad6e55b9a6673506eca697da360d (diff) | |
download | mpd-2e51365ea4b636560d234b0b937a6c8dfb528c10.tar.gz mpd-2e51365ea4b636560d234b0b937a6c8dfb528c10.tar.xz mpd-2e51365ea4b636560d234b0b937a6c8dfb528c10.zip |
input_stream: moved struct input_plugin to input_plugin.h
Start to separate private from public input_stream API.
Diffstat (limited to '')
-rw-r--r-- | src/archive/bz2_plugin.c | 2 | ||||
-rw-r--r-- | src/archive/iso_plugin.c | 2 | ||||
-rw-r--r-- | src/archive/zip_plugin.c | 2 | ||||
-rw-r--r-- | src/input_archive.c | 2 | ||||
-rw-r--r-- | src/input_curl.c | 2 | ||||
-rw-r--r-- | src/input_file.c | 1 | ||||
-rw-r--r-- | src/input_file.h | 2 | ||||
-rw-r--r-- | src/input_mms.c | 2 | ||||
-rw-r--r-- | src/input_plugin.h | 41 | ||||
-rw-r--r-- | src/input_stream.c | 2 | ||||
-rw-r--r-- | src/input_stream.h | 11 |
11 files changed, 49 insertions, 20 deletions
diff --git a/src/archive/bz2_plugin.c b/src/archive/bz2_plugin.c index d7f33e383..3ca87e54d 100644 --- a/src/archive/bz2_plugin.c +++ b/src/archive/bz2_plugin.c @@ -21,7 +21,7 @@ */ #include "archive_api.h" -#include "input_stream.h" +#include "input_plugin.h" #include "config.h" #include <stdint.h> diff --git a/src/archive/iso_plugin.c b/src/archive/iso_plugin.c index b5ac7f6ca..9a553b393 100644 --- a/src/archive/iso_plugin.c +++ b/src/archive/iso_plugin.c @@ -21,7 +21,7 @@ */ #include "archive_api.h" -#include "input_stream.h" +#include "input_plugin.h" #include <cdio/cdio.h> #include <cdio/iso9660.h> diff --git a/src/archive/zip_plugin.c b/src/archive/zip_plugin.c index 7231d4904..d64e83b62 100644 --- a/src/archive/zip_plugin.c +++ b/src/archive/zip_plugin.c @@ -22,7 +22,7 @@ #include "archive_api.h" #include "archive_api.h" -#include "input_stream.h" +#include "input_plugin.h" #include <zzip/zzip.h> #include <glib.h> diff --git a/src/input_archive.c b/src/input_archive.c index 26a44d2f4..22ebde8d4 100644 --- a/src/input_archive.c +++ b/src/input_archive.c @@ -19,7 +19,7 @@ #include "input_archive.h" #include "archive_api.h" #include "archive_list.h" -#include "input_stream.h" +#include "input_plugin.h" #include <glib.h> diff --git a/src/input_curl.c b/src/input_curl.c index 47fc594e8..337e438af 100644 --- a/src/input_curl.c +++ b/src/input_curl.c @@ -17,7 +17,7 @@ */ #include "input_curl.h" -#include "input_stream.h" +#include "input_plugin.h" #include "conf.h" #include "config.h" #include "tag.h" diff --git a/src/input_file.c b/src/input_file.c index b29a412f9..5334d453e 100644 --- a/src/input_file.c +++ b/src/input_file.c @@ -17,6 +17,7 @@ */ #include "input_file.h" +#include "input_plugin.h" #include <sys/stat.h> #include <fcntl.h> diff --git a/src/input_file.h b/src/input_file.h index 7f3351d19..c4233d071 100644 --- a/src/input_file.h +++ b/src/input_file.h @@ -19,8 +19,6 @@ #ifndef MPD_INPUT_FILE_H #define MPD_INPUT_FILE_H -#include "input_stream.h" - extern const struct input_plugin input_plugin_file; #endif diff --git a/src/input_mms.c b/src/input_mms.c index d81be0845..34dce5b6e 100644 --- a/src/input_mms.c +++ b/src/input_mms.c @@ -17,7 +17,7 @@ */ #include "input_mms.h" -#include "input_stream.h" +#include "input_plugin.h" #include <glib.h> #include <libmms/mmsx.h> diff --git a/src/input_plugin.h b/src/input_plugin.h new file mode 100644 index 000000000..8f846373a --- /dev/null +++ b/src/input_plugin.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2003-2009 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef MPD_INPUT_PLUGIN_H +#define MPD_INPUT_PLUGIN_H + +#include "input_stream.h" + +#include <stddef.h> +#include <stdbool.h> +#include <sys/types.h> + +struct input_stream; + +struct input_plugin { + bool (*open)(struct input_stream *is, const char *url); + void (*close)(struct input_stream *is); + + struct tag *(*tag)(struct input_stream *is); + int (*buffer)(struct input_stream *is); + size_t (*read)(struct input_stream *is, void *ptr, size_t size); + bool (*eof)(struct input_stream *is); + bool (*seek)(struct input_stream *is, off_t offset, int whence); +}; + +#endif diff --git a/src/input_stream.c b/src/input_stream.c index 4375db948..794dd1980 100644 --- a/src/input_stream.c +++ b/src/input_stream.c @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "input_stream.h" +#include "input_plugin.h" #include "config.h" #include "input_file.h" diff --git a/src/input_stream.h b/src/input_stream.h index d8698c4cd..e2ada0ef6 100644 --- a/src/input_stream.h +++ b/src/input_stream.h @@ -25,17 +25,6 @@ struct input_stream; -struct input_plugin { - bool (*open)(struct input_stream *is, const char *url); - void (*close)(struct input_stream *is); - - struct tag *(*tag)(struct input_stream *is); - int (*buffer)(struct input_stream *is); - size_t (*read)(struct input_stream *is, void *ptr, size_t size); - bool (*eof)(struct input_stream *is); - bool (*seek)(struct input_stream *is, off_t offset, int whence); -}; - struct input_stream { /** * the plugin which implements this input stream |