fsInternetDownloader Class Reference

#include <fsInternetDownloader.h>

List of all members.

Public Member Functions

BOOL IsCompletelyStopped ()
BOOL is_WasAccessedAtLeastOnce ()
FILETIME get_FileDate ()
fsString get_URL (BOOL bIncludeAuthInfo=FALSE)
BOOL RemoveMirror (int iIndex)
void Set_Timeout (UINT u)
UINT64 GetLDFileSize ()
DWORD GetState ()
void UseZipPreview (BOOL b)
LPCSTR Get_FileName ()
UINT64 GetDownloadedBytesCount ()
int GetFoundMirrorCount ()
LPCSTR GetContentType ()
void Set_MirrPingTime (int iMirr, DWORD dw)
BOOL IsMirrSearchPerformed ()
BOOL MeasureMirrorsSpeed ()
int GetMirrorRefs (int iMirrorIndex)
void Set_BaseServerPingTime (DWORD dw)
DWORD Get_BaseServerPingTime ()
void AddMirror (fsDownload_NetworkProperties *dnp, BOOL bIsGood=TRUE, BOOL bDontMeasureSpeed=FALSE)
void RemoveAllMirrors ()
BOOL GetMirrorIsGood (int iMirr)
DWORD GetMirrorPingTime (int iMirr)
void Set_MirrDontSearchIfSizeUnk (BOOL b)
void Set_MirrMaxCount (UINT u)
void Set_MirrFileMinSize (UINT u)
void Set_MirrCalcSpeed (BOOL b)
void Set_SearchForMirrors (BOOL bSearch)
BOOL IsSectionCreatingNow ()
fsInternetResult FindMirrors ()
fsInternetResult AddMirrorURL (LPCSTR pszUrl, LPCSTR pszUser=NULL, LPCSTR pszPassword=NULL, BOOL bDontMeasureSpeed=FALSE)
int GetMirrorURLCount ()
fsDownload_NetworkPropertiesMirrorDNP (int iMirror)
fsInternetResult StartDownloading (UINT uStartFrom=0)
void StopDownloading ()
void UseDetailedLog (BOOL b=TRUE)
fsInternetResult LaunchOneMoreSection ()
int GetStoppedSectionCount ()
fsInternetResult QuerySize ()
LPCSTR GetSuggestedFileName ()
void StopSection ()
void LockWriteFile (BOOL bLock)
void DeleteAllSections ()
int GetCreatingNowSectionCount (UINT nMirror)
float GetPercentDone ()
fsResumeSupportType IsResumeSupported ()
UINT GetTrafficLimit ()
void StopOnAccDenied (BOOL b)
void StopOnFileNotFound (BOOL b)
void DontRestartIfNoRanges (BOOL b)
void ResetSections ()
void SetOutputFile (HANDLE hOutFile)
UINT64 GetBytesLeft ()
int GetDoneSectionCount ()
int GetDownloadingSectionCount ()
BOOL IsAllSectionsOk ()
int GetRunningSectionCount ()
UINT64 GetSSFileSize ()
BOOL IsRunning ()
fsInternetResult GetSectionLastError (int iSection)
BOOL IsHavingError ()
BOOL IsStoppedByUser ()
BOOL IsDone ()
UINT64 GetSectionMaxSize ()
void SetMaxReconnectionNumber (UINT uMax)
void SetEventFunc (fsDownloaderEventFunc pfn, LPVOID lpParam)
UINT GetSpeed ()
void LimitTraffic (UINT uLimit)
BOOL IsDownloading ()
BOOL SaveSectionsState (LPBYTE pBuffer, LPDWORD pdwSize)
BOOL RestoreSectionsState (LPBYTE pBuffer, DWORD dwSize, DWORD dwVer)
BOOL RestoreSectionsState_vlt5 (LPBYTE pBuffer, DWORD dwSize, DWORD dwVer)
BOOL RestoreSectionsState_vlt4 (LPVOID pBuffer, DWORD dwSize)
void SetSectionMinSize (UINT uMinSize)
int GetNumberOfSections ()
BOOL SetSection_TrafficLimit (int iSection, UINT uLimit)
BOOL GetSectionInfo (int iSection, fsSection *pSection, BOOL bNoCacheAccounting=FALSE)
void SetRetryTime (DWORD dwMilliseconds)
fsInternetResult AddSection (BOOL bQueryCreation=TRUE)
fsDownload_NetworkPropertiesDNP (int nSection=-1)
void ApplyProperties (class fsInternetURLFile *pFile, fsDownload_NetworkProperties *dnp)
void ApplyProxySettings (fsInternetSession *pSession, fsDownload_NetworkProperties *dnp)
 fsInternetDownloader ()
