You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __IM_KERNEL_H_INCL__
  2. #define __IM_KERNEL_H_INCL__
  3. #include "../../lib/components/base/basicEngine.h"
  4. #include "../../lib/components/base/basicThread.h"
  5. #include "../../lib/components/base/basicSettingsProvider.h"
  6. #include "IM_DnnWorker.h"
  7. class networkClientHandler;
  8. /**
  9. * TODO: Add class description
  10. *
  11. * @author Gagua
  12. */
  13. class IM_Kernel : public basicEngine, public basicThread {
  14. private:
  15. basicLogCollection * m_pLog;
  16. config_setting_t * m_pSettings;
  17. uint8_t m_bExitCause;
  18. IM_DnnWorker * m_pWorker;
  19. protected:
  20. virtual void m_fThreadProc( void );
  21. public:
  22. static IM_Kernel * getInstance();
  23. // Destructor
  24. virtual ~IM_Kernel();
  25. bool signalEvent( void );
  26. virtual bool start();
  27. virtual bool stop( bool Force = false );
  28. uint8_t getExitCause( void ){ return m_bExitCause;};
  29. virtual networkClientHandler * attachNewClient( int SocketID );
  30. virtual bool detachClient( networkClientHandler *ptr );
  31. private:
  32. static IM_Kernel * _instance;
  33. // Constructor
  34. explicit IM_Kernel( config_setting_t * Settings = NULL );
  35. };
  36. #endif // __IM_KERNEL_H_INCL__