|
Aegis
4.25.D505
|
#include <curl.h>
Public Member Functions | |
| virtual | ~input_curl () |
| input_curl (const nstring &url) | |
| void | progress_callback (double down_total, double down_current) |
| size_t | write_callback (char *data, size_t nbytes) |
| void | read_error () |
| nstring | name () |
| off_t | length () |
| ssize_t | read_inner (void *data, size_t nbytes) |
| off_t | ftell_inner () |
| bool | is_remote () const |
| bool | verify_handle (CURL *x) const |
| void | eof_notify () |
Static Public Member Functions | |
| static bool | looks_likely (const nstring &fn) |
Private Member Functions | |
| long | read_data (void *data, size_t len) |
| input_curl () | |
| input_curl (const input_curl &arg) | |
| input_curl & | operator= (const input_curl &arg) |
Private Attributes | |
| CURL * | handle |
| nstring | fn |
| off_t | pos |
| char * | curl_buffer |
| size_t | curl_buffer_maximum |
| size_t | curl_buffer_position |
| size_t | curl_buffer_length |
| bool | eof |
| char | errbuf [CURL_ERROR_SIZE] |
| time_t | progress_start |
| char * | progress_buffer |
| int | progress_buflen |
| int | progress_cleanup |
| nstring | proxy |
| nstring | userpass |
The input_curl class is used to represent an input obtained via libcurl.
| virtual input_curl::~input_curl | ( | ) | [virtual] |
The destructor.
| input_curl::input_curl | ( | const nstring & | url | ) |
The constructor.
| input_curl::input_curl | ( | ) | [private] |
The default constructor. Do not use.
| input_curl::input_curl | ( | const input_curl & | arg | ) | [private] |
The copy constructor. Do not use.
| void input_curl::eof_notify | ( | ) | [inline] |
| off_t input_curl::ftell_inner | ( | ) | [virtual] |
The ftell_inner method is used to determine the unbuffered current position within the input.
Implements input_ty.
| bool input_curl::is_remote | ( | ) | const [virtual] |
The is_remote method is used to determine whether or not an input stream is from a local file or a remote source. This is only intended to be a generally informative thing, to provide information to the user, it isn't (and can't be) utterly precise.
Reimplemented from input_ty.
| off_t input_curl::length | ( | ) | [virtual] |
The length method is used to determine the length of the input. May return -1 if the length is unknown.
Implements input_ty.
| static bool input_curl::looks_likely | ( | const nstring & | fn | ) | [static] |
The looks_likely class method is used to examine a filename and see if it starts with a prototype name (e.g. http: or ftp:) making it a likely candidate for the input_curl class.
| nstring input_curl::name | ( | ) | [virtual] |
The name method is used to determine the name of the input.
Implements input_ty.
| input_curl& input_curl::operator= | ( | const input_curl & | arg | ) | [private] |
The assignment operator. Do not use.
| void input_curl::progress_callback | ( | double | down_total, |
| double | down_current | ||
| ) |
| long input_curl::read_data | ( | void * | data, |
| size_t | len | ||
| ) | [private] |
| void input_curl::read_error | ( | ) |
| ssize_t input_curl::read_inner | ( | void * | data, |
| size_t | nbytes | ||
| ) | [virtual] |
The read_inner method is used to read unbuffered data from the given input stream. At most nbytes bytes will be read into data. The number of bytes actually read will be returned. At end-of-file, a value <= 0 will be returned, and data will be unchanged. All file read errors or format errors are fatal, and will cause the method to not return.
| data | Where to put the results of the read. |
| nbytes | The maximum number of bytes to read. |
Implements input_ty.
| bool input_curl::verify_handle | ( | CURL * | x | ) | const [inline] |
| size_t input_curl::write_callback | ( | char * | data, |
| size_t | nbytes | ||
| ) |
char* input_curl::curl_buffer [private] |
size_t input_curl::curl_buffer_length [private] |
size_t input_curl::curl_buffer_maximum [private] |
size_t input_curl::curl_buffer_position [private] |
bool input_curl::eof [private] |
char input_curl::errbuf[CURL_ERROR_SIZE] [private] |
nstring input_curl::fn [private] |
CURL* input_curl::handle [private] |
off_t input_curl::pos [private] |
char* input_curl::progress_buffer [private] |
int input_curl::progress_buflen [private] |
int input_curl::progress_cleanup [private] |
time_t input_curl::progress_start [private] |
nstring input_curl::proxy [private] |
nstring input_curl::userpass [private] |
1.7.6.1