26#ifndef ENTREPOT_LIBCURL_HPP
27#define ENTREPOT_LIBCURL_HPP
29#include "../my_config.h"
54 const std::string & login,
56 const std::string & host,
57 const std::string & port,
59 const std::string & sftp_pub_keyfile,
60 const std::string & sftp_prv_keyfile,
61 const std::string & sftp_known_hosts,
80 virtual std::string
get_url()
const override;
81 virtual const path & get_location()
const override;
90 virtual void create_dir(
const std::string & dirname, U_I permission)
override;
98 virtual fichier_global *inherited_open(
const std::shared_ptr<user_interaction> & dialog,
99 const std::string & filename,
101 bool force_permission,
104 bool erase)
const override;
106 virtual void inherited_unlink(
const std::string & filename)
const override;
110#if defined ( LIBCURL_AVAILABLE ) && defined ( LIBTHREADAR_AVAILABLE )
111 class i_entrepot_libcurl;
112 std::shared_ptr<i_entrepot_libcurl> pimpl;
for managing archive into a remote repository
virtual void read_dir_flush() const override
ends the read_dir_next, (no more entry available)
virtual void read_dir_reset() const override
routines to read existing files in the current directory (see set_location() / set_root() methods)
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 bool read_dir_next(std::string &filename) const override
read the next filename of the current directory
virtual void change_user_interaction(const std::shared_ptr< user_interaction > &new_dialog) override
change user_interaction if the implementation recorded it (at construction time for example)
virtual path get_full_path() const override
returns the full path of location
virtual std::shared_ptr< user_interaction > get_current_user_interaction() const override
get the current user_interaction if the implementation reocrded it at construction time (may be nullp...
virtual void set_root(const path &p_root) override
defines the root to use if set_location is given a relative path
virtual void create_dir(const std::string &dirname, U_I permission) override
create a new directory in the current directory
virtual void read_dir_reset_dirinfo() const override
routines to read existing files with dir information
entrepot_libcurl(const std::shared_ptr< user_interaction > &dialog, remote_entrepot_type proto, 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)
virtual void set_location(const path &chemin) override
defines the directory where to proceed to future open() – this is a "chdir" semantics
virtual entrepot * clone() const override
done this way for homogeneity with open/inherited_open
virtual const path & get_root() const override
retreives relative to root path the current location points to
virtual std::string get_url() const override
abstraction of filesystem files for entrepot
the class path is here to manipulate paths in the Unix notation: using'/'
defines the entrepot interface.
remote_entrepot_type
type of entrepot to create
gf_mode
generic_file openning modes
libdar namespace encapsulate all libdar symbols
Libdar API to create entrepot objects.
this file contains the definition of secu_string class, a std::string like class but allocated in sec...