fsWebPageDownloader Class Reference

#include <fsWebPageDownloader.h>

List of all members.

Public Member Functions

void GetDownloadingSiteName (LPSTR psz)
BOOL Create (LPCSTR pszPageURL, BOOL bAutoStart=TRUE, fsSchedule *task=NULL)
t_wptree GetRootPage ()
BOOL Load (HANDLE hFile, WORD wVer)
BOOL Load_OLD (HANDLE hFile, BOOL bOldVer)
BOOL Save (HANDLE hFile)
void DeleteAllDownloads (BOOL bByUser)
void DetachFromDownloads ()
void SetEventFunc (fntWPDEvents pfn, LPVOID lp)
void SetAutoStartDownloading (BOOL b)
void StopDownloading ()
void StartDownloading ()
vmsDownloadSmartPtr GetDownload (int iIndex)
int GetDownloadCount ()
fsWPDSettingsGetWDPS ()
BOOL IsDownloading ()
BOOL IsOnAutoStart ()
BOOL IsScheduled ()
BOOL IsDone ()
BOOL IsRunning ()
int GetDoneFileCount ()
int GetFileCount ()
float GetPercentDone ()
LPCSTR GetStartURL ()
fs::ListTree< fsDLWebPage > * FindWebPageTree (vmsDownloadSmartPtr dld)
 fsWebPageDownloader ()
virtual ~fsWebPageDownloader ()

Static Public Member Functions

static void ReadDefaultWPDS (fsWPDSettings *wpds)

Protected Member Functions

BOOL IsURLShouldBeIgnored (fsURL &url)
int ParseHTMLFrameUrls (fsHTMLParser &parser, t_wptree wptree, BOOL bFixUrlsOnly, LPCSTR pszBaseURL)
void CorrectUnpUrls (fsDLWebPage *wpfrom, fsDLWebPage *wpto)
DWORD OnCheckFileExtIsOK (vmsDownloadSmartPtr dld)
void Load_PerformRollback ()
void GetFileForReplace (fsDLWebPage *wpwhere, fsDLWebPage *wpwhat, LPSTR pszFile)
void GetPtrToFile (LPCSTR pszToFile, LPCSTR pszFromFile, LPSTR pszPtr)
void DeleteWebPage (fsDLWebPage *wp)
fsDLWebPageFindWebPage (UINT nID)
fsDLWebPageFindWebPage (vmsDownloadSmartPtr dld)
fsDLWebPageFindWebPage (LPCSTR pszFullUrl)
void OnDldRedirected (vmsDownloadSmartPtr dld)
BOOL IsUrlsEqual (fsURL &url1, LPCSTR pszUrl2)
BOOL Load (HANDLE hFile, t_wptree root, WORD wVer)
BOOL Save (HANDLE hFile, t_wptree root)
void Event (fsWPDEvent ev, int info=0)
int ParseHTMLLinkUrls (fsHTMLParser &parser, t_wptree wptree, BOOL bFixUrlsOnly, LPCSTR pszBaseURL)
int ParseHTMLUrls (fsHTMLParser &parser, t_wptree wptree, BOOL bFixUrlsOnly, LPCSTR pszBaseURL)
int ParseHTMLImages (fsHTMLParser &parser, t_wptree wptree, BOOL bFixUrlsOnly, LPCSTR pszBaseURL)
BOOL CrackUrl (LPCSTR pszFullUrl, LPSTR *ppszUrlWA, LPSTR *ppszFA=NULL)
void ParseHTMLFile (t_wptree wptree, BOOL bFixUrlsOnly)
UINT ParseHTML (LPCSTR pszHTML, t_wptree wptree, BOOL bFixUrlsOnly)
int FindConfIndex (vmsDownloadSmartPtr dld)
void OnWPDownloadDone (vmsDownloadSmartPtr dld)
void WebPage_FindDownload (fsDLWebPage *wp)
fsDLWebPageAddPage (fs::ListTree< fsDLWebPage > *root, LPCSTR pszPageURL, vmsWPDPageType enPageType, BOOL bSetCTReq=FALSE, BOOL bAutoStart=TRUE, fsSchedule *task=NULL)
fsDLWebPageAddWebPage (fsDLWebPage *wp, fs::ListTree< fsDLWebPage > *root, fsSchedule *task=NULL)
void ApplySettingsToDld (vmsDownloadSmartPtr dld)

Static Protected Member Functions

static DWORD _DldEvents (fsDownload *dld, enum fsDownloadsMgrEvent ev, LPVOID lp)

Protected Attributes

BOOL m_bWasShutdownMsg
BOOL m_bIsDeleting
BOOL m_bStopped
UINT m_nMaxID
CRITICAL_SECTION m_cs_Done_Redir_Events
fntWPDEvents m_pfnEvents
LPVOID m_lpEventsParam
fsWPDSettings m_wpds
fs::ListTree< fsDLWebPagem_pages
fsString m_strStartServer
std::vector< _Conformitym_vConfs

Friends

class fsWebPageDownloadsMgr

Classes

struct  _Conformity


Detailed Description

Definition at line 139 of file fsWebPageDownloader.h.


Constructor & Destructor Documentation

fsWebPageDownloader::fsWebPageDownloader (  ) 

fsWebPageDownloader::~fsWebPageDownloader (  )  [virtual]


Member Function Documentation

void fsWebPageDownloader::GetDownloadingSiteName ( LPSTR  psz  ) 

BOOL fsWebPageDownloader::Create ( LPCSTR  pszPageURL,
BOOL  bAutoStart = TRUE,
fsSchedule task = NULL 
)

t_wptree fsWebPageDownloader::GetRootPage (  ) 

BOOL fsWebPageDownloader::Load ( HANDLE  hFile,
WORD  wVer 
)

BOOL fsWebPageDownloader::Load_OLD ( HANDLE  hFile,
BOOL  bOldVer 
)

BOOL fsWebPageDownloader::Save ( HANDLE  hFile  ) 

void fsWebPageDownloader::DeleteAllDownloads ( BOOL  bByUser  ) 

void fsWebPageDownloader::DetachFromDownloads (  ) 

Definition at line 1210 of file fsWebPageDownloader.cpp.

References m_vConfs, and NULL.

Referenced by CSpiderTasks::OnSpiderDelete().

void fsWebPageDownloader::SetEventFunc ( fntWPDEvents  pfn,
LPVOID  lp 
)

Definition at line 1161 of file fsWebPageDownloader.cpp.

References m_lpEventsParam, and m_pfnEvents.

Referenced by fsWebPageDownloadsMgr::Add().

void fsWebPageDownloader::SetAutoStartDownloading ( BOOL  b  ) 

void fsWebPageDownloader::StopDownloading (  ) 

void fsWebPageDownloader::StartDownloading (  ) 

vmsDownloadSmartPtr fsWebPageDownloader::GetDownload ( int  iIndex  ) 

Definition at line 1093 of file fsWebPageDownloader.cpp.

References m_vConfs.

Referenced by CWPDS_GeneralPage::OnApply(), and CSpiderTasks::OnSpiderSchedule().

int fsWebPageDownloader::GetDownloadCount (  ) 

Definition at line 1088 of file fsWebPageDownloader.cpp.

References m_vConfs.

Referenced by CWPDS_GeneralPage::OnApply(), and CSpiderTasks::OnSpiderSchedule().

void fsWebPageDownloader::ReadDefaultWPDS ( fsWPDSettings wpds  )  [static]

fsWPDSettings * fsWebPageDownloader::GetWDPS (  ) 

BOOL fsWebPageDownloader::IsDownloading (  ) 

BOOL fsWebPageDownloader::IsOnAutoStart (  ) 

BOOL fsWebPageDownloader::IsScheduled (  ) 

