Downloadable

public protocol Downloadable : AnyObject

Protocol for observing, binding and (re)creating objects which can be downloaded

  • Fabric initializer

    Declaration

    Swift

    init?(_ downloadableUniqueId: String)

    Parameters

    downloadableUniqueId

    unique ID for identifying specific object in this type of objects

  • Unique ID for identifying specific object in this type of objects

    Declaration

    Swift

    var downloadUniqueId: String { get }
  • Remote file/source URL

    Declaration

    Swift

    var downloadRemoteUrl: URL { get }
  • Local/target URL

    Declaration

    Swift

    var downloadLocalUrl: URL { get }
  • observe(by:) Extension method

    Adding listener who observes this Downloadable downloading progress

    Declaration

    Swift

    func observe(by observer: DownloadStatusListner)

    Parameters

    observer

    observer which listenes

  • resumeDownload() Extension method

    Starts/Resumes download. Should not be called before downloading service is ready - can appear multiple identical downloads.

    Declaration

    Swift

    public func resumeDownload() -> Self

    Return Value

    returns object which is binded to dowload service and can be observed etc.

  • cancelDownload() Extension method

    Cancelles downloading

    Declaration

    Swift

    public func cancelDownload()
  • isDownloading Extension method

    Gets downloading status

    Declaration

    Swift

    public var isDownloading: Bool { get }
  • isDownloadLocalFileExist Extension method

    Checks if file already downloaded

    Declaration

    Swift

    public var isDownloadLocalFileExist: Bool { get }