Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEC-11631 Replace 'class' keyword to define a class-constrained protocol to 'AnyObject' #83

Merged
merged 1 commit into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/API.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation
import XCGLogger

/// Main entry point of the library, used to control item download and get their playback URL.
public protocol DTGContentManager: class {
public protocol DTGContentManager: AnyObject {

/// The storage path for directories and files.
var storagePath: URL { get }
Expand Down Expand Up @@ -123,7 +123,7 @@ extension DTGContentManager {
}

/// Delegate that will receive download events.
public protocol ContentManagerDelegate: class {
public protocol ContentManagerDelegate: AnyObject {
/// Some data was downloaded for the item.
func item(id: String, didDownloadData totalBytesDownloaded: Int64, totalBytesEstimated: Int64?, completedFraction: Float)

Expand Down Expand Up @@ -263,6 +263,6 @@ public enum LogLevel {
}

public typealias DTGRequestParams = (url: URL, headers: [String:String])
public protocol DTGRequestParamsAdapter: class {
public protocol DTGRequestParamsAdapter: AnyObject {
func adapt(_ params: DTGRequestParams) -> DTGRequestParams
}
4 changes: 2 additions & 2 deletions Sources/Downloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ enum DownloaderState: String {
case cancelled
}

protocol Downloader: class {
protocol Downloader: AnyObject {
/// The session identifier, used to restore background sessions and to identify them.
var sessionIdentifier: String { get }

Expand Down Expand Up @@ -90,7 +90,7 @@ protocol Downloader: class {
func refreshSession()
}

protocol DownloaderDelegate: class {
protocol DownloaderDelegate: AnyObject {
func downloader(_ downloader: Downloader, didProgress bytesWritten: Int64)
func downloader(_ downloader: Downloader, didPauseDownloadTasks tasks: [DownloadItemTask])
func downloaderDidCancelDownloadTasks(_ downloader: Downloader)
Expand Down