input_stream: forward-declare the struct

Hide the definition from C code, to prepare the transition to C++.
This commit is contained in:
Max Kellermann
2013-01-24 19:14:40 +01:00
parent 3203a7dd8c
commit 0273cd44b0
40 changed files with 270 additions and 144 deletions

View File

@@ -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)
{