virtual ~fsInternetDownloader ()

Static Public Member Functions

static void ResetTotalTrafficInfo ()
static UINT64 get_TotalSpeed ()
static UINT64 get_TotalTraffic ()
static BOOL is_PauseMode ()
static void set_PauseMode (BOOL bPause)

Protected Member Functions

BOOL IsMayZIP (BOOL bIsExeMay)
void ApplyArchiveRebuilding (fsArchive::fsArchiveRebuilder *ar, UINT64 uAddOffset=0)
fsInternetResult CheckIsZIP (UINT64 uStartPosition, fsInternetURLFile **ppFileToCloseIfNeed)
BOOL RestoreSectionsState_v5 (LPBYTE pBuffer, DWORD dwSize)
fsInternetResult Auto_SearchMirrors ()
UINT FindNotBusyMirrorIndex ()
fsInternetResult QuerySize (fsInternetURLFile *file)
void UpdateTrafficLimit ()
BOOL SleepInterval ()
DWORD Event (fsDownloaderEvent enEvent, UINT uDesc=0)
fsInternetResult OpenUrl (UINT64 uStartPos, fsInternetURLFile **ppFile, int iSectIndex, UINT &nMirror, BOOL bCheckFileSize=FALSE, LPCSTR pszContentTypeReq=NULL)
fsInternetResult OpenUrl_imp (UINT64 uStartPos, fsInternetURLFile **ppFile, int iSectIndex, UINT &nMirror, BOOL bCheckFileSize, int iAttempt, LPCSTR pszContentTypeReq=NULL)
fsInternetResult CreateAdditionalSection (BOOL bQueryCreation=TRUE)
BOOL CreateSection (fsSection &sect, BOOL bCreateThread=TRUE, BOOL bReduceSCN=TRUE)
fsInternetResult CreateMainSection (UINT uStartFrom=0, BOOL bQueryCreation=TRUE)

Static Protected Member Functions

static DWORD WINAPI _threadOpenUrl (LPVOID lp)
static void OnDataDownloaded (UINT64 nDataSize)
static void _MirrMgrEvents (fsMirrorURLsMgrEvent ev, LPVOID lp)
static void _InetFileDialogFunc (fsInetFileDialogDirection dir, LPCSTR pszMsg, LPVOID lp1, LPVOID lp2)
static DWORD WINAPI _threadDownload (LPVOID lp)

Protected Attributes

DWORD m_dwForceCacheSizePerSection
DWORD m_dwDataLenInCache
BOOL m_bWasAccessedAtLeastOnce
FILETIME m_fileDate
CRITICAL_SECTION m_csSections
BOOL m_bAddingSection
UINT m_uTimeout
fsArchiveInternetStreamm_pZipPreviewStream
fsString m_strContentType
DWORD m_dwState
CRITICAL_SECTION m_csOpenUrl
BOOL m_bMirrDontSearchIfSizeUnk
BOOL m_uMirrRecalcSpeedTime
UINT m_cMaxMirrs
UINT m_uMirrFileMinSize
BOOL m_bMirrMeasureSpeed
BOOL m_bSearchForMirrors
fsMirrorURLsMgrm_pMirrURLMgr
BOOL m_bDetLog
fsString m_strSuggFileName
int m_cBaseSectCreatingNow
fsResumeSupportType m_enRST
CRITICAL_SECTION m_csDone
fsInternetURLFilem_pOpeningFile
BOOL m_bStopOnAccDenied
BOOL m_bStopOnFileNotFound
BOOL m_bDontRestartIfNoRanges
UINT64 m_uSSFileSize
UINT64 m_uLDFileSize
fsSpeedMeter m_speed
CRITICAL_SECTION m_csAddSection
UINT m_uTrafficLimit
volatile UINT m_cThreads
volatile UINT m_cRunningThreads
volatile BOOL m_bNeedStop
UINT m_uSectionMinSize
CRITICAL_SECTION m_csWriteToFile
HANDLE m_hOutFile
UINT m_uRetryTime
BOOL m_bErrDownloading
fsDownload_NetworkProperties m_dnp
fs::list< fsSectionExm_vSections
fsDownloaderEventFunc m_pfnEvents
LPVOID m_lpEvent
UINT m_uMaxAttempts
BOOL m_bNoNewSections
fs::list< fsMirrorURLInfom_vMirrs
DWORD m_dwBaseServerPingTime
fsString m_strFileName
int m_cMirrsFound

Static Protected Attributes

