Disk ARchive: remote_entrepot_api.hpp Source File

| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
remote_entrepot_api.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef REMOTE_ENTREPOT_API_HPP
27#define REMOTE_ENTREPOT_API_HPP
28
29#include "../my_config.h"
30
31extern "C"
32{
33} // end extern "C"
34
35#include "entrepot.hpp"
36
37namespace libdar
38{
41
43 enum class remote_entrepot_type
44 {
45 ftp,
46 sftp
47 };
48
49
50 // for backward compatibility with API found in release 2.7.x and before
51 typedef remote_entrepot_type mycurl_protocol;
52 const remote_entrepot_type proto_ftp = remote_entrepot_type::ftp;
53 const remote_entrepot_type proto_sftp = remote_entrepot_type::sftp;
54
56 extern remote_entrepot_type string_to_remote_entrepot_type(const std::string & arg);
57
58
60 std::shared_ptr<entrepot> create_remote_entrepot(std::shared_ptr<user_interaction> & dialog,
61 remote_entrepot_type proto,
62 const std::string & login,
63 const secu_string & pass,
64 const std::string & host,
65 const std::string & port,
66 bool auth_from_file,
67 const std::string & sftp_pub_filekey,
68 const std::string & sftp_prv_filekey,
69 const std::string & sftp_known_hosts,
70 U_I network_retry,
71 bool remote_verbose);
72
73
75
76} // end of namespace
77
78#endif
libdar::secu_string
class secu_string
Definition secu_string.hpp:54
entrepot.hpp
defines the entrepot interface.
libdar::string_to_remote_entrepot_type
remote_entrepot_type string_to_remote_entrepot_type(const std::string &arg)
extract entrepot type from a given URL
libdar::create_remote_entrepot
std::shared_ptr< entrepot > create_remote_entrepot(std::shared_ptr< user_interaction > &dialog, remote_entrepot_type proto, const std::string &login, const secu_string &pass, const std::string &host, const std::string &port, bool auth_from_file, const std::string &sftp_pub_filekey, const std::string &sftp_prv_filekey, const std::string &sftp_known_hosts, U_I network_retry, bool remote_verbose)
create a remote entrepot of given type
libdar::remote_entrepot_type
remote_entrepot_type
type of entrepot to create
Definition remote_entrepot_api.hpp:44
libdar::remote_entrepot_type::sftp
@ sftp
filesystem accessed through SFTP protocol
Definition remote_entrepot_api.hpp:46
libdar::remote_entrepot_type::ftp
@ ftp
filesystem accessed through FTP protocol
Definition remote_entrepot_api.hpp:45
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47