fsDownloadMgr Class Reference

#include <fsDownloadMgr.h>

List of all members.

Public Member Functions

BOOL HasActivity ()
fsDownloadState get_State ()
int get_ReservingDiskSpaceProgress ()
void DoRapidshareSupport ()
void Reset ()
fsString get_URL ()
BOOL MoveToFolder (LPCSTR pszFolder)
BOOL MoveFile (LPCSTR pszNewFileName)
void set_Download (struct fsDownload *dld)
void RemoveHiddenAttribute ()
void MeasureMirrorsSpeed ()
fsInternetResult SetToRestartState ()
fsInternetResult FindMirrors ()
void Set_MirrRecalcSpeedTime (UINT u)
fsInternetResult StartDownloading ()
void StopDownloading ()
void CreateOneMoreSection ()
BOOL IsCantStart ()
void StopQuering ()
fsInternetResult QuerySize (BOOL bCheckPoss=TRUE)
void QuerySize2 ()
BOOL IsQueringSize ()
void StopSection ()
fsInternetResult RestartDownloading ()
BOOL IsSectionCanBeAdded ()
void CloseFile ()
BOOL IsFileInit ()
BOOL InitFile (BOOL bCreateOnDisk=FALSE, LPCSTR pszSetExt=NULL)
fsInternetResult GetLastError ()
BOOL DeleteFile ()
void ApplyProperties ()
BOOL IsRunning ()
BOOL IsDone ()
BOOL SaveState (LPVOID lpBuffer, LPDWORD pdwSize)
BOOL LoadState (LPVOID lpBuffer, LPDWORD pdwSize, WORD wVer)
void CloneSettings (fsDownloadMgr *src)
void SetEventDescFunc (fntEventDescFunc pfn, LPVOID lpParam)
void SetEventFunc (fntDownloadMgrEventFunc pfnEvents, LPVOID lpParam)
void SetOutputFileName (LPCSTR pszName)
fsInternetResult CreateByUrl (LPCSTR pszUrl, BOOL bAcceptHTMLPathes=FALSE)
fsInternetDownloaderGetDownloader ()
fsDownload_PropertiesGetDP ()
fsDownload_NetworkPropertiesGetDNP ()
 fsDownloadMgr (struct fsDownload *dld=NULL)
virtual ~fsDownloadMgr ()

Static Public Member Functions

static void set_GlobalOffline (BOOL bOffline)
static BOOL is_GlobalOffline ()

Protected Member Functions

void ProcessFilePathMacroses (CString &str)
void InitFile_ProcessMacroses ()
BOOL CheckIfMalicious ()
void SetFileTime (HANDLE hFile)
void AppendCommentToFileName (BOOL bMoveFile=TRUE)
void CheckDstFileExists ()
BOOL OnNeedFile_FinalInit ()
void CheckMirrSpeedRecalcRequired ()
void AddSection (BOOL bCheckAdm=TRUE)
void OnDone ()
void DescribeAPIError (DWORD *pdwLastError=NULL)
DWORD ProcessSCR (fsSizeChangeReaction scr, BOOL bFirstCall=TRUE)
DWORD OnSCR ()
void ApplyAdditionalExt ()
BOOL ReserveDiskSpace ()
BOOL BuildFileName (LPCSTR pszSetExt=NULL)
void Event (LPCSTR pszEvent, fsDownloadMgr_EventDescType enType=EDT_INQUIRY)
DWORD Event (fsDownloaderEvent ev, UINT uInfo)
BOOL OpenFile (BOOL bFailIfDeleted=TRUE, BOOL bDisableEvents=FALSE)
void RenameFile (BOOL bFormat1=TRUE)
BOOL OnNeedFile ()
void OnSectionStopped ()
BOOL SleepInterval ()
void StopDownload ()
fsInternetResult StartDownload ()
fsInternetResult CreateInternetSession ()

Static Protected Member Functions

static DWORD WINAPI _threadReserveDiskSpace (LPVOID lp)
static DWORD WINAPI _threadCalcMirrSpeed (LPVOID lp)
static DWORD WINAPI _threadQSize (LPVOID lp)
static DWORD _DownloaderEvents (fsDownloaderEvent enEvent, UINT uInfo, LPVOID lp)
static DWORD WINAPI _threadDownloadMgr (LPVOID lp)

