GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::base_url_transfer Class Reference

#include "url-transfer.h"

Inheritance diagram for octave::base_url_transfer:
Collaboration diagram for octave::base_url_transfer:

Public Member Functions

 base_url_transfer (const base_url_transfer &)=delete
 
 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)
 
 base_url_transfer (void)
 
virtual ~base_url_transfer (void)=default
 
virtual void ascii (void)
 
virtual void binary (void)
 
virtual void cookie_jar (const std::string &)
 
virtual void cwd (const std::string &)
 
virtual void del (const std::string &)
 
virtual void dir (void)
 
virtual void form_data_post (const Array< std::string > &)
 
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)
 
base_url_transferoperator= (const base_url_transfer &)=delete
 
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 void set_header_fields (const Array< std::string > &)
 
virtual std::istream & set_istream (std::istream &)
 
virtual std::ostream & set_ostream (std::ostream &)
 
virtual void set_weboptions (const struct weboptions &)
 

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
 

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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ base_url_transfer() [1/4]

octave::base_url_transfer::base_url_transfer ( void  )

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

◆ base_url_transfer() [2/4]

octave::base_url_transfer::base_url_transfer ( const std::string &  host,
const std::string &  ,
const std::string &  ,
std::ostream &  os 
)

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

◆ base_url_transfer() [3/4]

octave::base_url_transfer::base_url_transfer ( const std::string &  url,
std::ostream &  os 
)

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

◆ base_url_transfer() [4/4]

octave::base_url_transfer::base_url_transfer ( const base_url_transfer )
delete

◆ ~base_url_transfer()

virtual octave::base_url_transfer::~base_url_transfer ( void  )
virtualdefault

Member Function Documentation

◆ ascii()

virtual void octave::base_url_transfer::ascii ( void  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ binary()

virtual void octave::base_url_transfer::binary ( void  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ cookie_jar()

virtual void octave::base_url_transfer::cookie_jar ( const std::string &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ cwd()

virtual void octave::base_url_transfer::cwd ( const std::string &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Referenced by mget_directory(), mput_directory(), and reset_path().

◆ del()

virtual void octave::base_url_transfer::del ( const std::string &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ delete_file()

void octave::base_url_transfer::delete_file ( const std::string &  file)
staticprivate

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

References octave::sys::unlink().

Referenced by mget_directory().

◆ dir()

virtual void octave::base_url_transfer::dir ( void  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ form_data_post()

virtual void octave::base_url_transfer::form_data_post ( const Array< std::string > &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ get()

virtual void octave::base_url_transfer::get ( const std::string &  ,
std::ostream &   
)
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Referenced by mget_directory().

◆ get_fileinfo()

virtual void octave::base_url_transfer::get_fileinfo ( const std::string &  ,
double &  ,
time_t &  ,
bool &   
)
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Referenced by mget_directory().

◆ good()

◆ http_action()

virtual void octave::base_url_transfer::http_action ( const Array< std::string > &  ,
const std::string &   
)
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ http_get()

virtual void octave::base_url_transfer::http_get ( const Array< std::string > &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ http_post()

virtual void octave::base_url_transfer::http_post ( const Array< std::string > &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ is_ascii()

bool octave::base_url_transfer::is_ascii ( void  ) const
inline

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

◆ is_binary()

bool octave::base_url_transfer::is_binary ( void  ) const
inline

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

◆ is_valid()

bool octave::base_url_transfer::is_valid ( void  ) const
inline

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

◆ lasterror()

virtual std::string octave::base_url_transfer::lasterror ( void  ) const
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ list()

virtual string_vector octave::base_url_transfer::list ( void  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Referenced by mget_directory().

◆ mget_directory()

◆ mkdir()

virtual void octave::base_url_transfer::mkdir ( const std::string &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Referenced by mput_directory().

◆ mput_directory()

◆ operator=()

base_url_transfer& octave::base_url_transfer::operator= ( const base_url_transfer )
delete

◆ perform()

virtual void octave::base_url_transfer::perform ( void  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ put()

virtual void octave::base_url_transfer::put ( const std::string &  ,
std::istream &   
)
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Referenced by mput_directory().

◆ pwd()

virtual std::string octave::base_url_transfer::pwd ( void  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ rename()

virtual void octave::base_url_transfer::rename ( const std::string &  ,
const std::string &   
)
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ reset_path()

static void octave::base_url_transfer::reset_path ( base_url_transfer curl_xfer)
inlinestaticprivate

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

References cwd().

Referenced by mget_directory(), and mput_directory().

◆ rmdir()

virtual void octave::base_url_transfer::rmdir ( const std::string &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ set_header_fields()

virtual void octave::base_url_transfer::set_header_fields ( const Array< std::string > &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ set_istream()

virtual std::istream& octave::base_url_transfer::set_istream ( std::istream &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ set_ostream()

virtual std::ostream& octave::base_url_transfer::set_ostream ( std::ostream &  )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

◆ set_weboptions()

virtual void octave::base_url_transfer::set_weboptions ( const struct weboptions )
inlinevirtual

Reimplemented in octave::curl_transfer.

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

Friends And Related Function Documentation

◆ url_transfer

friend class url_transfer
friend

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

Member Data Documentation

◆ m_ascii_mode

bool octave::base_url_transfer::m_ascii_mode
protected

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

Referenced by octave::curl_transfer::ascii(), and octave::curl_transfer::binary().

◆ m_curr_istream

std::istream* octave::base_url_transfer::m_curr_istream
protected

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

Referenced by octave::curl_transfer::set_istream().

◆ m_curr_ostream

std::ostream* octave::base_url_transfer::m_curr_ostream
protected

◆ m_errmsg

std::string octave::base_url_transfer::m_errmsg
protected

◆ m_ftp

bool octave::base_url_transfer::m_ftp
protected

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

◆ m_host_or_url

◆ m_ok

bool octave::base_url_transfer::m_ok
protected

◆ m_valid

bool octave::base_url_transfer::m_valid
protected

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

Referenced by octave::curl_transfer::curl_transfer().


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