|
@@ -28,8 +28,8 @@ import Alamofire
|
|
|
import Queuer
|
|
|
|
|
|
@objc public protocol NCNetworkingDelegate {
|
|
|
- @objc optional func downloadProgress(_ progress: Int64, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask)
|
|
|
- @objc optional func uploadProgress(_ progress: Int64, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask)
|
|
|
+ @objc optional func downloadProgress(_ progress: Double, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask)
|
|
|
+ @objc optional func uploadProgress(_ progress: Double, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask)
|
|
|
@objc optional func downloadComplete(fileName: String, serverUrl: String, etag: String?, date: NSDate?, dateLastModified: NSDate?, length: Int64, description: String?, task: URLSessionTask, errorCode: Int, errorDescription: String)
|
|
|
@objc optional func uploadComplete(fileName: String, serverUrl: String, ocId: String?, etag: String?, date: NSDate?, size: Int64, description: String?, task: URLSessionTask, errorCode: Int, errorDescription: String)
|
|
|
}
|
|
@@ -133,7 +133,7 @@ import Queuer
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- func downloadProgress(_ progress: Int64, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask) {
|
|
|
+ func downloadProgress(_ progress: Double, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask) {
|
|
|
delegate?.downloadProgress?(progress, totalBytes: totalBytes, totalBytesExpected: totalBytesExpected, fileName: fileName, serverUrl: serverUrl, session: session, task: task)
|
|
|
}
|
|
|
|
|
@@ -437,7 +437,7 @@ import Queuer
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- func uploadProgress(_ progress: Int64, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask) {
|
|
|
+ func uploadProgress(_ progress: Double, totalBytes: Int64, totalBytesExpected: Int64, fileName: String, serverUrl: String, session: URLSession, task: URLSessionTask) {
|
|
|
delegate?.uploadProgress?(progress, totalBytes: totalBytes, totalBytesExpected: totalBytesExpected, fileName: fileName, serverUrl: serverUrl, session: session, task: task)
|
|
|
|
|
|
var metadata: tableMetadata?
|