libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::Library Class Reference

#include <library.hpp>

Classes

struct  Config
 

Public Types

using DestructorErrorHandler = std::function< void(const ErrorInfo &)>
 

Public Member Functions

 Library ()
 
 Library (const Config &)
 
 ~Library ()
 
 Library (const Library &)
 
Libraryoperator= (const Library &)
 
 Library (Library &&) noexcept
 
Libraryoperator= (Library &&) noexcept
 

Static Public Member Functions

static bool initialized () noexcept
 
static Features features ()
 
static std::string version_string ()
 
static void set_log_level (LogLevel)
 
static LogLevel log_level () noexcept
 
static void set_log_callback (LogCallback)
 
static void set_destructor_error_handler (DestructorErrorHandler)
 
static void report_destructor_error (ErrorInfo) noexcept
 

Detailed Description

RAII guard around ssh_init()/ssh_finalize(). Reference-counted and thread-safe. At least one instance must be alive for the whole time any other sshpp object exists. See docs/design/04 ยง4.1.

Member Typedef Documentation

◆ DestructorErrorHandler

using sshpp::Library::DestructorErrorHandler = std::function<void(const ErrorInfo&)>

Constructor & Destructor Documentation

◆ Library() [1/4]

SSHPP_INLINE sshpp::Library::Library ( )

◆ Library() [2/4]

SSHPP_INLINE sshpp::Library::Library ( const Config cfg)
explicit

◆ ~Library()

SSHPP_INLINE sshpp::Library::~Library ( )

◆ Library() [3/4]

SSHPP_INLINE sshpp::Library::Library ( const Library )

◆ Library() [4/4]

SSHPP_INLINE sshpp::Library::Library ( Library &&  other)
noexcept

Member Function Documentation

◆ operator=() [1/2]

SSHPP_INLINE Library & sshpp::Library::operator= ( const Library other)

◆ operator=() [2/2]

SSHPP_INLINE Library & sshpp::Library::operator= ( Library &&  other)
noexcept

◆ initialized()

SSHPP_INLINE bool sshpp::Library::initialized ( )
staticnoexcept

◆ features()

SSHPP_INLINE Features sshpp::Library::features ( )
static

◆ version_string()

SSHPP_INLINE std::string sshpp::Library::version_string ( )
static

◆ set_log_level()

SSHPP_INLINE void sshpp::Library::set_log_level ( LogLevel  level)
static

◆ log_level()

SSHPP_INLINE LogLevel sshpp::Library::log_level ( )
staticnoexcept

◆ set_log_callback()

SSHPP_INLINE void sshpp::Library::set_log_callback ( LogCallback  cb)
static

◆ set_destructor_error_handler()

SSHPP_INLINE void sshpp::Library::set_destructor_error_handler ( DestructorErrorHandler  handler)
static

◆ report_destructor_error()

SSHPP_INLINE void sshpp::Library::report_destructor_error ( ErrorInfo  info)
staticnoexcept

Invokes the installed destructor-error handler (or does nothing by default). Used internally by other wrapper destructors that cannot throw.


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