Old fashion design for PC-104
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.

79 lines
2.1 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 30/06/2002
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgRemoteInterfaceInfo.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgRemoteInterfaceInfo.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "..\Version.h"
  16. #include "LgRemoteInterfaceInfo.h"
  17. CLgRemoteInterfaceInfo::CLgRemoteInterfaceInfo()
  18. {
  19. m_Link.SetData( this );
  20. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceInfo::CLgRemoteInterfaceInfo" );
  21. }
  22. CLgRemoteInterfaceInfo::~CLgRemoteInterfaceInfo()
  23. {
  24. UnlinkRemoteInterfaceInfo();
  25. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceInfo::~CLgRemoteInterfaceInfo" );
  26. }
  27. BOOL CLgRemoteInterfaceInfo::LinkRemoteInterfaceInfo( CLgRemoteInterfaceInfo *pInterface )
  28. {
  29. if( !pInterface )
  30. return FALSE;
  31. return m_Link.Link( &pInterface->m_Link );
  32. }
  33. void CLgRemoteInterfaceInfo::UnlinkRemoteInterfaceInfo()
  34. {
  35. m_Link.UnlinkAll();
  36. }
  37. BOOL CLgRemoteInterfaceInfo::OnRemoteInfoConnect( BOOL bConnected )
  38. {
  39. CLgLocker Lock( &m_Link );
  40. if( !m_Link.GetCount() )
  41. return FALSE;
  42. CLgRemoteInterfaceInfo *pInterface = (CLgRemoteInterfaceInfo*)m_Link[0]->GetData();
  43. return pInterface->OnRemoteInfoConnect( bConnected );
  44. }
  45. BOOL CLgRemoteInterfaceInfo::DoRemoteInfoTransfer()
  46. {
  47. CLgLocker Lock( &m_Link );
  48. if( !m_Link.GetCount() )
  49. return FALSE;
  50. CLgRemoteInterfaceInfo *pInterface = (CLgRemoteInterfaceInfo*)m_Link[0]->GetData();
  51. return pInterface->DoRemoteInfoTransfer();
  52. }
  53. BOOL CLgRemoteInterfaceInfo::OnRemoteInfoTransfer( PLARGE_INTEGER pTX, PLARGE_INTEGER pRX )
  54. {
  55. CLgLocker Lock( &m_Link );
  56. if( !m_Link.GetCount() )
  57. return FALSE;
  58. CLgRemoteInterfaceInfo *pInterface = (CLgRemoteInterfaceInfo*)m_Link[0]->GetData();
  59. return pInterface->OnRemoteInfoTransfer( pTX, pRX );
  60. }