static UINT64 m_nTotalTraffic = 0
static fsSpeedMeter m_TotalSpeed
static vmsCriticalSection m_csDataRcvd
static BOOL m_bPauseMode = FALSE

Static Private Member Functions

static BOOL __threadDownload_flushdata (fsSectionEx *sect, LPBYTE pBuffer, DWORD dwRead, LPBYTE &pbCache, DWORD &dwCacheSize, DWORD &dwCacheLen)

Classes

struct  _inc_tOU_param
struct  fsMirrorURLInfo
struct  fsSectionEx


Detailed Description

Definition at line 267 of file fsInternetDownloader.h.


Constructor & Destructor Documentation

fsInternetDownloader::fsInternetDownloader (  ) 

fsInternetDownloader::~fsInternetDownloader (  )  [virtual]


Member Function Documentation

BOOL fsInternetDownloader::IsCompletelyStopped (  ) 

Definition at line 3144 of file fsInternetDownloader.cpp.

References m_cThreads.

void fsInternetDownloader::ResetTotalTrafficInfo (  )  [static]

UINT64 fsInternetDownloader::get_TotalSpeed (  )  [static]

Definition at line 3132 of file fsInternetDownloader.cpp.

References fsSpeedMeter::GetSpeed(), and m_TotalSpeed.

UINT64 fsInternetDownloader::get_TotalTraffic (  )  [static]

BOOL fsInternetDownloader::is_PauseMode (  )  [static]

void fsInternetDownloader::set_PauseMode ( BOOL  bPause  )  [static]

Definition at line 3109 of file fsInternetDownloader.cpp.

References m_bPauseMode.

Referenced by CMainFrame::OnPausealldlds(), and fsScheduleMgr::StartTask().

BOOL fsInternetDownloader::is_WasAccessedAtLeastOnce (  ) 

Definition at line 3104 of file fsInternetDownloader.cpp.

References m_bWasAccessedAtLeastOnce.

FILETIME fsInternetDownloader::get_FileDate (  ) 

Definition at line 3099 of file fsInternetDownloader.cpp.

References m_fileDate.

Referenced by fsDownloadMgr::SetFileTime().

fsString fsInternetDownloader::get_URL ( BOOL  bIncludeAuthInfo = FALSE  ) 

Definition at line 3083 of file fsInternetDownloader.cpp.

References fsURL::Create(), DNP(), fsNPToScheme(), and IR_SUCCESS.

Referenced by vmsDownloadMgrEx::get_URL().

BOOL fsInternetDownloader::RemoveMirror ( int  iIndex  ) 

void fsInternetDownloader::Set_Timeout ( UINT  u  ) 

Definition at line 3047 of file fsInternetDownloader.cpp.

References m_uTimeout.

Referenced by fsDownloadMgr::ApplyProperties().

UINT64 fsInternetDownloader::GetLDFileSize (  ) 

DWORD fsInternetDownloader::GetState (  ) 

Definition at line 3005 of file fsInternetDownloader.cpp.

References m_dwState.

void fsInternetDownloader::UseZipPreview ( BOOL  b  ) 

Definition at line 2922 of file fsInternetDownloader.cpp.

References IDS_USEZIPPREVIEW, and m_dwState.

Referenced by fsDownloadMgr::ApplyProperties().

LPCSTR fsInternetDownloader::Get_FileName (  ) 

Definition at line 2792 of file fsInternetDownloader.cpp.

References m_strFileName.

Referenced by CDownloads_Tasks::GetFileName().

UINT64 fsInternetDownloader::GetDownloadedBytesCount (  ) 

int fsInternetDownloader::GetFoundMirrorCount (  ) 

Definition at line 2778 of file fsInternetDownloader.cpp.

References m_cMirrsFound.

Referenced by fsDownloadMgr::_DownloaderEvents().

LPCSTR fsInternetDownloader::GetContentType (  ) 

void fsInternetDownloader::Set_MirrPingTime ( int  iMirr,
DWORD  dw 
)

Definition at line 2768 of file fsInternetDownloader.cpp.

References m_vMirrs.

Referenced by fsDownloadMgr::LoadState().

BOOL fsInternetDownloader::IsMirrSearchPerformed (  ) 

BOOL fsInternetDownloader::MeasureMirrorsSpeed (  ) 

int fsInternetDownloader::GetMirrorRefs ( int  iMirrorIndex  ) 

Definition at line 2654 of file fsInternetDownloader.cpp.

References m_vSections.

Referenced by CDownloadProperties_MirrorsPage::UpdateMirrUsing().

void fsInternetDownloader::Set_BaseServerPingTime ( DWORD  dw  ) 

