GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "url-transfer.h"
Public Member Functions | |
base_url_transfer (void) | |
base_url_transfer (const std::string &host, const std::string &, const std::string &, std::ostream &os) | |
base_url_transfer (const std::string &url, std::ostream &os) | |
virtual | ~base_url_transfer (void) |
virtual void | ascii (void) |
virtual void | binary (void) |
virtual void | cwd (const std::string &) |
virtual void | del (const std::string &) |
virtual void | dir (void) |
virtual void | get (const std::string &, std::ostream &) |
virtual void | get_fileinfo (const std::string &, double &, time_t &, bool &) |
bool | good (void) const |
virtual void | http_action (const Array< std::string > &, const std::string &) |
virtual void | http_get (const Array< std::string > &) |
virtual void | http_post (const Array< std::string > &) |
bool | is_ascii (void) const |
bool | is_binary (void) const |
bool | is_valid (void) const |
virtual std::string | lasterror (void) const |
virtual string_vector | list (void) |
void | mget_directory (const std::string &directory, const std::string &target) |
virtual void | mkdir (const std::string &) |
string_vector | mput_directory (const std::string &base, const std::string &directory) |
virtual void | perform (void) |
virtual void | put (const std::string &, std::istream &) |
virtual std::string | pwd (void) |
virtual void | rename (const std::string &, const std::string &) |
virtual void | rmdir (const std::string &) |
virtual std::istream & | set_istream (std::istream &) |
virtual std::ostream & | set_ostream (std::ostream &) |
Protected Attributes | |
bool | ascii_mode |
octave_refcount< size_t > | count |
std::istream * | curr_istream |
std::ostream * | curr_ostream |
std::string | errmsg |
bool | ftp |
std::string | host_or_url |
bool | ok |
bool | valid |
Private Member Functions | |
base_url_transfer (const base_url_transfer &) | |
base_url_transfer & | operator= (const base_url_transfer &) |
Static Private Member Functions | |
static void | delete_file (const std::string &file) |
static void | reset_path (base_url_transfer *curl_xfer) |
Friends | |
class | url_transfer |
Definition at line 34 of file url-transfer.h.
|
inline |
Definition at line 51 of file url-transfer.h.
|
inline |
Definition at line 57 of file url-transfer.h.
|
inline |
Definition at line 65 of file url-transfer.h.
|
inlinevirtual |
Definition at line 70 of file url-transfer.h.
|
private |
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 90 of file url-transfer.h.
Referenced by url_transfer::ascii().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 92 of file url-transfer.h.
Referenced by url_transfer::binary().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 98 of file url-transfer.h.
Referenced by url_transfer::cwd(), mget_directory(), mput_directory(), and reset_path().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 100 of file url-transfer.h.
Referenced by url_transfer::del().
|
staticprivate |
Definition at line 49 of file url-transfer.cc.
References octave_unlink().
Referenced by mget_directory().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 121 of file url-transfer.h.
Referenced by url_transfer::dir().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 112 of file url-transfer.h.
Referenced by url_transfer::get().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 125 of file url-transfer.h.
Referenced by url_transfer::get_fileinfo(), and mget_directory().
|
inline |
Definition at line 74 of file url-transfer.h.
Referenced by curl_transfer::dir(), curl_transfer::ftp_file_or_dir_action(), curl_transfer::get(), curl_transfer::get_fileinfo(), url_transfer::good(), curl_transfer::list(), mget_directory(), mput_directory(), curl_transfer::put(), curl_transfer::pwd(), and curl_transfer::rename().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 136 of file url-transfer.h.
Referenced by url_transfer::http_action().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 132 of file url-transfer.h.
Referenced by url_transfer::http_get().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 134 of file url-transfer.h.
Referenced by url_transfer::http_post().
|
inline |
Definition at line 94 of file url-transfer.h.
Referenced by url_transfer::is_ascii().
|
inline |
Definition at line 96 of file url-transfer.h.
Referenced by url_transfer::is_binary().
|
inline |
Definition at line 72 of file url-transfer.h.
Referenced by url_transfer::is_valid().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 78 of file url-transfer.h.
Referenced by url_transfer::lasterror().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 123 of file url-transfer.h.
Referenced by url_transfer::list(), and mget_directory().
void base_url_transfer::mget_directory | ( | const std::string & | directory, |
const std::string & | target | ||
) |
Definition at line 55 of file url-transfer.cc.
References action_container::add_fcn(), cwd(), delete_file(), file_ops::dir_sep_str(), action_container::discard(), errmsg, get_fileinfo(), good(), base_file_stat::is_dir(), Array< T >::length(), list(), octave_mkdir(), ok, and reset_path().
Referenced by url_transfer::mget_directory().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 104 of file url-transfer.h.
Referenced by url_transfer::mkdir(), and mput_directory().
string_vector base_url_transfer::mput_directory | ( | const std::string & | base, |
const std::string & | directory | ||
) |
Definition at line 128 of file url-transfer.cc.
References action_container::add_fcn(), string_vector::append(), cwd(), file_ops::dir_sep_str(), errmsg, base_file_stat::exists(), good(), base_file_stat::is_dir(), Array< T >::length(), mkdir(), ok, put(), dir_entry::read(), and reset_path().
Referenced by url_transfer::mput_directory().
|
private |
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 76 of file url-transfer.h.
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 109 of file url-transfer.h.
Referenced by mput_directory(), and url_transfer::put().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 130 of file url-transfer.h.
Referenced by url_transfer::pwd().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 106 of file url-transfer.h.
Referenced by url_transfer::rename().
|
inlinestaticprivate |
Definition at line 42 of file url-transfer.h.
References cwd().
Referenced by mget_directory(), and mput_directory().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 102 of file url-transfer.h.
Referenced by url_transfer::rmdir().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 85 of file url-transfer.h.
Referenced by url_transfer::set_istream().
|
inlinevirtual |
Reimplemented in curl_transfer.
Definition at line 80 of file url-transfer.h.
Referenced by url_transfer::set_ostream().
|
friend |
Definition at line 49 of file url-transfer.h.
|
protected |
Definition at line 148 of file url-transfer.h.
Referenced by curl_transfer::ascii(), and curl_transfer::binary().
|
protected |
Definition at line 142 of file url-transfer.h.
Referenced by url_transfer::operator=(), url_transfer::url_transfer(), and url_transfer::~url_transfer().
|
protected |
Definition at line 151 of file url-transfer.h.
Referenced by curl_transfer::set_istream().
|
protected |
Definition at line 152 of file url-transfer.h.
Referenced by curl_transfer::list(), and curl_transfer::set_ostream().
|
protected |
Definition at line 150 of file url-transfer.h.
Referenced by curl_transfer::curl_transfer(), curl_transfer::http_action(), mget_directory(), mput_directory(), and curl_transfer::perform().
|
protected |
Definition at line 147 of file url-transfer.h.
|
protected |
Definition at line 145 of file url-transfer.h.
Referenced by curl_transfer::dir(), curl_transfer::get(), curl_transfer::get_fileinfo(), curl_transfer::http_get(), curl_transfer::http_post(), curl_transfer::list(), and curl_transfer::put().
|
protected |
Definition at line 149 of file url-transfer.h.
Referenced by curl_transfer::http_action(), mget_directory(), mput_directory(), and curl_transfer::perform().
|
protected |
Definition at line 146 of file url-transfer.h.
Referenced by curl_transfer::curl_transfer().