C# Class NntpClient.Queue.DownloadQueue

Provides a queue for downloading files in an NZB.
显示文件 Open project: strider-/NntpClient

Public Methods

Method Description
Complete ( Job job, Article article ) : void

Marks a job as complete, requires the completed article.

DownloadQueue ( NzbDocument nzb, string cachePath, string completedPath ) : System

Initializes the queue with an NZB, a directory to store temp files, and a directory to store completed files.

Fail ( Job job ) : void

Marks a job as failed

Pop ( ) : Job

Returns the next job to be processed, or null if there are no jobs left.

Private Methods

Method Description
AssembleFile ( int FileId ) : void
FileDownloaded ( int FileId ) : bool

Method Details

Complete() public method

Marks a job as complete, requires the completed article.
public Complete ( Job job, Article article ) : void
job Job Job to complete
article Article Article of the completed job
return void

DownloadQueue() public method

Initializes the queue with an NZB, a directory to store temp files, and a directory to store completed files.
public DownloadQueue ( NzbDocument nzb, string cachePath, string completedPath ) : System
nzb NntpClient.Nzb.NzbDocument NzbDocument to process
cachePath string Location to store file segments until they can be assembled
completedPath string Location to store completed files.
return System

Fail() public method

Marks a job as failed
public Fail ( Job job ) : void
job Job
return void

Pop() public method

Returns the next job to be processed, or null if there are no jobs left.
public Pop ( ) : Job
return Job