Definition at line 2758 of file fsInternetDownloader.cpp.

References m_dwBaseServerPingTime.

Referenced by fsDownloadMgr::LoadState().

DWORD fsInternetDownloader::Get_BaseServerPingTime (  ) 

void fsInternetDownloader::AddMirror ( fsDownload_NetworkProperties dnp,
BOOL  bIsGood = TRUE,
BOOL  bDontMeasureSpeed = FALSE 
)

void fsInternetDownloader::RemoveAllMirrors (  ) 

BOOL fsInternetDownloader::GetMirrorIsGood ( int  iMirr  ) 

Definition at line 2717 of file fsInternetDownloader.cpp.

References m_vMirrs.

Referenced by fsDownloadMgr::SaveState().

DWORD fsInternetDownloader::GetMirrorPingTime ( int  iMirr  ) 

void fsInternetDownloader::Set_MirrDontSearchIfSizeUnk ( BOOL  b  ) 

Definition at line 2693 of file fsInternetDownloader.cpp.

References m_bMirrDontSearchIfSizeUnk.

void fsInternetDownloader::Set_MirrMaxCount ( UINT  u  ) 

Definition at line 2688 of file fsInternetDownloader.cpp.

References m_cMaxMirrs.

void fsInternetDownloader::Set_MirrFileMinSize ( UINT  u  ) 

Definition at line 2678 of file fsInternetDownloader.cpp.

References m_uMirrFileMinSize.

void fsInternetDownloader::Set_MirrCalcSpeed ( BOOL  b  ) 

Definition at line 2683 of file fsInternetDownloader.cpp.

References m_bMirrMeasureSpeed.

void fsInternetDownloader::Set_SearchForMirrors ( BOOL  bSearch  ) 

Definition at line 2555 of file fsInternetDownloader.cpp.

References m_bSearchForMirrors.

Referenced by fsDownloadsMgr::_DownloadMgrEvents().

BOOL fsInternetDownloader::IsSectionCreatingNow (  ) 

fsInternetResult fsInternetDownloader::FindMirrors (  ) 

fsInternetResult fsInternetDownloader::AddMirrorURL ( LPCSTR  pszUrl,
LPCSTR  pszUser = NULL,
LPCSTR  pszPassword = NULL,
BOOL  bDontMeasureSpeed = FALSE 
)

int fsInternetDownloader::GetMirrorURLCount (  ) 

fsDownload_NetworkProperties * fsInternetDownloader::MirrorDNP ( int  iMirror  ) 

fsInternetResult fsInternetDownloader::StartDownloading ( UINT  uStartFrom = 0  ) 

void fsInternetDownloader::StopDownloading (  ) 

void fsInternetDownloader::UseDetailedLog ( BOOL  b = TRUE  ) 

Definition at line 2426 of file fsInternetDownloader.cpp.

References m_bDetLog.

Referenced by vmsDownloadMgrEx::UseDetailedLog().

fsInternetResult fsInternetDownloader::LaunchOneMoreSection (  ) 

int fsInternetDownloader::GetStoppedSectionCount (  ) 

Definition at line 2382 of file fsInternetDownloader.cpp.

References m_vSections, SS_STOPPED, and state().

Referenced by fsDownloadMgr::_threadDownloadMgr().

fsInternetResult fsInternetDownloader::QuerySize (  ) 

LPCSTR fsInternetDownloader::GetSuggestedFileName (  ) 

Definition at line 2231 of file fsInternetDownloader.cpp.

References fsString::Length(), m_strSuggFileName, and NULL.

Referenced by fsDownloadMgr::BuildFileName().

void fsInternetDownloader::StopSection (  ) 

void fsInternetDownloader::LockWriteFile ( BOOL  bLock  ) 

Definition at line 3162 of file fsInternetDownloader.cpp.

References m_csWriteToFile.

Referenced by fsDownloadMgr::_threadReserveDiskSpace().

void fsInternetDownloader::DeleteAllSections (  ) 

int fsInternetDownloader::GetCreatingNowSectionCount ( UINT  nMirror  ) 

float fsInternetDownloader::GetPercentDone (  ) 

Definition at line 2155 of file fsInternetDownloader.cpp.

References GetBytesLeft(), and GetLDFileSize().

Referenced by vmsDownloadMgrEx::GetPercentDone().

fsResumeSupportType fsInternetDownloader::IsResumeSupported (  ) 

UINT fsInternetDownloader::GetTrafficLimit (  ) 

Definition at line 2145 of file fsInternetDownloader.cpp.

References m_uTrafficLimit.

Referenced by vmsDownloadMgrEx::GetTrafficLimit().

