PackageDownloadCallback
public protocol PackageDownloadCallback
This protocol is used when downloading an update using BarracksClient.downloadPackage(response:, callback:, destination:)
-
This method is called during the download, to inform of the progress of the download.
Declaration
Swift
func onProgress(_ response:UpdateCheckResponse, progress:UInt)Parameters
responseThe
UpdateCheckResponseused to trigger the download.progressThe download progress in percent.
-
This method is called when an error occurs during the download.
Declaration
Swift
func onError(_ response:UpdateCheckResponse, error: Error?)Parameters
responseThe
UpdateCheckResponseused to trigger the download.errorThe error raised during the download.
-
This method is used when an download is successfully completed.
Declaration
Swift
func onSuccess(_ response:UpdateCheckResponse, path:String)Parameters
responseThe
UpdateCheckResponseused to trigger the download.pathThe path of the downloaded file.
View on GitHub
Install in Dash
PackageDownloadCallback Protocol Reference