Archeus 0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
ssh.h
Go to the documentation of this file.
1#ifndef ARC_SSH_H_
2#define ARC_SSH_H_
3
4#include "arc/std/string.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10/**
11 * @brief ssh type that holds ssh connection along with credentials
12*/
13typedef struct ARC_Ssh ARC_Ssh;
14
15/**
16 * @brief a ssh session function
17 *
18 * @param data user data that can be used within the callback
19*/
20typedef void (* ARC_Ssh_SessionFn)(void *data);
21
22/**
23 * @brief creates ARC_Ssh type
24 *
25 * @param ssh ARC_Ssh to create
26 */
27void ARC_Ssh_Create(ARC_Ssh **ssh, char *host, char *user, char *password);
28
29/**
30 * @brief destroyes ARC_Ssh type
31 *
32 * @param ssh ARC_Ssh to destroy
33 */
35
36/**
37 * @brief runs a callback function within a ssh session
38 *
39 * @param ssh ARC_Ssh to create and run function in ssh session
40 * @param sessionFN callback to run in a ssh session
41 */
43
44/**
45 * @brief
46*/
47void ARC_Ssh_ExecStrInNewSession(ARC_Ssh *ssh, char *command);
48
49/**
50 * @brief
51*/
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif //!ARC_SSH_H_
void ARC_Ssh_Destroy(ARC_Ssh *ssh)
destroyes ARC_Ssh type
ARC_String * ARC_Ssh_ExecStrInNewSessionAndGetResponse(ARC_Ssh *ssh, char *command)
void ARC_Ssh_ExecStrInNewSession(ARC_Ssh *ssh, char *command)
void ARC_Ssh_RunInSession(ARC_Ssh *ssh, ARC_Ssh_SessionFn sessionFn)
runs a callback function within a ssh session
void(* ARC_Ssh_SessionFn)(void *data)
a ssh session function
Definition ssh.h:20
void ARC_Ssh_Create(ARC_Ssh **ssh, char *host, char *user, char *password)
creates ARC_Ssh type
struct ARC_Ssh ARC_Ssh
ssh type that holds ssh connection along with credentials
Definition ssh.h:13
substring position within a string
Definition string.h:14