Protected Attributes

BOOL m_bDontCreateNewSections
DWORD m_dwDownloadFileFlags
bool m_bRSsupportDone
class vmsMaliciousDownloadCheckerm_mdc
BOOL m_bRename_CheckIfRenamed
BOOL m_bNeedStartAgain
fsTicksMgr m_tikLastMirrMeasureTime
UINT m_uMirrRecalcSpeedTime
BOOL m_bCantStart
BOOL m_bFatalError
LONG m_iThread
CString m_strExtError
BOOL m_uNeedStartFrom
fntEventDescFunc m_pfnEventDesc
LPVOID m_lpEventDescParam
fsTicksMgr m_ticksStart
HANDLE m_hOutFile
fsInternetResult m_lastError
fsDownloadState m_state
BOOL m_bThreadRunning
fsDownload_Properties m_dp
fsInternetDownloader m_dldr
fntDownloadMgrEventFunc m_pfnEvents
LPVOID m_lpParamEvents

Static Protected Attributes

static vmsCriticalSection m_csRenameFile

Private Member Functions

BOOL ApplyAER (fsAlreadyExistReaction enAER)

Private Attributes

fsDownloadm_dld


Detailed Description

Definition at line 59 of file fsDownloadMgr.h.


Constructor & Destructor Documentation

fsDownloadMgr::fsDownloadMgr ( struct fsDownload dld = NULL  ) 

fsDownloadMgr::~fsDownloadMgr (  )  [virtual]


Member Function Documentation

BOOL fsDownloadMgr::HasActivity (  ) 

Definition at line 2483 of file fsDownloadMgr.cpp.

References m_iThread.

Referenced by vmsSimpleFileDownloader::IsRunning().

fsDownloadState fsDownloadMgr::get_State (  ) 

Definition at line 2478 of file fsDownloadMgr.cpp.

References m_state.

Referenced by vmsDownloadMgrEx::IsReservingDiskSpace().

int fsDownloadMgr::get_ReservingDiskSpaceProgress (  ) 

void fsDownloadMgr::DoRapidshareSupport (  ) 

void fsDownloadMgr::Reset (  ) 

fsString fsDownloadMgr::get_URL (  ) 

BOOL fsDownloadMgr::MoveToFolder ( LPCSTR  pszFolder  ) 

BOOL fsDownloadMgr::MoveFile ( LPCSTR  pszNewFileName  ) 

void fsDownloadMgr::set_GlobalOffline ( BOOL  bOffline  )  [static]

BOOL fsDownloadMgr::is_GlobalOffline (  )  [static]

void fsDownloadMgr::set_Download ( struct fsDownload dld  ) 

Definition at line 2181 of file fsDownloadMgr.cpp.

References m_dld.

void fsDownloadMgr::RemoveHiddenAttribute (  ) 

void fsDownloadMgr::MeasureMirrorsSpeed (  ) 

fsInternetResult fsDownloadMgr::SetToRestartState (  ) 

fsInternetResult fsDownloadMgr::FindMirrors (  ) 

void fsDownloadMgr::Set_MirrRecalcSpeedTime ( UINT  u  ) 

Definition at line 1980 of file fsDownloadMgr.cpp.

References m_uMirrRecalcSpeedTime.

fsInternetResult fsDownloadMgr::StartDownloading (  ) 

void fsDownloadMgr::StopDownloading (  ) 

void fsDownloadMgr::CreateOneMoreSection (  ) 

BOOL fsDownloadMgr::IsCantStart (  ) 

Definition at line 1910 of file fsDownloadMgr.cpp.

References m_bCantStart.

Referenced by vmsDownloadMgrEx::IsCantStart().

void fsDownloadMgr::StopQuering (  ) 

fsInternetResult fsDownloadMgr::QuerySize ( BOOL  bCheckPoss = TRUE  ) 

void fsDownloadMgr::QuerySize2 (  ) 

BOOL fsDownloadMgr::IsQueringSize (  ) 

Definition at line 1865 of file fsDownloadMgr.cpp.

