2022-02-25 04:13:05 +00:00
|
|
|
#ifndef SHELLCMD_H
|
|
|
|
#define SHELLCMD_H
|
|
|
|
|
|
|
|
#include "sclient.h"
|
|
|
|
|
2022-06-27 23:57:00 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2022-02-25 04:13:05 +00:00
|
|
|
typedef void (*shellCmdCallback)(tShell_client *client, int args, char *argc[]);
|
|
|
|
|
2022-06-27 23:57:00 +00:00
|
|
|
typedef struct sShell_cmdDef
|
|
|
|
{
|
2022-02-25 04:13:05 +00:00
|
|
|
const char *cmd;
|
|
|
|
const char *help;
|
2022-04-01 19:10:06 +00:00
|
|
|
const char *syntax;
|
2022-02-25 04:13:05 +00:00
|
|
|
shellCmdCallback callback;
|
|
|
|
} tShell_cmdDef;
|
|
|
|
|
|
|
|
extern tShell_cmdDef shellS_cmds[];
|
|
|
|
|
|
|
|
void shellS_initCmds(void);
|
|
|
|
void shellS_cleanupCmds(void);
|
|
|
|
|
|
|
|
void shellS_runCmd(tShell_client *client, char *cmd);
|
|
|
|
|
|
|
|
#endif
|