void fsInternetDownloader::StopOnAccDenied ( BOOL  b  ) 

void fsInternetDownloader::StopOnFileNotFound ( BOOL  b  ) 

void fsInternetDownloader::DontRestartIfNoRanges ( BOOL  b  ) 

Definition at line 2130 of file fsInternetDownloader.cpp.

References m_bDontRestartIfNoRanges.

Referenced by fsDownloadMgr::ApplyProperties().

void fsInternetDownloader::ResetSections (  ) 

Definition at line 2122 of file fsInternetDownloader.cpp.

References m_cThreads, m_vSections, and StopDownloading().

Referenced by fsDownloadMgr::Reset().

void fsInternetDownloader::SetOutputFile ( HANDLE  hOutFile  ) 

Definition at line 2117 of file fsInternetDownloader.cpp.

References m_hOutFile.

Referenced by fsDownloadMgr::CloseFile(), and fsDownloadMgr::OnNeedFile().

UINT64 fsInternetDownloader::GetBytesLeft (  ) 

int fsInternetDownloader::GetDoneSectionCount (  ) 

int fsInternetDownloader::GetDownloadingSectionCount (  ) 

BOOL fsInternetDownloader::IsAllSectionsOk (  ) 

int fsInternetDownloader::GetRunningSectionCount (  ) 

UINT64 fsInternetDownloader::GetSSFileSize (  ) 

BOOL fsInternetDownloader::IsRunning (  ) 

fsInternetResult fsInternetDownloader::GetSectionLastError ( int  iSection  ) 

Definition at line 1962 of file fsInternetDownloader.cpp.

References m_vSections.

Referenced by fsDownloadMgr::_DownloaderEvents().

BOOL fsInternetDownloader::IsHavingError (  ) 

Definition at line 1957 of file fsInternetDownloader.cpp.

References m_bErrDownloading.

Referenced by fsDownloadMgr::IsSectionCanBeAdded().

BOOL fsInternetDownloader::IsStoppedByUser (  ) 

BOOL fsInternetDownloader::IsDone (  ) 

UINT64 fsInternetDownloader::GetSectionMaxSize (  ) 

Definition at line 1923 of file fsInternetDownloader.cpp.

References m_vSections.

Referenced by fsDownloadMgr::AddSection().

void fsInternetDownloader::SetMaxReconnectionNumber ( UINT  uMax  ) 

Definition at line 1918 of file fsInternetDownloader.cpp.

References m_uMaxAttempts.

Referenced by fsDownloadMgr::ApplyProperties().

void fsInternetDownloader::SetEventFunc ( fsDownloaderEventFunc  pfn,
LPVOID  lpParam 
)

Definition at line 1904 of file fsInternetDownloader.cpp.

References m_lpEvent, and m_pfnEvents.

Referenced by fsDownloadMgr::fsDownloadMgr().

UINT fsInternetDownloader::GetSpeed (  ) 

void fsInternetDownloader::LimitTraffic ( UINT  uLimit  ) 

BOOL fsInternetDownloader::IsDownloading (  ) 

Definition at line 1881 of file fsInternetDownloader.cpp.

References FALSE, m_vSections, SS_DOWNLOADING, state(), and TRUE.

Referenced by vmsDownloadMgrEx::IsDownloading().

BOOL fsInternetDownloader::SaveSectionsState ( LPBYTE  pBuffer,
LPDWORD  pdwSize 
)

BOOL fsInternetDownloader::RestoreSectionsState ( LPBYTE  pBuffer,
DWORD  dwSize,
DWORD  dwVer 
)

BOOL fsInternetDownloader::RestoreSectionsState_vlt5 ( LPBYTE  pBuffer,
DWORD  dwSize,
DWORD  dwVer 
)

BOOL fsInternetDownloader::RestoreSectionsState_vlt4 ( LPVOID  pBuffer,
DWORD  dwSize 
)

void fsInternetDownloader::SetSectionMinSize ( UINT  uMinSize  ) 

Definition at line 1397 of file fsInternetDownloader.cpp.

References m_uSectionMinSize.

Referenced by fsDownloadMgr::ApplyProperties().

int fsInternetDownloader::GetNumberOfSections (  ) 

BOOL fsInternetDownloader::SetSection_TrafficLimit ( int  iSection,
UINT  uLimit 
)

Definition at line 1382 of file fsInternetDownloader.cpp.

References FALSE, m_vSections, and TRUE.

BOOL fsInternetDownloader::GetSectionInfo ( int  iSection,
fsSection pSection,
BOOL  bNoCacheAccounting = FALSE 
)

