GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
curl_transfer Class Reference
Inheritance diagram for curl_transfer:
Inheritance graph
[legend]
Collaboration diagram for curl_transfer:
Collaboration graph
[legend]

Public Member Functions

 curl_transfer (void)
 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)
void ascii (void)
void binary (void)
void cwd (const std::string &path)
void del (const std::string &file)
void dir (void)
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 > &param, const std::string &action)
void http_get (const Array< std::string > &param)
void http_post (const Array< std::string > &param)
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)
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)
std::istream & set_istream (std::istream &is)
std::ostream & set_ostream (std::ostream &os)

Protected Attributes

bool ascii_mode
octave_refcount< size_tcount
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

 curl_transfer (const curl_transfer &)
std::string form_query_string (const Array< std::string > &param)
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)
curl_transferoperator= (const curl_transfer &)

Private Attributes

CURL * curl
CURLcode errnum
std::string url
std::string userpwd

Detailed Description

Definition at line 274 of file url-transfer.cc.

Constructor & Destructor Documentation

curl_transfer::curl_transfer ( void  )
inline

Definition at line 278 of file url-transfer.cc.

References curl, base_url_transfer::errmsg, and base_url_transfer::valid.

curl_transfer::curl_transfer ( const std::string &  host,
const std::string &  user_arg,
const std::string &  passwd,
std::ostream &  os 
)
inline
curl_transfer::curl_transfer ( const std::string &  url_str,
std::ostream &  os 
)
inline

Definition at line 310 of file url-transfer.cc.

References curl, base_url_transfer::errmsg, init(), SETOPT, and base_url_transfer::valid.

curl_transfer::~curl_transfer ( void  )
inline

Definition at line 333 of file url-transfer.cc.

References curl.

curl_transfer::curl_transfer ( const curl_transfer )
private

Member Function Documentation

void curl_transfer::ascii ( void  )
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 375 of file url-transfer.cc.

References base_url_transfer::ascii_mode, and SETOPT.

void curl_transfer::binary ( void  )
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 381 of file url-transfer.cc.

References base_url_transfer::ascii_mode, and SETOPT.

void curl_transfer::cwd ( const std::string &  path)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 387 of file url-transfer.cc.

References ftp_file_or_dir_action().

Referenced by get_fileinfo().

void curl_transfer::del ( const std::string &  file)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 392 of file url-transfer.cc.

References ftp_file_or_dir_action().

Referenced by ddajac(), dmatd(), ignpoi(), sstode(), and stode().

void curl_transfer::dir ( void  )
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 463 of file url-transfer.cc.

References base_url_transfer::good(), base_url_transfer::host_or_url, perform(), SETOPT, and url.

std::string curl_transfer::form_query_string ( const Array< std::string > &  param)
inlineprivate

Definition at line 715 of file url-transfer.cc.

References curl, and Array< T >::numel().

Referenced by http_get(), and http_post().

void curl_transfer::ftp_file_or_dir_action ( const std::string &  file_or_dir,
const std::string &  action 
)
inlineprivate

Definition at line 744 of file url-transfer.cc.

References action_container::add_fcn(), base_url_transfer::good(), perform(), and SETOPT.

Referenced by cwd(), del(), mkdir(), and rmdir().

void curl_transfer::get ( const std::string &  file,
std::ostream &  os 
)
inlinevirtual
void curl_transfer::get_fileinfo ( const std::string &  filename,
double filesize,
time_t &  filetime,
bool fileisdir 
)
inlinevirtual
bool base_url_transfer::good ( void  ) const
inlineinherited
void curl_transfer::http_action ( const Array< std::string > &  param,
const std::string &  action 
)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 632 of file url-transfer.cc.

References base_url_transfer::errmsg, http_get(), http_post(), and base_url_transfer::ok.

void curl_transfer::http_get ( const Array< std::string > &  param)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 607 of file url-transfer.cc.

References form_query_string(), base_url_transfer::host_or_url, perform(), SETOPT, and url.

Referenced by http_action().

void curl_transfer::http_post ( const Array< std::string > &  param)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 621 of file url-transfer.cc.

References form_query_string(), base_url_transfer::host_or_url, perform(), and SETOPT.

