2022-02-25 04:13:05 +00:00
|
|
|
#ifndef SHELLTERM_H
|
|
|
|
#define SHELLTERM_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
2022-03-07 21:16:46 +00:00
|
|
|
#include <sys/ioctl.h>
|
2022-02-25 04:13:05 +00:00
|
|
|
#include <sys/select.h>
|
|
|
|
#include <termios.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "sclient.h"
|
|
|
|
|
|
|
|
void shellT_conioTerm(void);
|
|
|
|
void shellT_resetTerm(void);
|
|
|
|
void shellT_printf(const char *format, ...);
|
|
|
|
|
|
|
|
/* waits for input for timeout (in ms). returns true if input is ready to be read, false if no events */
|
|
|
|
bool shellT_waitForInput(int timeout);
|
2022-03-02 16:38:16 +00:00
|
|
|
int shellT_readRawInput(uint8_t *buf, size_t max);
|
|
|
|
void shellT_writeRawOutput(uint8_t *buf, size_t sz);
|
2022-03-07 21:16:46 +00:00
|
|
|
void shellT_getTermSize(int *col, int *row);
|
2022-02-25 04:13:05 +00:00
|
|
|
char shellT_getch(void);
|
|
|
|
int shellT_kbget(void);
|
|
|
|
void shellT_printPrompt(void);
|
|
|
|
void shellT_setPrompt(char *prompt);
|
|
|
|
void shellT_addChar(tShell_client *client, int c); /* processes input, moving cursor, adding char to cmd, etc. */
|
|
|
|
|
|
|
|
#endif
|