void fsInternetDownloader::SetRetryTime ( DWORD  dwMilliseconds  ) 

Definition at line 1358 of file fsInternetDownloader.cpp.

References m_uRetryTime.

Referenced by fsDownloadMgr::ApplyProperties().

fsInternetResult fsInternetDownloader::AddSection ( BOOL  bQueryCreation = TRUE  ) 

fsDownload_NetworkProperties * fsInternetDownloader::DNP ( int  nSection = -1  ) 

void fsInternetDownloader::ApplyProperties ( class fsInternetURLFile pFile,
fsDownload_NetworkProperties dnp 
)

void fsInternetDownloader::ApplyProxySettings ( fsInternetSession pSession,
fsDownload_NetworkProperties dnp 
)

DWORD WINAPI fsInternetDownloader::_threadOpenUrl ( LPVOID  lp  )  [static, protected]

void fsInternetDownloader::OnDataDownloaded ( UINT64  nDataSize  )  [static, protected]

BOOL fsInternetDownloader::IsMayZIP ( BOOL  bIsExeMay  )  [protected]

void fsInternetDownloader::ApplyArchiveRebuilding ( fsArchive::fsArchiveRebuilder ar,
UINT64  uAddOffset = 0 
) [protected]

fsInternetResult fsInternetDownloader::CheckIsZIP ( UINT64  uStartPosition,
fsInternetURLFile **  ppFileToCloseIfNeed 
) [protected]

BOOL fsInternetDownloader::RestoreSectionsState_v5 ( LPBYTE  pBuffer,
DWORD  dwSize 
) [protected]

fsInternetResult fsInternetDownloader::Auto_SearchMirrors (  )  [protected]

UINT fsInternetDownloader::FindNotBusyMirrorIndex (  )  [protected]

Definition at line 2576 of file fsInternetDownloader.cpp.

References m_vMirrs, and m_vSections.

Referenced by CreateAdditionalSection(), and OpenUrl_imp().

void fsInternetDownloader::_MirrMgrEvents ( fsMirrorURLsMgrEvent  ev,
LPVOID  lp 
) [static, protected]

void fsInternetDownloader::_InetFileDialogFunc ( fsInetFileDialogDirection  dir,
LPCSTR  pszMsg,
LPVOID  lp1,
LPVOID  lp2 
) [static, protected]

fsInternetResult fsInternetDownloader::QuerySize ( fsInternetURLFile file  )  [protected]

void fsInternetDownloader::UpdateTrafficLimit (  )  [protected]

BOOL fsInternetDownloader::SleepInterval (  )  [protected]

Definition at line 1967 of file fsInternetDownloader.cpp.

References FALSE, m_bNeedStop, m_uRetryTime, and TRUE.

Referenced by _threadDownload().

DWORD fsInternetDownloader::Event ( fsDownloaderEvent  enEvent,
UINT  uDesc = 0 
) [protected]

fsInternetResult fsInternetDownloader::OpenUrl ( UINT64  uStartPos,
fsInternetURLFile **  ppFile,
int  iSectIndex,
UINT nMirror,
BOOL  bCheckFileSize = FALSE,
LPCSTR  pszContentTypeReq = NULL 
) [protected]

fsInternetResult fsInternetDownloader::OpenUrl_imp ( UINT64  uStartPos,
fsInternetURLFile **  ppFile,
int  iSectIndex,
UINT nMirror,
BOOL  bCheckFileSize,
int  iAttempt,
LPCSTR  pszContentTypeReq = NULL 
) [protected]

Definition at line 1056 of file fsInternetDownloader.cpp.

References _InetFileDialogFunc(), _threadOpenUrl(), ApplyProperties(), ApplyProxySettings(), ASSERT, fsURL::Crack(), fsURL::Create(), vmsInternetSession::Create(), DE_BADFILESIZE, DE_ERRFROMSERVER, DE_REDIRECTING, DE_REDIRECTINGOKCONTINUEOPENING, DE_TRYINGANOTHERMIRROR, fsInternetDownloader::_inc_tOU_param::dnp, DNP(), fsDownload_NetworkProperties::enAccType, fsDownload_NetworkProperties::enFtpTransferType, fsDownload_NetworkProperties::enProtocol, Event(), FALSE, FindNotBusyMirrorIndex(), fsDNP_ApplyUrl(), fsFileNameFromUrlPath(), fsnew1, fsNPToScheme(), fsPathFromUrlPath(), fsInternetURLFile::FtpSetTransferType(), FTT_ASCII, FTT_BINARY, FTT_UNKNOWN, fsInternetURLFile::GetFileSize(), fsInternetURLFile::GetLastError(), fsInternetURLFile::GetSuggestedFileName(), fsInternetURLFile::Initialize(), IR_BADFILESIZE, IR_DOUBTFUL_RANGESRESPONSE, IR_ERROR, IR_EXTERROR, IR_NEEDREDIRECT, IR_RANGESNOTAVAIL, IR_S_FALSE, IR_SERVERUNKERROR, IR_SUCCESS, IsDone(), IsExtInExtsStr(), fsInternetURLFile::IsResumeSupported(), fsString::Length(), LOG, LPSTR, LPVOID, m_bNeedStop, m_bWasAccessedAtLeastOnce, m_csOpenUrl, m_enRST, m_fileDate, m_pOpeningFile, m_strContentType, m_strFileName, m_strSuggFileName, m_uMaxAttempts, m_uSSFileSize, m_vMirrs, m_vSections, MY_MAX_PATH, nl, NP_FTP, NULL, fsInternetDownloader::_inc_tOU_param::pFile, fsDownload_NetworkProperties::pszAgent, fsDownload_NetworkProperties::pszASCIIExts, fsDownload_NetworkProperties::pszPassword, fsDownload_NetworkProperties::pszPathName, fsDownload_NetworkProperties::pszProxyName, fsDownload_NetworkProperties::pszServerName, fsDownload_NetworkProperties::pszUserName, fsInternetDownloader::_inc_tOU_param::pthis, RST_NONE, SAFE_DELETE, SAFE_DELETE_ARRAY, fsSpeaking::SetDialogFunc(), TRUE, fsDownload_NetworkProperties::uServerPort, fsInternetDownloader::_inc_tOU_param::uStartPos, and vmsMakeWinInetProxy().

Referenced by OpenUrl().

DWORD WINAPI fsInternetDownloader::_threadDownload ( LPVOID  lp  )  [static, protected]

Definition at line 492 of file fsInternetDownloader.cpp.

References __threadDownload_flushdata(), _InetFileDialogFunc(), ASSERT, BOOL, CHECK_NEED_STOP, vmsSpeedTracker::CheckCurrentSpeedTooLow(), CheckIsZIP(), CURRENT_DL_POS, CURRENT_DW_POS, vmsSpeedTracker::CurrentSpeedIs(), DE_ALLSTOPPEDORDONE, DE_CONNECTED, DE_CONNECTING, DE_ERROROCCURED, DE_FAILCONNECT, DE_MAYADDSECTION, DE_PAUSE, DE_SECTDOWNLOADING, DE_SECTIONDONE, DE_SECTIONSTOPPED, DE_SPEEDISTOOLOW, DE_WRITEERROR, DNP(), DNPF_RESTARTSECTIONWHENSPEEDTOOLOW, fsSpeedMeter::Done(), fsInternetDownloader::fsSectionEx::dwCacheLen, fsDownload_NetworkProperties::dwFlags, fsDownload_NetworkProperties::enProtocol, Event(), FALSE, fsSection::file, fsInternetURLFile::FtpGetTransferType(), FTT_ASCII, fsInternetURLFile::GetFileSize(), GetLastError(), IR_DOUBTFUL_RANGESRESPONSE, IR_ERROR, IR_LOSTCONNECTION, IR_RANGESNOTAVAIL, IR_S_FALSE, IR_SUCCESS, IR_WININETUNKERROR, is_PauseMode(), fsSection::iSection, IsMayZIP(), fsSection::lastErr, LOG, LPVOID, m_bErrDownloading, m_bNeedStop, m_cRunningThreads, m_csDone, m_csSections, m_cThreads, m_dnp, m_dwDataLenInCache, m_speed, m_uLDFileSize, m_uMaxAttempts, m_uRetryTime, m_vMirrs, m_vSections, nl, fsSection::nMirrorURL, fsTicksMgr::Now(), NP_FTP, NULL, OnDataDownloaded(), OpenUrl(), fsSection::pThis, fsInternetURLFile::Read(), vmsSpeedTracker::Reset(), fsSpeedMeter::Reset(), SAFE_DELETE, SAFE_DELETE_ARRAY, vmsSpeedTracker::set_LowSpeedDuration(), vmsSpeedTracker::set_LowSpeedFactor(), fsSpeaking::SetDialogFunc(), SleepInterval(), SS_DONE, SS_DOWNLOADING, SS_ERROR, SS_ERRSTOPPED, SS_NEEDSTOP, SS_RECONNECTING, SS_STOPPED, SS_WRITEERROR, fsSection::state, TRUE, TSECT, fsSection::uCurrent, fsSection::uDCurrent, fsSection::uDEnd, fsSection::uDStart, fsSection::uEnd, UpdateTrafficLimit(), fsSection::uSpeed, fsSection::uSpeedLimit, fsSection::uStart, fsDownload_NetworkProperties::wLowSpeed_Duration, fsDownload_NetworkProperties::wLowSpeed_Factor, fsDownload_NetworkProperties::wRollBackSize, fsArchive::ZIP_BEGIN_SIG, and fsArchive::ZIP_SFXMAXSIZE.