References DS_QUERINGSIZE, and m_state.

Referenced by QuerySize(), QuerySize2(), StartDownloading(), and StopQuering().

void fsDownloadMgr::StopSection (  ) 

fsInternetResult fsDownloadMgr::RestartDownloading (  ) 

BOOL fsDownloadMgr::IsSectionCanBeAdded (  ) 

void fsDownloadMgr::CloseFile (  ) 

BOOL fsDownloadMgr::IsFileInit (  ) 

BOOL fsDownloadMgr::InitFile ( BOOL  bCreateOnDisk = FALSE,
LPCSTR  pszSetExt = NULL 
)

fsInternetResult fsDownloadMgr::GetLastError (  ) 

BOOL fsDownloadMgr::DeleteFile (  ) 

void fsDownloadMgr::ApplyProperties (  ) 

BOOL fsDownloadMgr::IsRunning (  ) 

BOOL fsDownloadMgr::IsDone (  ) 

BOOL fsDownloadMgr::SaveState ( LPVOID  lpBuffer,
LPDWORD  pdwSize 
)

BOOL fsDownloadMgr::LoadState ( LPVOID  lpBuffer,
LPDWORD  pdwSize,
WORD  wVer 
)

void fsDownloadMgr::CloneSettings ( fsDownloadMgr src  ) 

void fsDownloadMgr::SetEventDescFunc ( fntEventDescFunc  pfn,
LPVOID  lpParam 
)

void fsDownloadMgr::SetEventFunc ( fntDownloadMgrEventFunc  pfnEvents,
LPVOID  lpParam 
)

void fsDownloadMgr::SetOutputFileName ( LPCSTR  pszName  ) 

Definition at line 699 of file fsDownloadMgr.cpp.

References fsnew, m_dp, fsDownload_Properties::pszFileName, and SAFE_DELETE_ARRAY.

fsInternetResult fsDownloadMgr::CreateByUrl ( LPCSTR  pszUrl,
BOOL  bAcceptHTMLPathes = FALSE 
)

fsInternetDownloader * fsDownloadMgr::GetDownloader (  ) 

fsDownload_Properties * fsDownloadMgr::GetDP (  ) 

fsDownload_NetworkProperties * fsDownloadMgr::GetDNP (  ) 

DWORD WINAPI fsDownloadMgr::_threadReserveDiskSpace ( LPVOID  lp  )  [static, protected]

void fsDownloadMgr::ProcessFilePathMacroses ( CString &  str  )  [protected]

void fsDownloadMgr::InitFile_ProcessMacroses (  )  [protected]

Definition at line 2372 of file fsDownloadMgr.cpp.

References m_dp, ProcessFilePathMacroses(), and fsDownload_Properties::pszFileName.

Referenced by InitFile().

BOOL fsDownloadMgr::CheckIfMalicious (  )  [protected]

void fsDownloadMgr::SetFileTime ( HANDLE  hFile  )  [protected]

void fsDownloadMgr::AppendCommentToFileName ( BOOL  bMoveFile = TRUE  )  [protected]

void fsDownloadMgr::CheckDstFileExists (  )  [protected]

BOOL fsDownloadMgr::OnNeedFile_FinalInit (  )  [protected]

DWORD WINAPI fsDownloadMgr::_threadCalcMirrSpeed ( LPVOID  lp  )  [static, protected]

Definition at line 2036 of file fsDownloadMgr.cpp.

References m_iThread, and MeasureMirrorsSpeed().

Referenced by CheckMirrSpeedRecalcRequired().

void fsDownloadMgr::CheckMirrSpeedRecalcRequired (  )  [protected]

void fsDownloadMgr::AddSection ( BOOL  bCheckAdm = TRUE  )  [protected]

DWORD WINAPI fsDownloadMgr::_threadQSize ( LPVOID  lp  )  [static, protected]

void fsDownloadMgr::OnDone (  )  [protected]

void fsDownloadMgr::DescribeAPIError ( DWORD *  pdwLastError = NULL  )  [protected]

DWORD fsDownloadMgr::ProcessSCR ( fsSizeChangeReaction  scr,
BOOL  bFirstCall = TRUE 
) [protected]

