Last active
March 20, 2019 06:48
-
-
Save noppefoxwolf/4636bdd5d542863668c04c8b0fa1b85a to your computer and use it in GitHub Desktop.
Swift download manager I/F 構想
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum UnZipPolicy { | |
case none | |
case unzip(isRemoveSrc: Bool) | |
} | |
let manager = Manager() | |
manager.maxConcurrentTasksCount = 4 | |
manager.timeout = 150 | |
manager.automaticallyUnzip = .unzip(isRemoveSrc: true) | |
let id = manager.add(url) | |
manager.startAll() | |
manager.start(id, retryCount: 10) | |
manager.pauseAll() | |
manager.pause(id) | |
manager.cancelAll() | |
manager.cancel(id) | |
manager.status // [id : status] | |
manager.currentProgress | |
manager.totalCurrentProgress | |
manager.progress = { (id, progress) in | |
} | |
manager.totalProgress = { (progress) in | |
} | |
manager.completion = { (result) in | |
} | |
manager.totalCompletion = { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment