Aegis  4.25.D505
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
input_curl Class Reference

#include <curl.h>

Inheritance diagram for input_curl:
input_ty

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_curloperator= (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

Detailed Description

The input_curl class is used to represent an input obtained via libcurl.

Definition at line 32 of file curl.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void input_curl::eof_notify ( ) [inline]

Definition at line 79 of file curl.h.

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]
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.

Parameters:
dataWhere to put the results of the read.
nbytesThe maximum number of bytes to read.
Returns:
The actual number of bytes read, or zero for end-of-file.

Implements input_ty.

bool input_curl::verify_handle ( CURL *  x) const [inline]

Definition at line 77 of file curl.h.

size_t input_curl::write_callback ( char *  data,
size_t  nbytes 
)

Field Documentation

char* input_curl::curl_buffer [private]

Definition at line 87 of file curl.h.

Definition at line 96 of file curl.h.

Definition at line 90 of file curl.h.

Definition at line 93 of file curl.h.

bool input_curl::eof [private]

Definition at line 99 of file curl.h.

Definition at line 101 of file curl.h.

Definition at line 83 of file curl.h.

CURL* input_curl::handle [private]

Definition at line 82 of file curl.h.

off_t input_curl::pos [private]

Definition at line 84 of file curl.h.

char* input_curl::progress_buffer [private]

Definition at line 104 of file curl.h.

Definition at line 105 of file curl.h.

Definition at line 106 of file curl.h.

time_t input_curl::progress_start [private]

Definition at line 103 of file curl.h.

Definition at line 108 of file curl.h.

Definition at line 109 of file curl.h.


The documentation for this class was generated from the following file: