//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: LgRemoteServerTcpIpConnection.h // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Header file of LgRemoteServerTcpIpConnection.h //---------------------------------------------------------------------------- #ifndef __VIDEO__SERVER__CONNECTION__H__INCLUDED__ #define __VIDEO__SERVER__CONNECTION__H__INCLUDED__ #if _MSC_VER > 1000 #pragma once #endif #include "..\..\LgLib\Socket\LgSocketServerConnection.h" #include "LgRemoteSocket.h" #include "LgRemoteServerTcpIp.h" const int CLgRemoteServerTcpIpConnectionMaster = 0; const int CLgRemoteServerTcpIpConnectionSlave = 1; class CLgRemoteServerTcpIpConnection : public CLgSocketServerConnection, public CLgCriticalSection, public CLgLinkSP, public CLgLinkSP { public: typedef CLgLinkSP ConnectionToSessionMasterLinkSP; typedef CLgLinkSP ConnectionToSessionSlaveLinkSP; public: CLgRemoteServerTcpIpConnection( CLgRemoteServerTcpIp *pServer ); virtual ~CLgRemoteServerTcpIpConnection(); private: virtual void OnPacketVideo( PLG_TCP_PACKET_VIDEO pReceivePacket ); virtual void OnPacketPTZ( PLG_TCP_PACKET_PTZ pReceivePacket ); virtual void OnPacketLGS( PLG_TCP_PACKET_LGS pReceivePacket ); virtual void OnPacketReport( PLG_TCP_PACKET_REPORT pReceivePacket ); virtual void OnPacketBoardReceiver( PLG_TCP_PACKET_BOARD_RECEIVER pReceivePacket ); virtual void OnPacketConnect( PLG_TCP_PACKET_CONNECT pReceivePacket ); virtual void OnPacketSessionInfo( PLG_TCP_PACKET_SESSION_INFO pReceivePacket ); public: void SetType( BOOL bMaster ) { m_bMasterType = bMaster; } BOOL IsMaster() { return m_bMasterType; } INT GetConnectionID() { return m_nConnectionID; } private: BOOL m_bMasterType; INT m_nConnectionID; BYTE m_nConnectionType; protected: friend class CLgRemoteServerTcpIpSession; }; #endif