You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import SessionUtilitiesKit
|
|
|
|
|
|
|
|
// TODO: Implementation
|
|
|
|
|
|
|
|
public final class AttachmentUploadJob : NSObject, Job, NSCoding { // NSObject/NSCoding conformance is needed for YapDatabase compatibility
|
|
|
|
public var delegate: JobDelegate?
|
|
|
|
public var id: String?
|
|
|
|
public var failureCount: UInt = 0
|
|
|
|
|
|
|
|
// MARK: Settings
|
|
|
|
public class var collection: String { return "AttachmentUploadJobCollection" }
|
|
|
|
public static let maxFailureCount: UInt = 20
|
|
|
|
|
|
|
|
// MARK: Initialization
|
|
|
|
public override init() { }
|
|
|
|
|
|
|
|
// MARK: Coding
|
|
|
|
public init?(coder: NSCoder) { }
|
|
|
|
|
|
|
|
public func encode(with coder: NSCoder) { }
|
|
|
|
|
|
|
|
// MARK: Running
|
|
|
|
public func execute() { }
|
|
|
|
|
|
|
|
private func handleSuccess() {
|
|
|
|
delegate?.handleJobSucceeded(self)
|
|
|
|
}
|
|
|
|
|
|
|
|
private func handleFailure(error: Error) {
|
|
|
|
delegate?.handleJobFailed(self, with: error)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|