mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			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.
		
		
		
		
		
			
		
			
				
	
	
		
			29 lines
		
	
	
		
			698 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			29 lines
		
	
	
		
			698 B
		
	
	
	
		
			Swift
		
	
| import SessionUtilitiesKit
 | |
| 
 | |
| // TODO: Implementation
 | |
| 
 | |
| public final class AttachmentDownloadJob : NSObject, Job,  NSCoding { // NSObject/NSCoding conformance is needed for YapDatabase compatibility
 | |
|     public var delegate: JobDelegate?
 | |
|     public var failureCount: UInt = 0
 | |
| 
 | |
|     // MARK: Settings
 | |
|     public static let maxFailureCount: UInt = 20
 | |
| 
 | |
|     // 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)
 | |
|     }
 | |
| }
 | |
| 
 |