Joedb
9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
src
joedb
ssh
ssh.h
Go to the documentation of this file.
1
#ifndef joedb_ssh_declared
2
#define joedb_ssh_declared
3
4
#include "
joedb/error/Exception.h
"
5
6
#include <libssh/libssh.h>
7
8
namespace
joedb
9
{
10
namespace
ssh
11
{
12
///////////////////////////////////////////////////////////////////////////
13
inline
void
check_not_null
(
void
*p)
14
///////////////////////////////////////////////////////////////////////////
15
{
16
if
(!p)
17
throw
Exception
(
"SSH null error"
);
18
}
19
20
///////////////////////////////////////////////////////////////////////////
21
inline
void
check_ssh_session_result
(ssh_session session,
int
result)
22
///////////////////////////////////////////////////////////////////////////
23
{
24
if
(result != SSH_OK)
25
throw
Exception
(ssh_get_error(session));
26
}
27
}
28
}
29
30
#endif
Exception.h
joedb::Exception
Definition
Exception.h:10
joedb::ssh::check_not_null
void check_not_null(void *p)
Definition
ssh.h:13
joedb::ssh::check_ssh_session_result
void check_ssh_session_result(ssh_session session, int result)
Definition
ssh.h:21
joedb
Definition
Blob.h:7
Generated by
1.9.8