Exemple #1
0
void WebFetcher::Run()
{
	pContent = GetHttp(Url);
	UTF_8ToGB2312();

	return;	
}
Exemple #2
0
/**
* @date     25/02/2009
* 
*  Issue an http get request, and put the result in a file.
*
* @return   B_OK if success.
* @return   B_ERROR otherwise.
******************************************************************************/
int32 HttpFile::Download(void)
{
   int32 i_Ret;
  
   f_File = fopen(c_FilePath.String(), "w");
   if(f_File == NULL)
      return(B_ERROR);

   i_Ret = GetHttp();
   fclose(f_File);
   return(i_Ret);
} 
Exemple #3
0
int CProtocolInfo::GetFromSend(SESSION *session, TCHAR *pBuf, int nBufLenth)
{
	if(session->bProtocol == ACL_SERVICE_TYPE_HTTP)
		return GetHttp(session, pBuf, nBufLenth);
	else if(session->bProtocol == ACL_SERVICE_TYPE_FTP)
		return GetFtp(session, pBuf, nBufLenth);
	else if(session->bProtocol == ACL_SERVICE_TYPE_SMTP)
		return GetSmtp(session, pBuf, nBufLenth);
	else if(session->bProtocol == ACL_SERVICE_TYPE_POP3)
		return GetPop3BySend(session, pBuf, nBufLenth);

	return XERR_SUCCESS;
}