BOOL fsWebPageDownloader::IsDone (  ) 

BOOL fsWebPageDownloader::IsRunning (  ) 

int fsWebPageDownloader::GetDoneFileCount (  ) 

int fsWebPageDownloader::GetFileCount (  ) 

Definition at line 876 of file fsWebPageDownloader.cpp.

References m_vConfs.

Referenced by IsDone(), and CSpiderTasks::UpdateWebPage().

float fsWebPageDownloader::GetPercentDone (  ) 

LPCSTR fsWebPageDownloader::GetStartURL (  ) 

fs::ListTree< fsDLWebPage > * fsWebPageDownloader::FindWebPageTree ( vmsDownloadSmartPtr  dld  ) 

Definition at line 355 of file fsWebPageDownloader.cpp.

References m_vConfs, and NULL.

Referenced by FindWebPage(), CSpiderTaskTree::OnWebPageWillBeDeleted(), and OnWPDownloadDone().

BOOL fsWebPageDownloader::IsURLShouldBeIgnored ( fsURL url  )  [protected]

int fsWebPageDownloader::ParseHTMLFrameUrls ( fsHTMLParser parser,
t_wptree  wptree,
BOOL  bFixUrlsOnly,
LPCSTR  pszBaseURL 
) [protected]

void fsWebPageDownloader::CorrectUnpUrls ( fsDLWebPage wpfrom,
fsDLWebPage wpto 
) [protected]

DWORD fsWebPageDownloader::OnCheckFileExtIsOK ( vmsDownloadSmartPtr  dld  )  [protected]

void fsWebPageDownloader::Load_PerformRollback (  )  [protected]

Definition at line 1834 of file fsWebPageDownloader.cpp.

References m_vConfs, and NULL.

Referenced by Load().

void fsWebPageDownloader::GetFileForReplace ( fsDLWebPage wpwhere,
fsDLWebPage wpwhat,
LPSTR  pszFile 
) [protected]

void fsWebPageDownloader::GetPtrToFile ( LPCSTR  pszToFile,
LPCSTR  pszFromFile,
LPSTR  pszPtr 
) [protected]

Definition at line 1759 of file fsWebPageDownloader.cpp.

References fsGetFileName(), fsGetPath(), and TRUE.

Referenced by GetFileForReplace().

void fsWebPageDownloader::DeleteWebPage ( fsDLWebPage wp  )  [protected]

Definition at line 1609 of file fsWebPageDownloader.cpp.

References Event(), m_vConfs, NULL, SAFE_DELETE, and WPDE_WEBPAGEWILLBEDELETED.

Referenced by OnDldRedirected().

fsDLWebPage * fsWebPageDownloader::FindWebPage ( UINT  nID  )  [protected]

fsDLWebPage * fsWebPageDownloader::FindWebPage ( vmsDownloadSmartPtr  dld  )  [protected]

Definition at line 349 of file fsWebPageDownloader.cpp.

References FindWebPageTree(), and NULL.

fsDLWebPage * fsWebPageDownloader::FindWebPage ( LPCSTR  pszFullUrl  )  [protected]

void fsWebPageDownloader::OnDldRedirected ( vmsDownloadSmartPtr  dld  )  [protected]

BOOL fsWebPageDownloader::IsUrlsEqual ( fsURL url1,
LPCSTR  pszUrl2 
) [protected]

BOOL fsWebPageDownloader::Load ( HANDLE  hFile,
t_wptree  root,
WORD  wVer 
) [protected]

BOOL fsWebPageDownloader::Save ( HANDLE  hFile,
t_wptree  root 
) [protected]

void fsWebPageDownloader::Event ( fsWPDEvent  ev,
int  info = 0 
) [protected]

Definition at line 1167 of file fsWebPageDownloader.cpp.

References m_lpEventsParam, and m_pfnEvents.

Referenced by _DldEvents(), AddWebPage(), and DeleteWebPage().

