Example #1
0
bool MEmblemMgr::ProcessEmblem(unsigned int nCLID, const char* pszURL, u32 nChecksum)
{
	m_nTotalRequest++;

	if (CheckEmblem(nCLID, nChecksum)) {
		m_nCachedRequest++;
		return true;
	} else {
		PostDownload(nCLID, nChecksum, pszURL);
		return false;
	}
}
Example #2
0
int CParserDownloader::DoDownload()
{
	CDownloadState dlState;

	CURLcode res;
	BOOL bRetry;
	do 
	{
		m_progressMeter.Reset(clock(), m_dlParam.m_nFileSize, m_connInfo.m_nDlNow);

		//transfer
		res = curl_easy_perform(m_curl);

		//process when the transfer done, check if we should retry to download?
		bRetry = ProcessTransferDone(res, dlState);

	} while (bRetry);
	
	return PostDownload(dlState);
}