27#ifndef ENTREPOT_LIBSSH_HPP
28#define ENTREPOT_LIBSSH_HPP
30#include "../my_config.h"
34#if HAVE_LIBSSH_LIBSSH_H
35#include <libssh/libssh.h>
36#include <libssh/sftp.h>
64 const std::string & login,
66 const std::string & host,
67 const std::string & port,
69 const std::string & sftp_pub_keyfile,
70 const std::string & sftp_prv_keyfile,
71 const std::string & sftp_known_hosts,
82 virtual std::string
get_url()
const override;
89 virtual void create_dir(
const std::string & dirname, U_I permission)
override;
95 virtual fichier_global *inherited_open(
const std::shared_ptr<user_interaction> & dialog,
96 const std::string & filename,
98 bool force_permission,
101 bool erase)
const override;
103 virtual void inherited_unlink(
const std::string & filename)
const override;
109 std::string server_url;
112 mutable sftp_dir sdir;
115 std::shared_ptr<libssh_connection> connect;
virtual void read_dir_flush() const override
ends the read_dir_next, (no more entry available)
virtual entrepot * clone() const override
done this way for homogeneity with open/inherited_open
virtual void create_dir(const std::string &dirname, U_I permission) override
create a new directory in the current directory
virtual bool read_dir_next(std::string &filename) const override
read the next filename of the current directory
virtual void read_dir_reset_dirinfo() const override
routines to read existing files with dir information
entrepot_libssh(const std::shared_ptr< user_interaction > &dialog, const std::string &login, const secu_string &password, const std::string &host, const std::string &port, bool auth_from_file, const std::string &sftp_pub_keyfile, const std::string &sftp_prv_keyfile, const std::string &sftp_known_hosts, U_I waiting_time, bool verbose=false)
constructor
virtual bool read_dir_next_dirinfo(std::string &filename, inode_type &tp) const override
alternative to the method read_dir_next, should be implemented also
virtual void read_dir_reset() const override
routines to read existing files in the current directory (see set_location() / set_root() methods)
virtual std::string get_url() const override
full path of current directory + anything necessary to provide URL formated information
abstraction of filesystem files for entrepot
class mem_ui to keep a copy of a user_interaction object
defines the entrepot interface.
class fichier_global definition. This class is a pure virtual class class fichier_global is an abstra...
gf_mode
generic_file openning modes
class holding libssh related data structure for an ssh and sftp session
class mem_ui definition. This class is to be used as parent class to handle user_interaction object m...
libdar namespace encapsulate all libdar symbols