From 0273cd44b0b50d5d320ce88cc1472e0d8ee8e529 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 24 Jan 2013 19:14:40 +0100 Subject: input_stream: forward-declare the struct Hide the definition from C code, to prepare the transition to C++. --- src/InputStream.cxx | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'src/InputStream.cxx') diff --git a/src/InputStream.cxx b/src/InputStream.cxx index a39af2bd..e55450d9 100644 --- a/src/InputStream.cxx +++ b/src/InputStream.cxx @@ -18,7 +18,7 @@ */ #include "config.h" -#include "input_stream.h" +#include "InputStream.hxx" #include "InputRegistry.hxx" #include "InputPlugin.hxx" #include "input/RewindInputPlugin.hxx" @@ -118,6 +118,52 @@ input_stream_lock_wait_ready(struct input_stream *is) g_mutex_unlock(is->mutex); } +const char * +input_stream_get_mime_type(const struct input_stream *is) +{ + assert(is != NULL); + assert(is->ready); + + return is->mime; +} + +void +input_stream_override_mime_type(struct input_stream *is, const char *mime) +{ + assert(is != NULL); + assert(is->ready); + + g_free(is->mime); + is->mime = g_strdup(mime); +} + +goffset +input_stream_get_size(const struct input_stream *is) +{ + assert(is != NULL); + assert(is->ready); + + return is->size; +} + +goffset +input_stream_get_offset(const struct input_stream *is) +{ + assert(is != NULL); + assert(is->ready); + + return is->offset; +} + +bool +input_stream_is_seekable(const struct input_stream *is) +{ + assert(is != NULL); + assert(is->ready); + + return is->seekable; +} + bool input_stream_cheap_seeking(const struct input_stream *is) { -- cgit v1.2.3