Referenced by CreateSection(), LaunchOneMoreSection(), and StartDownloading().

fsInternetResult fsInternetDownloader::CreateAdditionalSection ( BOOL  bQueryCreation = TRUE  )  [protected]

BOOL fsInternetDownloader::CreateSection ( fsSection sect,
BOOL  bCreateThread = TRUE,
BOOL  bReduceSCN = TRUE 
) [protected]

fsInternetResult fsInternetDownloader::CreateMainSection ( UINT  uStartFrom = 0,
BOOL  bQueryCreation = TRUE 
) [protected]

BOOL fsInternetDownloader::__threadDownload_flushdata ( fsSectionEx sect,
LPBYTE  pBuffer,
DWORD  dwRead,
LPBYTE &  pbCache,
DWORD &  dwCacheSize,
DWORD &  dwCacheLen 
) [static, private]


Member Data Documentation

UINT64 fsInternetDownloader::m_nTotalTraffic = 0 [static, protected]

Definition at line 460 of file fsInternetDownloader.h.

Referenced by get_TotalSpeed(), and OnDataDownloaded().

Definition at line 462 of file fsInternetDownloader.h.

Referenced by OnDataDownloaded(), and ResetTotalTrafficInfo().

BOOL fsInternetDownloader::m_bPauseMode = FALSE [static, protected]

Definition at line 464 of file fsInternetDownloader.h.

Referenced by is_PauseMode(), and set_PauseMode().

Definition at line 466 of file fsInternetDownloader.h.

Referenced by fsInternetDownloader(), get_FileDate(), and OpenUrl_imp().

CRITICAL_SECTION fsInternetDownloader::m_csSections [protected]

Definition at line 471 of file fsInternetDownloader.h.

Referenced by ApplyProxySettings(), fsInternetDownloader(), and Set_Timeout().

Definition at line 476 of file fsInternetDownloader.h.

Referenced by CheckIsZIP(), fsInternetDownloader(), and StopDownloading().

Definition at line 480 of file fsInternetDownloader.h.

Referenced by fsInternetDownloader(), GetContentType(), and OpenUrl_imp().

CRITICAL_SECTION fsInternetDownloader::m_csOpenUrl [protected]

Definition at line 486 of file fsInternetDownloader.h.

Referenced by Auto_SearchMirrors(), and Set_MirrDontSearchIfSizeUnk().

Definition at line 487 of file fsInternetDownloader.h.

Definition at line 488 of file fsInternetDownloader.h.

Referenced by FindMirrors(), and Set_MirrMaxCount().

Definition at line 497 of file fsInternetDownloader.h.

Referenced by fsInternetDownloader(), and StopDownloading().

Definition at line 503 of file fsInternetDownloader.h.

Referenced by GetSuggestedFileName(), OpenUrl_imp(), and QuerySize().

CRITICAL_SECTION fsInternetDownloader::m_csDone [protected]

Definition at line 511 of file fsInternetDownloader.h.

Referenced by StartDownloading(), and StopOnAccDenied().

Definition at line 512 of file fsInternetDownloader.h.

Referenced by StartDownloading(), and StopOnFileNotFound().

Definition at line 520 of file fsInternetDownloader.h.

Referenced by _threadDownload(), GetSpeed(), and StartDownloading().

CRITICAL_SECTION fsInternetDownloader::m_csAddSection [protected]

volatile UINT fsInternetDownloader::m_cThreads [protected]

volatile BOOL fsInternetDownloader::m_bNeedStop [protected]

CRITICAL_SECTION fsInternetDownloader::m_csWriteToFile [protected]

Definition at line 546 of file fsInternetDownloader.h.

Referenced by _threadDownload(), DNP(), and fsInternetDownloader().

Definition at line 562 of file fsInternetDownloader.h.

Referenced by Event(), fsInternetDownloader(), and SetEventFunc().

Definition at line 563 of file fsInternetDownloader.h.

Referenced by Event(), and SetEventFunc().

Definition at line 588 of file fsInternetDownloader.h.

Referenced by FindMirrors(), fsInternetDownloader(), and GetFoundMirrorCount().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:05 2008 by  doxygen 1.5.6