1 #ifndef HAVE_WEB_STREAM_H
2 #define HAVE_WEB_STREAM_H 1
11 #include <curl/curl.h>
24 URL_MODE_READ, URL_MODE_WRITE
39 static size_t read_callback(
void *ptr,
size_t size,
size_t nmemb,
void *device);
40 static size_t write_callback(
void *ptr,
size_t size,
size_t nmemm,
void *device);
117 std::streambuf::int_type underflow();
147 std::streambuf::int_type overflow(std::streambuf::int_type c);
177 ~
web_ostream() { rdbuf()->pubsync();
delete rdbuf(); };
194 int removeFtpFile(
const char* url);
197 static size_t write_callback(
void *ptr,
size_t size,
size_t nmemb,
void *_device);
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in c...
Definition: http_client.cpp:23
void loop()
loop to fetch/send more data
Definition: WebStream.cpp:207
bool waiting
indicate if the device is still waiting for more data
Definition: WebStream.hpp:62
WebStreambufBase(const char *url, URLMode mode, int bufsize)
Open URL device using the given URL and flags.
Definition: WebStream.cpp:126
Base class for Boost Device implementations allowing to access remote (ftp://, http://, https://) URLs as stdio streams, similar to fstream.
Definition: WebStream.hpp:35
Main type for opening an output stream to an URL for writing.
Definition: WebStream.hpp:171
Definition: WebStream.hpp:44
bool finishing
indicate if device is already finishing transfer (i.e. no more reads/writes)
Definition: WebStream.hpp:61
Main type for opening an input stream to an URL for reading.
Definition: WebStream.hpp:185
char * buffer
internal buffer for storing data from last read
Definition: WebStream.hpp:57
A Boost Device implementation allowing read access.
Definition: WebStream.hpp:105
int buffer_size
allocated buffer size
Definition: WebStream.hpp:58
A Boost Device implementation allowing write access.
Definition: WebStream.hpp:136
char * buffer_position
cURL position in buffer (when sending/receiving data)
Definition: WebStream.hpp:59
virtual ~WebStreambufBase()
Clean up resources occupied by device, e.g.
Definition: WebStream.cpp:185