Classes

The following classes are available globally.

  • DMSwift provides a simple and efficient way to download files. It can simultaneously download a large number of files, monitors the progress of downloading, concurrently post-process downloaded files, supports logging, has a flexible configuration and easy to use API.

    See more

    Declaration

    Swift

    public class DMSwift
  • Custom default Operation class that used to use OperationState enum.

    See more

    Declaration

    Swift

    open class DefaultOperation : Operation
  • The operation responsible for downloading the file.

    Initiates with URLSessionTaskType as downloadType. It has two options for downloading a file, via URLSessionDownloadTask or URLSessionDataTask. If downloadType is equal to downloadTask, then downloading will be implemented through URLSessionDownloadTask, otherwise through URLSessionDataTask. In terms of performance, both options work the same way. At the moment there is not much difference, however, when downloading via URLSessionDownloadTask, if the response does not contain the Content-Length header, then the file size in progress will be empty, while URLSessionDataTask always has the file size. If you need progress according to the file size and response header doesn’t contain Content-Length, then use URLSessionDataTask, otherwise, try to always use URLSessionDownloadTask. In the future, more features will probably be added for each type of download. For example, support for resuming download or the ability to download in the background.

    See more

    Declaration

    Swift

    class DownloadOperation : DefaultOperation
  • OperationQueue class, which is responsible for managing all download operations.

    See more

    Declaration

    Swift

    class DownloadQueue : OperationQueue
  • OperationQueue class, which is responsible for managing all post-processing operations.

    See more

    Declaration

    Swift

    class PostProcessQueue : OperationQueue