⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 downloadlist.h

📁 wisock应用队列思想实现单线程多任务http下载的类. 实现多文件同时下载,断点续传,流量统计等.
💻 H
字号:
/*

	下载任务类
	每个任务结点包含两个对象,socket对象和file对象.
	socket对象网络IO,file对象负责硬盘IO
*/

#pragma once

#include "HttpDownloadSocket.h"
#include "DownloadFile.h"
#include "InfoFile.h"

#include <windows.h>
#include <list>
#include "stateCode.h"
typedef struct _DOWNLOADLIST
{
	CDownloadSocket* downloadSocket;
	CDownloadFile* downloadFile;
	CInfoFile* infoFile;
	DOWNLOADSTATE state;
}DOWNLOADLIST;


using namespace std;

class CDownloadList
{
protected:
	list<DOWNLOADLIST*> m_taskList;
public:
	CDownloadList(void);
	virtual ~CDownloadList(void);
	bool AddTask( LPTSTR lpHost,UINT port,LPCTSTR lpszDownloadUrl,LPCTSTR lpszSavePath,LPTSTR lpszFileName);
	bool RemoveTask(list<DOWNLOADLIST*>::iterator taskIterator);
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -