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.

151 lines
4.2 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: LgRemoteInterfaceReport.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgRemoteInterfaceReport.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "..\Version.h"
  16. #include "LgRemoteInterfaceReport.h"
  17. CLgRemoteInterfaceReport::CLgRemoteInterfaceReport()
  18. {
  19. m_Link.SetData( this );
  20. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceReport::CLgRemoteInterfaceReport" );
  21. }
  22. CLgRemoteInterfaceReport::~CLgRemoteInterfaceReport()
  23. {
  24. UnlinkRemoteInterfaceReport();
  25. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceReport::~CLgRemoteInterfaceReport" );
  26. }
  27. BOOL CLgRemoteInterfaceReport::LinkRemoteInterfaceReport( CLgRemoteInterfaceReport *pInterface )
  28. {
  29. if( !pInterface )
  30. return FALSE;
  31. return m_Link.Link( &pInterface->m_Link );
  32. }
  33. void CLgRemoteInterfaceReport::UnlinkRemoteInterfaceReport()
  34. {
  35. m_Link.UnlinkAll();
  36. }
  37. BOOL CLgRemoteInterfaceReport::DoRemoteReportList( REMOTE_CONTEXT rc, LPCTSTR pFolderName, INT nSize )
  38. {
  39. CLgLocker Lock( &m_Link );
  40. if( !m_Link.GetCount() )
  41. return 0;
  42. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  43. return pInterface->DoRemoteReportList( rc, pFolderName, nSize );
  44. }
  45. /*
  46. BOOL CLgRemoteInterfaceReport::DoRemoteReportText( REMOTE_CONTEXT rc, LPCTSTR pFileName, INT nSize )
  47. {
  48. CLgLocker Lock( &m_Link );
  49. if( !m_Link.GetCount() )
  50. return 0;
  51. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  52. return pInterface->DoRemoteReportText( rc, pFileName, nSize );
  53. }
  54. BOOL CLgRemoteInterfaceReport::DoRemoteReportImage( REMOTE_CONTEXT rc, LPCTSTR pFileName, INT nSize )
  55. {
  56. CLgLocker Lock( &m_Link );
  57. if( !m_Link.GetCount() )
  58. return 0;
  59. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  60. return pInterface->DoRemoteReportImage( rc, pFileName, nSize );
  61. }
  62. */
  63. BOOL CLgRemoteInterfaceReport::OnRemoteReportList( REMOTE_CONTEXT rc, PBYTE pText, INT nCount )
  64. {
  65. CLgLocker Lock( &m_Link );
  66. if( !m_Link.GetCount() )
  67. return FALSE;
  68. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  69. return pInterface->OnRemoteReportList( rc, pText, nCount );
  70. }
  71. /*
  72. void CLgRemoteInterfaceReport::OnRemoteReportText( REMOTE_CONTEXT rc, PBYTE pText, INT nCount )
  73. {
  74. CLgLocker Lock( &m_Link );
  75. if( !m_Link.GetCount() )
  76. return;
  77. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  78. pInterface->OnRemoteReportText( rc, pText, nCount );
  79. }
  80. void CLgRemoteInterfaceReport::OnRemoteReportImage( REMOTE_CONTEXT rc, CLgImageDIB *pDIB )
  81. {
  82. CLgLocker Lock( &m_Link );
  83. if( !m_Link.GetCount() )
  84. return;
  85. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  86. pInterface->OnRemoteReportImage( rc, pDIB );
  87. }
  88. void CLgRemoteInterfaceReport::OnRemoteReportImage( REMOTE_CONTEXT rc, CLgImageJPEG *pJPEG )
  89. {
  90. CLgLocker Lock( &m_Link );
  91. if( !m_Link.GetCount() )
  92. return;
  93. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  94. pInterface->OnRemoteReportImage( rc, pJPEG );
  95. }
  96. */
  97. BOOL CLgRemoteInterfaceReport::DoRemoteReportFile( REMOTE_CONTEXT rc, LPCTSTR pFileName, INT nSize, DWORD dwPosition )
  98. {
  99. CLgLocker Lock( &m_Link );
  100. if( !m_Link.GetCount() )
  101. return FALSE;
  102. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  103. return pInterface->DoRemoteReportFile( rc, pFileName, nSize, dwPosition );
  104. }
  105. BOOL CLgRemoteInterfaceReport::OnRemoteReportFile( REMOTE_CONTEXT rc, LPBYTE pBuffer, INT nSize )
  106. {
  107. CLgLocker Lock( &m_Link );
  108. if( !m_Link.GetCount() )
  109. return FALSE;
  110. CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
  111. return pInterface->OnRemoteReportFile( rc, pBuffer, nSize );
  112. }