GNU Octave  4.0.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 | Static Private Member Functions | Friends | List of all members
base_url_transfer Class Reference

#include "url-transfer.h"

Inheritance diagram for base_url_transfer:
Inheritance graph
[legend]
Collaboration diagram for base_url_transfer:
Collaboration graph
[legend]

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_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

 base_url_transfer (const base_url_transfer &)
 
base_url_transferoperator= (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
 

Detailed Description

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

Constructor & Destructor Documentation

base_url_transfer::base_url_transfer ( void  )
inline

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

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

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

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

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

virtual base_url_transfer::~base_url_transfer ( void  )
inlinevirtual

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

base_url_transfer::base_url_transfer ( const base_url_transfer )
private

Member Function Documentation

virtual void base_url_transfer::ascii ( void  )
inlinevirtual

Reimplemented in curl_transfer.

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

Referenced by url_transfer::ascii().

virtual void base_url_transfer::binary ( void  )
inlinevirtual

Reimplemented in curl_transfer.

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

Referenced by url_transfer::binary().

virtual void base_url_transfer::cwd ( const std::string &  )
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().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::del().

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

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

References octave_unlink().

Referenced by mget_directory().

virtual void base_url_transfer::dir ( void  )
inlinevirtual

Reimplemented in curl_transfer.

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

Referenced by url_transfer::dir().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::get().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::get_fileinfo(), and mget_directory().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::http_action().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::http_get().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::http_post().

bool base_url_transfer::is_ascii ( void  ) const
inline

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

Referenced by url_transfer::is_ascii().

bool base_url_transfer::is_binary ( void  ) const
inline

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

Referenced by url_transfer::is_binary().

bool base_url_transfer::is_valid ( void  ) const
inline

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

Referenced by url_transfer::is_valid().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::lasterror().

virtual string_vector base_url_transfer::list ( void  )
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 
)
virtual void base_url_transfer::mkdir ( const std::string &  )
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 
)
base_url_transfer& base_url_transfer::operator= ( const base_url_transfer )
private
virtual void base_url_transfer::perform ( void  )
inlinevirtual

Reimplemented in curl_transfer.

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

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

Reimplemented in curl_transfer.

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

Referenced by mput_directory(), and url_transfer::put().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::pwd().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::rename().

static void base_url_transfer::reset_path ( base_url_transfer curl_xfer)
inlinestaticprivate

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

References cwd().

Referenced by mget_directory(), and mput_directory().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::rmdir().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::set_istream().

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

Reimplemented in curl_transfer.

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

Referenced by url_transfer::set_ostream().

Friends And Related Function Documentation

friend class url_transfer
friend

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

Member Data Documentation

bool base_url_transfer::ascii_mode
protected

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

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

octave_refcount<size_t> base_url_transfer::count
protected
std::istream* base_url_transfer::curr_istream
protected

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

Referenced by curl_transfer::set_istream().

std::ostream* base_url_transfer::curr_ostream
protected

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

Referenced by curl_transfer::list(), and curl_transfer::set_ostream().

std::string base_url_transfer::errmsg
protected
bool base_url_transfer::ftp
protected

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

std::string base_url_transfer::host_or_url
protected
bool base_url_transfer::ok
protected
bool base_url_transfer::valid
protected

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

Referenced by curl_transfer::curl_transfer().


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