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
151 lines
4.2 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 30/06/2002
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgRemoteInterfaceReport.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of LgRemoteInterfaceReport.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "..\Version.h"
|
|
#include "LgRemoteInterfaceReport.h"
|
|
|
|
CLgRemoteInterfaceReport::CLgRemoteInterfaceReport()
|
|
{
|
|
m_Link.SetData( this );
|
|
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceReport::CLgRemoteInterfaceReport" );
|
|
}
|
|
|
|
CLgRemoteInterfaceReport::~CLgRemoteInterfaceReport()
|
|
{
|
|
UnlinkRemoteInterfaceReport();
|
|
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteInterfaceReport::~CLgRemoteInterfaceReport" );
|
|
}
|
|
|
|
BOOL CLgRemoteInterfaceReport::LinkRemoteInterfaceReport( CLgRemoteInterfaceReport *pInterface )
|
|
{
|
|
if( !pInterface )
|
|
return FALSE;
|
|
|
|
return m_Link.Link( &pInterface->m_Link );
|
|
}
|
|
|
|
void CLgRemoteInterfaceReport::UnlinkRemoteInterfaceReport()
|
|
{
|
|
m_Link.UnlinkAll();
|
|
}
|
|
|
|
BOOL CLgRemoteInterfaceReport::DoRemoteReportList( REMOTE_CONTEXT rc, LPCTSTR pFolderName, INT nSize )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return 0;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
return pInterface->DoRemoteReportList( rc, pFolderName, nSize );
|
|
}
|
|
/*
|
|
BOOL CLgRemoteInterfaceReport::DoRemoteReportText( REMOTE_CONTEXT rc, LPCTSTR pFileName, INT nSize )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return 0;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
return pInterface->DoRemoteReportText( rc, pFileName, nSize );
|
|
}
|
|
|
|
BOOL CLgRemoteInterfaceReport::DoRemoteReportImage( REMOTE_CONTEXT rc, LPCTSTR pFileName, INT nSize )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return 0;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
return pInterface->DoRemoteReportImage( rc, pFileName, nSize );
|
|
}
|
|
*/
|
|
BOOL CLgRemoteInterfaceReport::OnRemoteReportList( REMOTE_CONTEXT rc, PBYTE pText, INT nCount )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return FALSE;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
return pInterface->OnRemoteReportList( rc, pText, nCount );
|
|
}
|
|
/*
|
|
void CLgRemoteInterfaceReport::OnRemoteReportText( REMOTE_CONTEXT rc, PBYTE pText, INT nCount )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
pInterface->OnRemoteReportText( rc, pText, nCount );
|
|
}
|
|
|
|
void CLgRemoteInterfaceReport::OnRemoteReportImage( REMOTE_CONTEXT rc, CLgImageDIB *pDIB )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
pInterface->OnRemoteReportImage( rc, pDIB );
|
|
}
|
|
|
|
void CLgRemoteInterfaceReport::OnRemoteReportImage( REMOTE_CONTEXT rc, CLgImageJPEG *pJPEG )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
pInterface->OnRemoteReportImage( rc, pJPEG );
|
|
}
|
|
*/
|
|
BOOL CLgRemoteInterfaceReport::DoRemoteReportFile( REMOTE_CONTEXT rc, LPCTSTR pFileName, INT nSize, DWORD dwPosition )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return FALSE;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
return pInterface->DoRemoteReportFile( rc, pFileName, nSize, dwPosition );
|
|
}
|
|
|
|
BOOL CLgRemoteInterfaceReport::OnRemoteReportFile( REMOTE_CONTEXT rc, LPBYTE pBuffer, INT nSize )
|
|
{
|
|
CLgLocker Lock( &m_Link );
|
|
|
|
if( !m_Link.GetCount() )
|
|
return FALSE;
|
|
|
|
CLgRemoteInterfaceReport *pInterface = (CLgRemoteInterfaceReport*)m_Link[0]->GetData();
|
|
|
|
return pInterface->OnRemoteReportFile( rc, pBuffer, nSize );
|
|
}
|