int fsWebPageDownloader::ParseHTMLLinkUrls ( fsHTMLParser parser,
t_wptree  wptree,
BOOL  bFixUrlsOnly,
LPCSTR  pszBaseURL 
) [protected]

int fsWebPageDownloader::ParseHTMLUrls ( fsHTMLParser parser,
t_wptree  wptree,
BOOL  bFixUrlsOnly,
LPCSTR  pszBaseURL 
) [protected]

int fsWebPageDownloader::ParseHTMLImages ( fsHTMLParser parser,
t_wptree  wptree,
BOOL  bFixUrlsOnly,
LPCSTR  pszBaseURL 
) [protected]

BOOL fsWebPageDownloader::CrackUrl ( LPCSTR  pszFullUrl,
LPSTR ppszUrlWA,
LPSTR ppszFA = NULL 
) [protected]

Definition at line 969 of file fsWebPageDownloader.cpp.

References FALSE, fsFileNameFromUrlPath(), fsIsAnchorInUrl(), fsnew, and TRUE.

Referenced by ParseHTMLFrameUrls(), and ParseHTMLUrls().

void fsWebPageDownloader::ParseHTMLFile ( t_wptree  wptree,
BOOL  bFixUrlsOnly 
) [protected]

UINT fsWebPageDownloader::ParseHTML ( LPCSTR  pszHTML,
t_wptree  wptree,
BOOL  bFixUrlsOnly 
) [protected]

int fsWebPageDownloader::FindConfIndex ( vmsDownloadSmartPtr  dld  )  [protected]

Definition at line 401 of file fsWebPageDownloader.cpp.

References m_vConfs.

void fsWebPageDownloader::OnWPDownloadDone ( vmsDownloadSmartPtr  dld  )  [protected]

void fsWebPageDownloader::WebPage_FindDownload ( fsDLWebPage wp  )  [protected]

fsDLWebPage * fsWebPageDownloader::AddPage ( fs::ListTree< fsDLWebPage > *  root,
LPCSTR  pszPageURL,
vmsWPDPageType  enPageType,
BOOL  bSetCTReq = FALSE,
BOOL  bAutoStart = TRUE,
fsSchedule task = NULL 
) [protected]

fsDLWebPage * fsWebPageDownloader::AddWebPage ( fsDLWebPage wp,
fs::ListTree< fsDLWebPage > *  root,
fsSchedule task = NULL 
) [protected]

DWORD fsWebPageDownloader::_DldEvents ( fsDownload dld,
enum fsDownloadsMgrEvent  ev,
LPVOID  lp 
) [static, protected]

void fsWebPageDownloader::ApplySettingsToDld ( vmsDownloadSmartPtr  dld  )  [protected]


Friends And Related Function Documentation

friend class fsWebPageDownloadsMgr [friend]

Definition at line 141 of file fsWebPageDownloader.h.


Member Data Documentation

Definition at line 204 of file fsWebPageDownloader.h.

Referenced by _DldEvents(), fsWebPageDownloader(), and StartDownloading().

Definition at line 227 of file fsWebPageDownloader.h.

Referenced by AddPage(), fsWebPageDownloader(), Load(), and Load_OLD().

CRITICAL_SECTION fsWebPageDownloader::m_cs_Done_Redir_Events [protected]

Definition at line 228 of file fsWebPageDownloader.h.

Referenced by _DldEvents(), fsWebPageDownloader(), and ~fsWebPageDownloader().

Definition at line 234 of file fsWebPageDownloader.h.

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

Definition at line 235 of file fsWebPageDownloader.h.

Referenced by Event(), and SetEventFunc().

fs::ListTree<fsDLWebPage> fsWebPageDownloader::m_pages [protected]

Definition at line 264 of file fsWebPageDownloader.h.

Referenced by AddWebPage(), GetRootPage(), GetStartURL(), Load(), Load_OLD(), and Save().

std::vector<_Conformity> fsWebPageDownloader::m_vConfs [protected]


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

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