diff options
author | Max Kellermann <max@duempel.org> | 2013-01-24 19:14:40 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-26 01:24:01 +0100 |
commit | 0273cd44b0b50d5d320ce88cc1472e0d8ee8e529 (patch) | |
tree | 7c493850ab07deddd637ca0b5e8b3476e40a68fc /src/InputStream.cxx | |
parent | 3203a7dd8ce8db6afcc54d68d63b4f4af7dc4c7f (diff) |
input_stream: forward-declare the struct
Hide the definition from C code, to prepare the transition to C++.
Diffstat (limited to 'src/InputStream.cxx')
-rw-r--r-- | src/InputStream.cxx | 48 |
1 files changed, 47 insertions, 1 deletions
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) { |