Files
Sun1602/Tools/UpdateModule/UpdateFileInfo.cpp
T
2022-10-26 12:25:11 +08:00

60 lines
1.4 KiB
C++

#include ".\updatefileinfo.h"
CUpdateFileInfo::CUpdateFileInfo(void)
{
memset( m_szFileName, 0, MAX_PATH ); // 현재 다운 받는 파일이름
m_unWholeFileSize = 0; // 현재 다운 받는 파일의 전체크기
m_unNowFileSize = 0; // 현재 다운 받는 파일의 현재까지 받은 파일크기
// m_unTotalFileCount = 0; // 현 버전의 전체 업데이트 파일 수
// m_unNowFileCount = 0; // 현 버전의 지금까지 다운받은 파일 수
}
CUpdateFileInfo::~CUpdateFileInfo(void)
{
}
//현재 다운로드중인 파일의 정보를 초기화 한다
void CUpdateFileInfo::Reset()
{
memset( m_szFileName, 0, MAX_PATH ); // 현재 다운 받는 파일이름
m_unWholeFileSize = 0; // 현재 다운 받는 파일의 전체크기
m_unNowFileSize = 0; // 현재 다운 받는 파일의 현재까지 받은 파일크기
}
void CUpdateFileInfo::SetFileName( char* pszFileName )
{
if( !pszFileName )
return;
strncpy( m_szFileName, pszFileName, MAX_PATH );
}
void CUpdateFileInfo::GetFileName( char* pszFileName, int nSize )
{
memset( pszFileName, 0, nSize );
if( !m_szFileName ) return;
strncpy( pszFileName, m_szFileName, nSize );
}
void CUpdateFileInfo::SetProcessName( char* pszProcessName )
{
if( !m_szProcessName ) return;
strncpy( m_szProcessName, pszProcessName, MAX_PATH );
}
void CUpdateFileInfo::GetProcessName( char* pszProcessName, int nSize )
{
memset( pszProcessName, 0, nSize );
if( !m_szProcessName ) return;
strncpy( pszProcessName, m_szProcessName, nSize );
}