Referenced by http_action().

void curl_transfer::init ( const std::string &  user,
const std::string &  passwd,
std::istream &  is,
std::ostream &  os 
)
inlineprivate

Definition at line 675 of file url-transfer.cc.

References read_data(), SETOPT, userpwd, and write_data().

Referenced by curl_transfer().

bool base_url_transfer::is_ascii ( void  ) const
inlineinherited

Definition at line 94 of file url-transfer.h.

Referenced by url_transfer::is_ascii().

bool base_url_transfer::is_binary ( void  ) const
inlineinherited

Definition at line 96 of file url-transfer.h.

Referenced by url_transfer::is_binary().

bool base_url_transfer::is_valid ( void  ) const
inlineinherited

Definition at line 72 of file url-transfer.h.

Referenced by url_transfer::is_valid().

std::string curl_transfer::lasterror ( void  ) const
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 354 of file url-transfer.cc.

References errnum.

string_vector curl_transfer::list ( void  )
inlinevirtual
void base_url_transfer::mget_directory ( const std::string &  directory,
const std::string &  target 
)
inherited
void curl_transfer::mkdir ( const std::string &  path)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 402 of file url-transfer.cc.

References ftp_file_or_dir_action().

string_vector base_url_transfer::mput_directory ( const std::string &  base,
const std::string &  directory 
)
inherited
curl_transfer& curl_transfer::operator= ( const curl_transfer )
private
void curl_transfer::perform ( void  )
inlinevirtual
void curl_transfer::put ( const std::string &  file,
std::istream &  is 
)
inlinevirtual
std::string curl_transfer::pwd ( void  )
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 573 of file url-transfer.cc.

References action_container::add_fcn(), base_url_transfer::good(), perform(), SETOPTR, and write_data().

Referenced by get_fileinfo().

void curl_transfer::rename ( const std::string &  oldname,
const std::string &  newname 
)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 407 of file url-transfer.cc.

References action_container::add_fcn(), base_url_transfer::good(), perform(), and SETOPT.

void curl_transfer::rmdir ( const std::string &  path)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 397 of file url-transfer.cc.

References ftp_file_or_dir_action().

std::istream& curl_transfer::set_istream ( std::istream &  is)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 367 of file url-transfer.cc.

References base_url_transfer::curr_istream, and SETOPTR.

Referenced by put().

std::ostream& curl_transfer::set_ostream ( std::ostream &  os)
inlinevirtual

Reimplemented from base_url_transfer.

Definition at line 359 of file url-transfer.cc.

References base_url_transfer::curr_ostream, and SETOPTR.

Referenced by get().

Member Data Documentation

bool base_url_transfer::ascii_mode
protectedinherited

Definition at line 148 of file url-transfer.h.

Referenced by ascii(), and binary().

octave_refcount<size_t> base_url_transfer::count
protectedinherited
CURL* curl_transfer::curl
private
std::istream* base_url_transfer::curr_istream
protectedinherited

Definition at line 151 of file url-transfer.h.

Referenced by set_istream().

std::ostream* base_url_transfer::curr_ostream
protectedinherited

Definition at line 152 of file url-transfer.h.

Referenced by list(), and set_ostream().

std::string base_url_transfer::errmsg
protectedinherited
CURLcode curl_transfer::errnum
private

Definition at line 651 of file url-transfer.cc.

Referenced by lasterror(), and perform().

bool base_url_transfer::ftp
protectedinherited

Definition at line 147 of file url-transfer.h.

std::string base_url_transfer::host_or_url
protectedinherited

Definition at line 145 of file url-transfer.h.

Referenced by dir(), get(), get_fileinfo(), http_get(), http_post(), list(), and put().

bool base_url_transfer::ok
protectedinherited
std::string curl_transfer::url
private

Definition at line 666 of file url-transfer.cc.

Referenced by curl_transfer(), dir(), get(), get_fileinfo(), http_get(), list(), and put().

std::string curl_transfer::userpwd
private

Definition at line 667 of file url-transfer.cc.

Referenced by init().

bool base_url_transfer::valid
protectedinherited

Definition at line 146 of file url-transfer.h.

Referenced by curl_transfer().


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