virtual void unregisterModule(const char *moduleName)=0
virtual void setByteInterceptor(ByteInterceptor interceptor)
virtual void setLineInterceptor(LineInterceptor interceptor)
void(*)(uint8_t byte) ByteInterceptor
virtual ByteInterceptor getByteInterceptor() const
virtual void setAuthProvider(bool(*authCheck)())=0
bool(*)(const char *line) LineInterceptor
virtual bool processCommand(const char *line)=0
virtual size_t getCommandCount() const =0
virtual void showHelp()=0
virtual bool registerCommand(const Command &cmd)=0
virtual ~ICommandRegistry()=default
virtual void setOnCommandExecuted(void(*callback)())=0
constexpr size_t kSubCommandHeadBufSize
Buffer size for the "<name> <args>" column built during HELP rendering.
ICommandRegistry & getCommandRegistry()
Returns singleton command-registry interface.
void(*)(const char *args) CommandHandler
CommandHandler handler
Top-level dispatcher / handler.
const char * moduleName
Module that registered the command (used for HELP grouping).
const char * help
One-line summary shown in HELP.
const char * name
Top-level command (e.g. "TOTP" or "PING").
const SubCommand * subCommands
Optional null-terminated sub-command table for HELP.
bool requiresAuth
Whether the command needs an authenticated session.
CommandHandler handler
Invoked with the args following the sub-command keyword.
const char * args
Argument hint shown in HELP, e.g. "<ns> <key>". May be "" or nullptr.
const char * help
One-line description.
const char * name
Sub-command keyword, e.g. "LIST". nullptr terminates the array.