Public Member Functions | |
curl_transfer (const curl_transfer &)=delete | |
curl_transfer (const std::string &host, const std::string &user_arg, const std::string &passwd, std::ostream &os) | |
curl_transfer (const std::string &url_str, std::ostream &os) | |
curl_transfer (void) | |
~curl_transfer (void) | |
void | ascii (void) |
void | binary (void) |
void | cookie_jar (const std::string &filename) |
void | cwd (const std::string &path) |
void | del (const std::string &file) |
void | dir (void) |
void | form_data_post (const Array< std::string > ¶m) |
void | get (const std::string &file, std::ostream &os) |
void | get_fileinfo (const std::string &filename, double &filesize, time_t &filetime, bool &fileisdir) |
bool | good (void) const |
void | http_action (const Array< std::string > ¶m, const std::string &action) |
void | http_get (const Array< std::string > ¶m) |
void | http_post (const Array< std::string > ¶m) |
bool | is_ascii (void) const |
bool | is_binary (void) const |
bool | is_valid (void) const |
std::string | lasterror (void) const |
string_vector | list (void) |
void | mget_directory (const std::string &directory, const std::string &target) |
void | mkdir (const std::string &path) |
string_vector | mput_directory (const std::string &base, const std::string &directory) |
curl_transfer & | operator= (const curl_transfer &)=delete |
void | perform (void) |
void | put (const std::string &file, std::istream &is) |
std::string | pwd (void) |
void | rename (const std::string &oldname, const std::string &newname) |
void | rmdir (const std::string &path) |
void | set_header_fields (const Array< std::string > ¶m) |
std::istream & | set_istream (std::istream &is) |
std::ostream & | set_ostream (std::ostream &os) |
void | set_weboptions (const struct weboptions &options) |
Protected Attributes | |
bool | m_ascii_mode |
std::istream * | m_curr_istream |
std::ostream * | m_curr_ostream |
std::string | m_errmsg |
bool | m_ftp |
std::string | m_host_or_url |
bool | m_ok |
bool | m_valid |
Private Member Functions | |
std::string | form_query_string (const Array< std::string > ¶m) |
void | ftp_file_or_dir_action (const std::string &file_or_dir, const std::string &action) |
void | init (const std::string &user, const std::string &passwd, std::istream &is, std::ostream &os) |
Static Private Member Functions | |
static void | delete_file (const std::string &file) |
static void | reset_path (base_url_transfer *curl_xfer) |
Private Attributes | |
CURL * | m_curl |
CURLcode | m_errnum |
std::string | m_url |
std::string | m_userpwd |
Definition at line 300 of file url-transfer.cc.
|
inline |
Definition at line 304 of file url-transfer.cc.
References m_curl, octave::base_url_transfer::m_errmsg, and octave::base_url_transfer::m_valid.
|
inline |
Definition at line 314 of file url-transfer.cc.
References init(), m_curl, octave::base_url_transfer::m_errmsg, m_url, octave::base_url_transfer::m_valid, perform(), and SETOPT.
|
inline |
Definition at line 336 of file url-transfer.cc.
References octave::sys::env::getenv(), init(), m_curl, octave::base_url_transfer::m_errmsg, octave::base_url_transfer::m_valid, and SETOPT.
|
delete |
|
inline |
Definition at line 373 of file url-transfer.cc.
References m_curl.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 415 of file url-transfer.cc.
References octave::base_url_transfer::m_ascii_mode, and SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 421 of file url-transfer.cc.
References octave::base_url_transfer::m_ascii_mode, and SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 698 of file url-transfer.cc.
References SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 427 of file url-transfer.cc.
References ftp_file_or_dir_action(), and path.
Referenced by get_fileinfo().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 432 of file url-transfer.cc.
References ftp_file_or_dir_action().
|
staticprivateinherited |
Definition at line 74 of file url-transfer.cc.
References octave::sys::unlink().
Referenced by octave::base_url_transfer::mget_directory().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 503 of file url-transfer.cc.
References octave::base_url_transfer::good(), octave::base_url_transfer::m_host_or_url, m_url, perform(), and SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 733 of file url-transfer.cc.
References octave::action_container::add_fcn(), octave::base_url_transfer::m_host_or_url, name, Array< T >::numel(), perform(), and SETOPT.
|
inlineprivate |
Definition at line 880 of file url-transfer.cc.
References m_curl, name, and Array< T >::numel().
Referenced by http_action().
|
inlineprivate |
Definition at line 910 of file url-transfer.cc.
References octave::action_container::add_fcn(), octave::base_url_transfer::good(), perform(), and SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 486 of file url-transfer.cc.
References octave::base_url_transfer::good(), octave::base_url_transfer::m_host_or_url, m_url, perform(), set_ostream(), and SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 566 of file url-transfer.cc.
References cwd(), octave::base_url_transfer::good(), m_curl, octave::base_url_transfer::m_host_or_url, m_url, path, perform(), pwd(), SETOPT, octave::throw_away(), and octave::write_data().
|
inlineinherited |
Definition at line 91 of file url-transfer.h.
Referenced by dir(), ftp_file_or_dir_action(), get(), get_fileinfo(), list(), octave::base_url_transfer::mget_directory(), octave::base_url_transfer::mput_directory(), put(), pwd(), and rename().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 657 of file url-transfer.cc.
References form_query_string(), octave::base_url_transfer::m_errmsg, octave::base_url_transfer::m_host_or_url, octave::base_url_transfer::m_ok, m_url, perform(), and SETOPT.
Referenced by http_get(), and http_post().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 647 of file url-transfer.cc.
References http_action().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 652 of file url-transfer.cc.
References http_action().
|
inlineprivate |
Definition at line 828 of file url-transfer.cc.
References m_userpwd, OCTAVE_VERSION, octave::read_data(), SETOPT, and octave::write_data().
Referenced by curl_transfer().
|
inlineinherited |
Definition at line 111 of file url-transfer.h.
|
inlineinherited |
Definition at line 113 of file url-transfer.h.
|
inlineinherited |
Definition at line 89 of file url-transfer.h.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 394 of file url-transfer.cc.
References m_errnum.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 518 of file url-transfer.cc.
References octave::base_url_transfer::good(), octave::base_url_transfer::m_curr_ostream, octave::base_url_transfer::m_host_or_url, m_url, n, perform(), Array< T >::resize(), retval, and SETOPTR.
|
inherited |
Definition at line 80 of file url-transfer.cc.
References octave::action_container::add_fcn(), octave::base_url_transfer::cwd(), octave::base_url_transfer::delete_file(), octave::sys::file_ops::dir_sep_str(), octave::action_container::discard(), octave::base_url_transfer::get(), octave::base_url_transfer::get_fileinfo(), octave::base_url_transfer::good(), octave::sys::base_file_stat::is_dir(), octave::base_url_transfer::list(), octave::base_url_transfer::m_errmsg, octave::base_url_transfer::m_ok, octave::sys::mkdir(), string_vector::numel(), octave::sys::ofstream(), and octave::base_url_transfer::reset_path().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 442 of file url-transfer.cc.
References ftp_file_or_dir_action(), and path.
|
inherited |
Definition at line 154 of file url-transfer.cc.
References octave::action_container::add_fcn(), string_vector::append(), octave::base_url_transfer::cwd(), octave::sys::file_ops::dir_sep_str(), octave::sys::base_file_stat::exists(), octave::sys::get_dirlist(), octave::base_url_transfer::good(), octave::sys::ifstream(), octave::sys::base_file_stat::is_dir(), octave::base_url_transfer::m_errmsg, octave::base_url_transfer::m_ok, octave::base_url_transfer::mkdir(), string_vector::numel(), octave::base_url_transfer::put(), and octave::base_url_transfer::reset_path().
|
delete |
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 379 of file url-transfer.cc.
References BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE, END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE, m_curl, octave::base_url_transfer::m_errmsg, m_errnum, and octave::base_url_transfer::m_ok.
Referenced by curl_transfer(), dir(), form_data_post(), ftp_file_or_dir_action(), get(), get_fileinfo(), http_action(), list(), put(), pwd(), and rename().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 467 of file url-transfer.cc.
References octave::base_url_transfer::good(), octave::base_url_transfer::m_host_or_url, m_url, perform(), set_istream(), and SETOPT.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 613 of file url-transfer.cc.
References octave::action_container::add_fcn(), octave::base_url_transfer::good(), perform(), retval, SETOPTR, and octave::write_data().
Referenced by get_fileinfo().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 447 of file url-transfer.cc.
References octave::action_container::add_fcn(), octave::base_url_transfer::good(), perform(), and SETOPT.
|
inlinestaticprivateinherited |
Definition at line 63 of file url-transfer.h.
References octave::base_url_transfer::cwd().
Referenced by octave::base_url_transfer::mget_directory(), and octave::base_url_transfer::mput_directory().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 437 of file url-transfer.cc.
References ftp_file_or_dir_action(), and path.
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 707 of file url-transfer.cc.
References octave::action_container::add_fcn(), Array< T >::numel(), and SETOPT.
Referenced by set_weboptions().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 407 of file url-transfer.cc.
References octave::base_url_transfer::m_curr_istream, retval, and SETOPTR.
Referenced by put().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 399 of file url-transfer.cc.
References octave::base_url_transfer::m_curr_ostream, retval, and SETOPTR.
Referenced by get().
|
inlinevirtual |
Reimplemented from octave::base_url_transfer.
Definition at line 765 of file url-transfer.cc.
References octave::weboptions::ArrayFormat, octave::weboptions::CertificateFilename, octave::weboptions::ContentReader, octave::weboptions::HeaderFields, octave::weboptions::Password, set_header_fields(), SETOPT, octave::weboptions::Timeout, octave::weboptions::UserAgent, and octave::weboptions::Username.
|
protectedinherited |
Definition at line 170 of file url-transfer.h.
|
private |
Definition at line 807 of file url-transfer.cc.
Referenced by curl_transfer(), ~curl_transfer(), form_query_string(), get_fileinfo(), and perform().
|
protectedinherited |
Definition at line 173 of file url-transfer.h.
Referenced by set_istream().
|
protectedinherited |
Definition at line 174 of file url-transfer.h.
Referenced by list(), and set_ostream().
|
protectedinherited |
Definition at line 172 of file url-transfer.h.
Referenced by curl_transfer(), http_action(), octave::base_url_transfer::mget_directory(), octave::base_url_transfer::mput_directory(), and perform().
|
private |
Definition at line 810 of file url-transfer.cc.
Referenced by lasterror(), and perform().
|
protectedinherited |
Definition at line 169 of file url-transfer.h.
|
protectedinherited |
Definition at line 167 of file url-transfer.h.
Referenced by dir(), form_data_post(), get(), get_fileinfo(), http_action(), list(), and put().
|
protectedinherited |
Definition at line 171 of file url-transfer.h.
Referenced by http_action(), octave::base_url_transfer::mget_directory(), octave::base_url_transfer::mput_directory(), and perform().
|
private |
Definition at line 825 of file url-transfer.cc.
Referenced by curl_transfer(), dir(), get(), get_fileinfo(), http_action(), list(), and put().
|
private |
Definition at line 826 of file url-transfer.cc.
Referenced by init().
|
protectedinherited |
Definition at line 168 of file url-transfer.h.
Referenced by curl_transfer().