📄 httpsdownload.h
字号:
// HTTPSDownload.h: interface for the CHTTPSDownload class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_HTTPSDOWNLOAD_H__84A6839E_F348_4544_8D11_07BA328DA336__INCLUDED_)
#define AFX_HTTPSDOWNLOAD_H__84A6839E_F348_4544_8D11_07BA328DA336__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxinet.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
const UINT HS_LINK_OK = 0;
const UINT HS_LINK_ERROR = 1;
typedef struct HSDOWNLOADSTATE{
LONG range[20];
LONG threadsize[10];
LONG wcsize[10];
}HSDOWNLOADSTATE;
class CHTTPSDownload
{
public:
CHTTPSDownload();
virtual ~CHTTPSDownload();
void Begin(CString Allurl, CString Saveas, int nParts);
BOOL AnalyseURL(CString Allurl);
UINT SendRequest();
BOOL AnalyseReceive(CString ReadBuf, DWORD &dwContentLength, DWORD &dwStatusCode);
void CreateThread();
void Finish();
void ThreadFunc(int index);
int GetHeadLength(char* lpData);
void OnCancel();
public:
CString m_strServer;
CString m_strObject;
CString strHost;
CString m_strSavePath;
int m_nParts;
int m_Port;
DWORD m_dwFileSize;
DWORD ss[10];
DWORD m_sum[10];
BOOL m_SupportResume;
CString m_strTempSavePath;
BOOL m_bResume;
HSDOWNLOADSTATE m_state;
HANDLE m_hThread[10];
HANDLE m_hNotify;
BOOL m_bTerminate[10];
LONG m_index;
int linkcode;
};
#endif // !defined(AFX_HTTPSDOWNLOAD_H__84A6839E_F348_4544_8D11_07BA328DA336__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -