f***ed up and needed to rework packages

This commit is contained in:
herbglitch 2024-05-20 03:46:09 -06:00
parent b43ab1702f
commit f7a87d7519
78 changed files with 3713 additions and 0 deletions

View file

@ -0,0 +1,51 @@
#ifndef ARC_SSH_H_
#define ARC_SSH_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief ssh type that holds ssh connection along with credentials
*/
typedef struct ARC_Ssh ARC_Ssh;
/**
* @brief a ssh session function
*
* @param data user data that can be used within the callback
*/
typedef void (* ARC_Ssh_SessionFn)(void *data);
/**
* @brief creates ARC_Ssh type
*
* @param ssh ARC_Ssh to create
*/
void ARC_Ssh_Create(ARC_Ssh **ssh, char *host, char *user, char *password);
/**
* @brief destroyes ARC_Ssh type
*
* @param ssh ARC_Ssh to destroy
*/
void ARC_Ssh_Destroy(ARC_Ssh *ssh);
/**
* @brief runs a callback function within a ssh session
*
* @param ssh ARC_Ssh to create and run function in ssh session
* @param sessionFN callback to run in a ssh session
*/
void ARC_Ssh_RunInSession(ARC_Ssh *ssh, ARC_Ssh_SessionFn sessionFn);
/**
* @brief
*/
void ARC_Ssh_ExecStrInNewSession(ARC_Ssh *ssh, char *command);
#ifdef __cplusplus
}
#endif
#endif //!ARC_SSH_H_