@@ -18,6 +18,8 @@ public protocol NextcloudKitDelegate: AnyObject, Sendable {
1818
1919 func networkReachabilityObserver( _ typeReachability: NKCommon . TypeReachability )
2020
21+ func request< Value> ( _ request: DataRequest , didParseResponse response: AFDataResponse < Value > )
22+
2123 func downloadProgress( _ progress: Float , totalBytes: Int64 , totalBytesExpected: Int64 , fileName: String , serverUrl: String , session: URLSession , task: URLSessionTask )
2224 func uploadProgress( _ progress: Float , totalBytes: Int64 , totalBytesExpected: Int64 , fileName: String , serverUrl: String , session: URLSession , task: URLSessionTask )
2325
@@ -27,6 +29,23 @@ public protocol NextcloudKitDelegate: AnyObject, Sendable {
2729 func uploadComplete( fileName: String , serverUrl: String , ocId: String ? , etag: String ? , date: Date ? , size: Int64 , task: URLSessionTask , error: NKError )
2830}
2931
32+ public extension NextcloudKitDelegate {
33+ func authenticationChallenge( _ session: URLSession , didReceive challenge: URLAuthenticationChallenge , completionHandler: @escaping ( URLSession . AuthChallengeDisposition , URLCredential ? ) -> Void ) { }
34+ func urlSessionDidFinishEvents( forBackgroundURLSession session: URLSession ) { }
35+
36+ func networkReachabilityObserver( _ typeReachability: NKCommon . TypeReachability ) { }
37+
38+ func request< Value> ( _ request: DataRequest , didParseResponse response: AFDataResponse < Value > ) { }
39+
40+ func downloadProgress( _ progress: Float , totalBytes: Int64 , totalBytesExpected: Int64 , fileName: String , serverUrl: String , session: URLSession , task: URLSessionTask ) { }
41+ func uploadProgress( _ progress: Float , totalBytes: Int64 , totalBytesExpected: Int64 , fileName: String , serverUrl: String , session: URLSession , task: URLSessionTask ) { }
42+
43+ func downloadingFinish( _ session: URLSession , downloadTask: URLSessionDownloadTask , didFinishDownloadingTo location: URL ) { }
44+
45+ func downloadComplete( fileName: String , serverUrl: String , etag: String ? , date: Date ? , dateLastModified: Date ? , length: Int64 , task: URLSessionTask , error: NKError ) { }
46+ func uploadComplete( fileName: String , serverUrl: String , ocId: String ? , etag: String ? , date: Date ? , size: Int64 , task: URLSessionTask , error: NKError ) { }
47+ }
48+
3049public struct NKCommon : Sendable {
3150 public var nksessions = ThreadSafeArray < NKSession > ( )
3251 public var delegate : NextcloudKitDelegate ?
0 commit comments