removed STD archeus, moved console and ssh into linux folder. also added libdbus

This commit is contained in:
herbglitch 2025-02-08 02:15:23 -07:00
parent 119d1b2c64
commit 8fe402e04e
27 changed files with 622 additions and 145 deletions

View file

@ -0,0 +1,58 @@
#ifndef ARC_SSH_H_
#define ARC_SSH_H_
#include "arc/std/string.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);
/**
* @brief
*/
ARC_String *ARC_Ssh_ExecStrInNewSessionAndGetResponse(ARC_Ssh *ssh, char *command);
#ifdef __cplusplus
}
#endif
#endif //!ARC_SSH_H_