fsInternetResult fsInternetURLFileDownloader::Download(LPCTSTR pszUrl) { fsURL url; fsInternetResult ir; ir = url.Crack (pszUrl); if (ir != IR_SUCCESS) return ir; Event (UFDE_CONNECTING); Get_File ()->set_EnableAutoRedirect (TRUE); ir = Get_File ()->Open (url.GetInternetScheme (), url.GetHostName (), url.GetUserName (), url.GetPassword (), url.GetPort (), url.GetPath (), 0); if (ir != IR_SUCCESS) return ir; m_bAbort = FALSE; Event (UFDE_DOWNLOADING); Free_FileBuffer (); ir = fsDownloadFile (Get_File (), &m_pBuffer, &m_uFileSize, &m_bAbort); if (ir == IR_SUCCESS) Event (UFDE_DONE); return ir; }
void BF_GUI_FtpPanel_DownloadTask::Get_List(BF_NodeCollection *plo_Node) { ASSERT(plo_Node); BF_Node *poNode; for(int i=0;i<plo_Node->CountItems();i++){ poNode = plo_Node->NodeAt(i); Get_File(poNode); } }
void fsInternetURLFileDownloader::Abort() { m_bAbort = TRUE; Get_File ()->CloseHandle (); }
fsInternetResult fsInternetURLFileDownloader::Initialize(fsInternetSession *pSession) { return Get_File ()->Initialize (pSession); }