input_stream: rename struct to InputStream
This commit is contained in:
@@ -39,13 +39,13 @@
|
||||
* parent_stream so tar plugin fetches file data from gzip
|
||||
* plugin and gzip fetches file from disk
|
||||
*/
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_archive_open(const char *pathname,
|
||||
Mutex &mutex, Cond &cond,
|
||||
Error &error)
|
||||
{
|
||||
const struct archive_plugin *arplug;
|
||||
struct input_stream *is;
|
||||
InputStream *is;
|
||||
|
||||
if (!PathTraits::IsAbsoluteFS(pathname))
|
||||
return NULL;
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#include <cdio/cd_types.h>
|
||||
|
||||
struct CdioParanoiaInputStream {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
cdrom_drive_t *drv;
|
||||
CdIo_t *cdio;
|
||||
@@ -78,7 +78,7 @@ struct CdioParanoiaInputStream {
|
||||
static constexpr Domain cdio_domain("cdio");
|
||||
|
||||
static void
|
||||
input_cdio_close(struct input_stream *is)
|
||||
input_cdio_close(InputStream *is)
|
||||
{
|
||||
CdioParanoiaInputStream *i = (CdioParanoiaInputStream *)is;
|
||||
|
||||
@@ -149,7 +149,7 @@ cdio_detect_device(void)
|
||||
return path;
|
||||
}
|
||||
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_cdio_open(const char *uri,
|
||||
Mutex &mutex, Cond &cond,
|
||||
Error &error)
|
||||
@@ -247,7 +247,7 @@ input_cdio_open(const char *uri,
|
||||
}
|
||||
|
||||
static bool
|
||||
input_cdio_seek(struct input_stream *is,
|
||||
input_cdio_seek(InputStream *is,
|
||||
InputPlugin::offset_type offset, int whence, Error &error)
|
||||
{
|
||||
CdioParanoiaInputStream *cis = (CdioParanoiaInputStream *)is;
|
||||
@@ -284,7 +284,7 @@ input_cdio_seek(struct input_stream *is,
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_cdio_read(struct input_stream *is, void *ptr, size_t length,
|
||||
input_cdio_read(InputStream *is, void *ptr, size_t length,
|
||||
Error &error)
|
||||
{
|
||||
CdioParanoiaInputStream *cis = (CdioParanoiaInputStream *)is;
|
||||
@@ -354,7 +354,7 @@ input_cdio_read(struct input_stream *is, void *ptr, size_t length,
|
||||
}
|
||||
|
||||
static bool
|
||||
input_cdio_eof(struct input_stream *is)
|
||||
input_cdio_eof(InputStream *is)
|
||||
{
|
||||
CdioParanoiaInputStream *cis = (CdioParanoiaInputStream *)is;
|
||||
|
||||
|
@@ -131,7 +131,7 @@ public:
|
||||
};
|
||||
|
||||
struct input_curl {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
/* some buffers which were passed to libcurl, which we have
|
||||
too free */
|
||||
@@ -162,7 +162,7 @@ struct input_curl {
|
||||
std::string meta_name;
|
||||
|
||||
/** the tag object ready to be requested via
|
||||
input_stream::ReadTag() */
|
||||
InputStream::ReadTag() */
|
||||
Tag *tag;
|
||||
|
||||
Error postponed_error;
|
||||
@@ -636,7 +636,7 @@ input_curl::~input_curl()
|
||||
}
|
||||
|
||||
static bool
|
||||
input_curl_check(struct input_stream *is, Error &error)
|
||||
input_curl_check(InputStream *is, Error &error)
|
||||
{
|
||||
struct input_curl *c = (struct input_curl *)is;
|
||||
|
||||
@@ -650,7 +650,7 @@ input_curl_check(struct input_stream *is, Error &error)
|
||||
}
|
||||
|
||||
static Tag *
|
||||
input_curl_tag(struct input_stream *is)
|
||||
input_curl_tag(InputStream *is)
|
||||
{
|
||||
struct input_curl *c = (struct input_curl *)is;
|
||||
Tag *tag = c->tag;
|
||||
@@ -741,7 +741,7 @@ copy_icy_tag(struct input_curl *c)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_curl_available(struct input_stream *is)
|
||||
input_curl_available(InputStream *is)
|
||||
{
|
||||
struct input_curl *c = (struct input_curl *)is;
|
||||
|
||||
@@ -750,7 +750,7 @@ input_curl_available(struct input_stream *is)
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_curl_read(struct input_stream *is, void *ptr, size_t size,
|
||||
input_curl_read(InputStream *is, void *ptr, size_t size,
|
||||
Error &error)
|
||||
{
|
||||
struct input_curl *c = (struct input_curl *)is;
|
||||
@@ -795,7 +795,7 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size,
|
||||
}
|
||||
|
||||
static void
|
||||
input_curl_close(struct input_stream *is)
|
||||
input_curl_close(InputStream *is)
|
||||
{
|
||||
struct input_curl *c = (struct input_curl *)is;
|
||||
|
||||
@@ -803,7 +803,7 @@ input_curl_close(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_curl_eof(gcc_unused struct input_stream *is)
|
||||
input_curl_eof(gcc_unused InputStream *is)
|
||||
{
|
||||
struct input_curl *c = (struct input_curl *)is;
|
||||
|
||||
@@ -976,7 +976,7 @@ input_curl_easy_init(struct input_curl *c, Error &error)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_curl_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
input_curl_seek(InputStream *is, InputPlugin::offset_type offset,
|
||||
int whence,
|
||||
Error &error)
|
||||
{
|
||||
@@ -1080,7 +1080,7 @@ input_curl_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_curl_open(const char *url, Mutex &mutex, Cond &cond,
|
||||
Error &error)
|
||||
{
|
||||
|
@@ -38,7 +38,7 @@ extern "C" {
|
||||
#include <stdio.h>
|
||||
|
||||
struct DespotifyInputStream {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
struct despotify_session *session;
|
||||
struct ds_track *track;
|
||||
@@ -121,7 +121,7 @@ static void callback(gcc_unused struct despotify_session* ds,
|
||||
}
|
||||
|
||||
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_despotify_open(const char *url,
|
||||
Mutex &mutex, Cond &cond,
|
||||
gcc_unused Error &error)
|
||||
@@ -171,7 +171,7 @@ input_despotify_open(const char *url,
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_despotify_read(struct input_stream *is, void *ptr, size_t size,
|
||||
input_despotify_read(InputStream *is, void *ptr, size_t size,
|
||||
gcc_unused Error &error)
|
||||
{
|
||||
DespotifyInputStream *ctx = (DespotifyInputStream *)is;
|
||||
@@ -191,7 +191,7 @@ input_despotify_read(struct input_stream *is, void *ptr, size_t size,
|
||||
}
|
||||
|
||||
static void
|
||||
input_despotify_close(struct input_stream *is)
|
||||
input_despotify_close(InputStream *is)
|
||||
{
|
||||
DespotifyInputStream *ctx = (DespotifyInputStream *)is;
|
||||
|
||||
@@ -200,7 +200,7 @@ input_despotify_close(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_despotify_eof(struct input_stream *is)
|
||||
input_despotify_eof(InputStream *is)
|
||||
{
|
||||
DespotifyInputStream *ctx = (DespotifyInputStream *)is;
|
||||
|
||||
@@ -208,7 +208,7 @@ input_despotify_eof(struct input_stream *is)
|
||||
}
|
||||
|
||||
static Tag *
|
||||
input_despotify_tag(struct input_stream *is)
|
||||
input_despotify_tag(InputStream *is)
|
||||
{
|
||||
DespotifyInputStream *ctx = (DespotifyInputStream *)is;
|
||||
Tag *tag = ctx->tag;
|
||||
|
@@ -36,7 +36,7 @@ extern "C" {
|
||||
#include <glib.h>
|
||||
|
||||
struct FfmpegInputStream {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
AVIOContext *h;
|
||||
|
||||
@@ -86,7 +86,7 @@ input_ffmpeg_init(gcc_unused const config_param ¶m,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_ffmpeg_open(const char *uri,
|
||||
Mutex &mutex, Cond &cond,
|
||||
Error &error)
|
||||
@@ -112,7 +112,7 @@ input_ffmpeg_open(const char *uri,
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_ffmpeg_read(struct input_stream *is, void *ptr, size_t size,
|
||||
input_ffmpeg_read(InputStream *is, void *ptr, size_t size,
|
||||
Error &error)
|
||||
{
|
||||
FfmpegInputStream *i = (FfmpegInputStream *)is;
|
||||
@@ -131,7 +131,7 @@ input_ffmpeg_read(struct input_stream *is, void *ptr, size_t size,
|
||||
}
|
||||
|
||||
static void
|
||||
input_ffmpeg_close(struct input_stream *is)
|
||||
input_ffmpeg_close(InputStream *is)
|
||||
{
|
||||
FfmpegInputStream *i = (FfmpegInputStream *)is;
|
||||
|
||||
@@ -139,7 +139,7 @@ input_ffmpeg_close(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_ffmpeg_eof(struct input_stream *is)
|
||||
input_ffmpeg_eof(InputStream *is)
|
||||
{
|
||||
FfmpegInputStream *i = (FfmpegInputStream *)is;
|
||||
|
||||
@@ -147,7 +147,7 @@ input_ffmpeg_eof(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_ffmpeg_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
input_ffmpeg_seek(InputStream *is, InputPlugin::offset_type offset,
|
||||
int whence,
|
||||
Error &error)
|
||||
{
|
||||
|
@@ -36,7 +36,7 @@
|
||||
static constexpr Domain file_domain("file");
|
||||
|
||||
struct FileInputStream {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
int fd;
|
||||
|
||||
@@ -54,7 +54,7 @@ struct FileInputStream {
|
||||
}
|
||||
};
|
||||
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_file_open(const char *filename,
|
||||
Mutex &mutex, Cond &cond,
|
||||
Error &error)
|
||||
@@ -96,7 +96,7 @@ input_file_open(const char *filename,
|
||||
}
|
||||
|
||||
static bool
|
||||
input_file_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
input_file_seek(InputStream *is, InputPlugin::offset_type offset,
|
||||
int whence,
|
||||
Error &error)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ input_file_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_file_read(struct input_stream *is, void *ptr, size_t size,
|
||||
input_file_read(InputStream *is, void *ptr, size_t size,
|
||||
Error &error)
|
||||
{
|
||||
FileInputStream *fis = (FileInputStream *)is;
|
||||
@@ -130,7 +130,7 @@ input_file_read(struct input_stream *is, void *ptr, size_t size,
|
||||
}
|
||||
|
||||
static void
|
||||
input_file_close(struct input_stream *is)
|
||||
input_file_close(InputStream *is)
|
||||
{
|
||||
FileInputStream *fis = (FileInputStream *)is;
|
||||
|
||||
@@ -138,7 +138,7 @@ input_file_close(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_file_eof(struct input_stream *is)
|
||||
input_file_eof(InputStream *is)
|
||||
{
|
||||
return is->offset >= is->size;
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
struct MmsInputStream {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
mmsx_t *mms;
|
||||
|
||||
@@ -56,7 +56,7 @@ struct MmsInputStream {
|
||||
|
||||
static constexpr Domain mms_domain("mms");
|
||||
|
||||
static struct input_stream *
|
||||
static InputStream *
|
||||
input_mms_open(const char *url,
|
||||
Mutex &mutex, Cond &cond,
|
||||
Error &error)
|
||||
@@ -78,7 +78,7 @@ input_mms_open(const char *url,
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_mms_read(struct input_stream *is, void *ptr, size_t size,
|
||||
input_mms_read(InputStream *is, void *ptr, size_t size,
|
||||
Error &error)
|
||||
{
|
||||
MmsInputStream *m = (MmsInputStream *)is;
|
||||
@@ -99,7 +99,7 @@ input_mms_read(struct input_stream *is, void *ptr, size_t size,
|
||||
}
|
||||
|
||||
static void
|
||||
input_mms_close(struct input_stream *is)
|
||||
input_mms_close(InputStream *is)
|
||||
{
|
||||
MmsInputStream *m = (MmsInputStream *)is;
|
||||
|
||||
@@ -107,7 +107,7 @@ input_mms_close(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_mms_eof(struct input_stream *is)
|
||||
input_mms_eof(InputStream *is)
|
||||
{
|
||||
MmsInputStream *m = (MmsInputStream *)is;
|
||||
|
||||
|
@@ -30,9 +30,9 @@
|
||||
extern const InputPlugin rewind_input_plugin;
|
||||
|
||||
struct RewindInputStream {
|
||||
struct input_stream base;
|
||||
InputStream base;
|
||||
|
||||
struct input_stream *input;
|
||||
InputStream *input;
|
||||
|
||||
/**
|
||||
* The read position within the buffer. Undefined as long as
|
||||
@@ -55,7 +55,7 @@ struct RewindInputStream {
|
||||
*/
|
||||
char buffer[64 * 1024];
|
||||
|
||||
RewindInputStream(input_stream *_input)
|
||||
RewindInputStream(InputStream *_input)
|
||||
:base(rewind_input_plugin, _input->uri.c_str(),
|
||||
_input->mutex, _input->cond),
|
||||
input(_input), tail(0) {
|
||||
@@ -80,8 +80,8 @@ struct RewindInputStream {
|
||||
* attributes.
|
||||
*/
|
||||
void CopyAttributes() {
|
||||
struct input_stream *dest = &base;
|
||||
const struct input_stream *src = input;
|
||||
InputStream *dest = &base;
|
||||
const InputStream *src = input;
|
||||
|
||||
assert(dest != src);
|
||||
|
||||
@@ -98,7 +98,7 @@ struct RewindInputStream {
|
||||
};
|
||||
|
||||
static void
|
||||
input_rewind_close(struct input_stream *is)
|
||||
input_rewind_close(InputStream *is)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
|
||||
@@ -106,7 +106,7 @@ input_rewind_close(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_rewind_check(struct input_stream *is, Error &error)
|
||||
input_rewind_check(InputStream *is, Error &error)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
|
||||
@@ -114,7 +114,7 @@ input_rewind_check(struct input_stream *is, Error &error)
|
||||
}
|
||||
|
||||
static void
|
||||
input_rewind_update(struct input_stream *is)
|
||||
input_rewind_update(InputStream *is)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
|
||||
@@ -123,7 +123,7 @@ input_rewind_update(struct input_stream *is)
|
||||
}
|
||||
|
||||
static Tag *
|
||||
input_rewind_tag(struct input_stream *is)
|
||||
input_rewind_tag(InputStream *is)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
|
||||
@@ -131,7 +131,7 @@ input_rewind_tag(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_rewind_available(struct input_stream *is)
|
||||
input_rewind_available(InputStream *is)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
|
||||
@@ -139,7 +139,7 @@ input_rewind_available(struct input_stream *is)
|
||||
}
|
||||
|
||||
static size_t
|
||||
input_rewind_read(struct input_stream *is, void *ptr, size_t size,
|
||||
input_rewind_read(InputStream *is, void *ptr, size_t size,
|
||||
Error &error)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
@@ -182,7 +182,7 @@ input_rewind_read(struct input_stream *is, void *ptr, size_t size,
|
||||
}
|
||||
|
||||
static bool
|
||||
input_rewind_eof(struct input_stream *is)
|
||||
input_rewind_eof(InputStream *is)
|
||||
{
|
||||
RewindInputStream *r = (RewindInputStream *)is;
|
||||
|
||||
@@ -190,7 +190,7 @@ input_rewind_eof(struct input_stream *is)
|
||||
}
|
||||
|
||||
static bool
|
||||
input_rewind_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
input_rewind_seek(InputStream *is, InputPlugin::offset_type offset,
|
||||
int whence,
|
||||
Error &error)
|
||||
{
|
||||
@@ -237,8 +237,8 @@ const InputPlugin rewind_input_plugin = {
|
||||
input_rewind_seek,
|
||||
};
|
||||
|
||||
struct input_stream *
|
||||
input_rewind_open(struct input_stream *is)
|
||||
InputStream *
|
||||
input_rewind_open(InputStream *is)
|
||||
{
|
||||
assert(is != NULL);
|
||||
assert(is->offset == 0);
|
||||
|
@@ -29,9 +29,9 @@
|
||||
|
||||
#include "check.h"
|
||||
|
||||
struct input_stream;
|
||||
struct InputStream;
|
||||
|
||||
struct input_stream *
|
||||
input_rewind_open(struct input_stream *is);
|
||||
InputStream *
|
||||
input_rewind_open(InputStream *is);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user