#ifndef _STTERM_H_
#define _STTERM_H_

#include <lepto/string.h>
#include <lepto/signal.h>

#include <fosh/ansi.h>
#include <fosh/commander.h>

class CCommand;

class CFosh
{
private:
      CString command;
      CCommander m_commander;
      bool m_logedin;
      #if ! defined( MCU_STM32 )
      bool m_inputTerminal=true;
      #endif

public:
      CFosh();
      CSignal <int, int, char *> signalExecCommand;

      int eventLoop();

      void dump(const void *buf, int size);
      int execCommand();

      void printPrompt();
      void login(const void *buf , int size);
      void addCommand(const CCommand *pCommand);
};


#endif // ! ? _STTERM_H_
