Loading...
Searching...
No Matches
ssh.hpp
// ***************************************************************** -*- C++ -*-
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SSH_HPP_
#define SSH_HPP_
// included header files
#include "config.h"
#ifdef EXV_USE_SSH
#include <libssh/libssh.h>
#include <libssh/sftp.h>
#include <sys/stat.h>
#include <string>
#include "error.hpp"
#include "types.hpp"
#include "futils.hpp"
namespace Exiv2 {
class EXIV2LIB_DEPRECATED_EXPORT SSH {
public:
SSH (const std::string& host, const std::string& user, const std::string& pass, const std::string port = "");
~SSH();
int runCommand(const std::string& cmd, std::string* output);
int scp(const std::string& filePath, const byte* data, size_t size);
void getFileSftp(const std::string& filePath, sftp_file& handle);
private:
void openSftp();
// DATA
long timeout_;
std::string host_;
std::string user_;
std::string pass_;
ssh_session session_;
sftp_session sftp_;
}; // class SSH
} // namespace Exiv2
#endif
#endif // #ifdef EXIV2_HPP_
error.hpp
Error class for exceptions, log message class.
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition asfvideo.hpp:36