DWORD fsDownloadMgr::OnSCR (  )  [protected]

Definition at line 1574 of file fsDownloadMgr.cpp.

References fsDownload_Properties::enSCR, m_dp, ProcessSCR(), and TRUE.

Referenced by _DownloaderEvents().

void fsDownloadMgr::ApplyAdditionalExt (  )  [protected]

BOOL fsDownloadMgr::ReserveDiskSpace (  )  [protected]

BOOL fsDownloadMgr::BuildFileName ( LPCSTR  pszSetExt = NULL  )  [protected]

void fsDownloadMgr::Event ( LPCSTR  pszEvent,
fsDownloadMgr_EventDescType  enType = EDT_INQUIRY 
) [protected]

DWORD fsDownloadMgr::Event ( fsDownloaderEvent  ev,
UINT  uInfo 
) [protected]

Definition at line 1442 of file fsDownloadMgr.cpp.

References m_lpParamEvents, m_pfnEvents, and TRUE.

BOOL fsDownloadMgr::OpenFile ( BOOL  bFailIfDeleted = TRUE,
BOOL  bDisableEvents = FALSE 
) [protected]

void fsDownloadMgr::RenameFile ( BOOL  bFormat1 = TRUE  )  [protected]

BOOL fsDownloadMgr::OnNeedFile (  )  [protected]

void fsDownloadMgr::OnSectionStopped (  )  [protected]

BOOL fsDownloadMgr::SleepInterval (  )  [protected]

Definition at line 1183 of file fsDownloadMgr.cpp.

References DS_NEEDSTOP, FALSE, m_dp, m_state, TRUE, and fsDownload_Properties::uRetriesTime.

Referenced by _threadDownloadMgr().

void fsDownloadMgr::StopDownload (  )  [protected]

fsInternetResult fsDownloadMgr::StartDownload (  )  [protected]

DWORD fsDownloadMgr::_DownloaderEvents ( fsDownloaderEvent  enEvent,
UINT  uInfo,
LPVOID  lp 
) [static, protected]

Definition at line 330 of file fsDownloadMgr.cpp.

References AddSection(), DE_ARCHIVEDETECTED, DE_BADFILESIZE, DE_CONFIRMARCHIVEDETECTION, DE_CONNECTED, DE_CONNECTING, DE_CONNECTINGMIRRSERVER, DE_DIALOGWITHSERVER, DE_ERRFROMSERVER, DE_ERROROCCURED, DE_EXTERROR, DE_FAILCONNECT, DE_FILESIZETOOBIG, DE_GETTINGMIRRSEARCHRESULTS, DE_MAYADDSECTION, DE_MEASURINGMIRRSPEED, DE_MIRRDONE, DE_MIRRFAILED, DE_MIRRFOUND, DE_NEEDFILE, DE_NEEDFILE_FINALINITIALIZATION, DE_NOMIRRFOUND, DE_PAUSE, DE_QUERYNEWSECTION, DE_REDIRECTING, DE_REDIRECTINGOKCONTINUEOPENING, DE_RESTARTINGBECAUSENORANGES, DE_SCR, DE_SECTDOWNLOADING, DE_SECTIONDONE, DE_SECTIONSTARTED, DE_SECTIONSTOPPED, DE_SPEEDISTOOLOW, DE_STARTINGSEARCHINGFORMIRRORS, DE_TRYINGANOTHERMIRROR, DE_WRITEERROR, DE_ZIPPREVIEWFAILED, DE_ZIPPREVIEWSTARTED, fsDlgWithServerInfo::dir, DMEE_FATALERROR, DS_DONE, EDT_DONE, EDT_INQUIRY2, EDT_RESPONSE_E, EDT_RESPONSE_S, EDT_RESPONSE_S2, EDT_WARNING, Event(), FALSE, fsErrorToStr(), fsIRToStr(), fsInternetDownloader::GetDownloadingSectionCount(), fsInternetDownloader::GetFoundMirrorCount(), fsInternetDownloader::GetSectionLastError(), IFDD_TOSERVER, simple_client::info, IR_EXTERROR, IR_FILENOTFOUND, fsInternetDownloader::IsAllSectionsOk(), fsInternetDownloader::IsDone(), fsInternetDownloader::IsRunning(), L_CALCULATINGMIRRORSSPEED, L_CONNECTING, L_CONNECTINGSEARCHSERVER, L_CONNSUCC, L_DLDCOMPLETED, L_DONE, L_DOWNLOADING, L_FAILED, L_FILESIZEEXCEEDS2GB, L_FILESIZESARENOTEQUAL, L_GETTINGRESULTS, L_MIRRORSEARCHINGDONE, L_NMIRRORSFOUND, L_NOMIRRORSFOUND, L_NORESUMERESTARTING, L_PAUSESECS, L_REDIRECTING, L_REDIRSUCC, L_SEARCHINGFORMIRRORS, L_SECTION, L_SHESTOPPED, L_SPEEDISTOOLOW, L_STARTED, L_SUCCESS, L_TRYINGANOTHERMIRROR, L_WRITEERR, LS, m_bCantStart, m_bFatalError, m_dldr, m_dp, m_pfnEvents, m_state, m_strExtError, m_ticksStart, m_tikLastMirrMeasureTime, fsTicksMgr::Now(), OnDone(), OnNeedFile(), OnNeedFile_FinalInit(), OnSCR(), OnSectionStopped(), fsDlgWithServerInfo::pszMsg, TRUE, and fsDownload_Properties::uRetriesTime.

