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.

36 lines
1.4 KiB

​
​
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
2 years ago
​
​
​
​
  1. #ifndef __MOJO_REMOTE_CLIENT_HEADER__
  2. #define __MOJO_REMOTE_CLIENT_HEADER__
  3. #include "../../components/base/basicLogCollection.h"
  4. #include "../../components/base/basicThread.h"
  5. #include "../../data/net/clientPort.h"
  6. #include "../../data/protocol/protocol.h"
  7. #include "../../data/protocol/protocolARGUS_DATA.h"
  8. class mojoKernel;
  9. class mojoRemoteClient: public basicThread, public protocolParser{
  10. private:
  11. basicLogCollection *m_pLog;
  12. mojoKernel *m_pMaster;
  13. clientPort *m_pPort;
  14. basicMutex m_mQueryProtector;
  15. uint32_t m_nQueryMessage;
  16. uint8_t m_bAutomationStage;
  17. bool m_bShutdownCommunication;
  18. bool m_bCommunicationEstablished;
  19. bool m_bRegisteredWithRemotePeer;
  20. protected:
  21. virtual int packetChecker( U8 *Buffer, size_t BufferSize);
  22. virtual protocolPackage * packetExtractor( U8 *Buffer, size_t BufferSize);
  23. virtual bool packetHandler( protocolPackage *Package );
  24. virtual void m_fThreadProc( void );
  25. public:
  26. explicit mojoRemoteClient( mojoKernel *ptr );
  27. ~mojoRemoteClient();
  28. virtual bool create();
  29. bool createVideoTransferTask( ARGUS_DATA_VIDEO_SEGMENT *ptr );
  30. bool registerMojo( CSTR identity );
  31. bool validate();
  32. };
  33. #endif