Referenced by fsDownloadMgr().

DWORD WINAPI fsDownloadMgr::_threadDownloadMgr ( LPVOID  lp  )  [static, protected]

fsInternetResult fsDownloadMgr::CreateInternetSession (  )  [protected]

BOOL fsDownloadMgr::ApplyAER ( fsAlreadyExistReaction  enAER  )  [private]


Member Data Documentation

Definition at line 151 of file fsDownloadMgr.h.

Referenced by DoRapidshareSupport(), and fsDownloadMgr().

Definition at line 157 of file fsDownloadMgr.h.

Referenced by CheckIfMalicious(), fsDownloadMgr(), StopDownload(), and StopDownloading().

Definition at line 162 of file fsDownloadMgr.h.

Referenced by RenameFile().

Definition at line 166 of file fsDownloadMgr.h.

Referenced by fsDownloadMgr(), RenameFile(), and SetToRestartState().

Definition at line 168 of file fsDownloadMgr.h.

Referenced by _threadDownloadMgr(), fsDownloadMgr(), and OnSectionStopped().

BOOL fsDownloadMgr::m_bCantStart [protected]

Definition at line 184 of file fsDownloadMgr.h.

Referenced by _DownloaderEvents(), _threadDownloadMgr(), fsDownloadMgr(), and IsCantStart().

BOOL fsDownloadMgr::m_bFatalError [protected]

CString fsDownloadMgr::m_strExtError [protected]

Definition at line 188 of file fsDownloadMgr.h.

Referenced by _DownloaderEvents().

Definition at line 213 of file fsDownloadMgr.h.

Referenced by ApplyAER(), fsDownloadMgr(), and StartDownload().

Definition at line 218 of file fsDownloadMgr.h.

Referenced by Event(), fsDownloadMgr(), and SetEventDescFunc().

Definition at line 219 of file fsDownloadMgr.h.

Referenced by Event(), and SetEventDescFunc().

Definition at line 220 of file fsDownloadMgr.h.

Referenced by _DownloaderEvents(), _threadDownloadMgr(), and StartDownload().

HANDLE fsDownloadMgr::m_hOutFile [protected]

Definition at line 224 of file fsDownloadMgr.h.

Referenced by _threadDownloadMgr(), AddSection(), and GetLastError().

Definition at line 230 of file fsDownloadMgr.h.

Referenced by _threadDownloadMgr(), fsDownloadMgr(), IsRunning(), and StartDownloading().

Definition at line 237 of file fsDownloadMgr.h.

Referenced by _DownloaderEvents(), Event(), fsDownloadMgr(), and SetEventFunc().

Definition at line 238 of file fsDownloadMgr.h.

Referenced by Event(), and SetEventFunc().


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

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