@@ -23,7 +23,7 @@ private let defaultTimeout: Duration = .seconds(5)
23
23
final class SendTunnelProviderMessageOperation < Output> : ResultOperation < Output > {
24
24
typealias DecoderHandler = ( Data ? ) throws -> Output
25
25
26
- private let backgroundTaskProvider : BackgroundTaskProvider
26
+ private let backgroundTaskProvider : BackgroundTaskProviding
27
27
private let tunnel : any TunnelProtocol
28
28
private let message : TunnelProviderMessage
29
29
private let timeout : Duration
@@ -38,7 +38,7 @@ final class SendTunnelProviderMessageOperation<Output>: ResultOperation<Output>
38
38
39
39
init (
40
40
dispatchQueue: DispatchQueue ,
41
- backgroundTaskProvider: BackgroundTaskProvider ,
41
+ backgroundTaskProvider: BackgroundTaskProviding ,
42
42
tunnel: any TunnelProtocol ,
43
43
message: TunnelProviderMessage ,
44
44
timeout: Duration ? = nil ,
@@ -215,54 +215,6 @@ final class SendTunnelProviderMessageOperation<Output>: ResultOperation<Output>
215
215
}
216
216
}
217
217
218
- extension SendTunnelProviderMessageOperation where Output: Codable {
219
- convenience init (
220
- dispatchQueue: DispatchQueue ,
221
- backgroundTaskProvider: BackgroundTaskProvider ,
222
- tunnel: any TunnelProtocol ,
223
- message: TunnelProviderMessage ,
224
- timeout: Duration ? = nil ,
225
- completionHandler: @escaping CompletionHandler
226
- ) {
227
- self . init (
228
- dispatchQueue: dispatchQueue,
229
- backgroundTaskProvider: backgroundTaskProvider,
230
- tunnel: tunnel,
231
- message: message,
232
- timeout: timeout,
233
- decoderHandler: { data in
234
- if let data {
235
- return try TunnelProviderReply ( messageData: data) . value
236
- } else {
237
- throw EmptyTunnelProviderResponseError ( )
238
- }
239
- } ,
240
- completionHandler: completionHandler
241
- )
242
- }
243
- }
244
-
245
- extension SendTunnelProviderMessageOperation where Output == Void {
246
- convenience init (
247
- dispatchQueue: DispatchQueue ,
248
- backgroundTaskProvider: BackgroundTaskProvider ,
249
- tunnel: any TunnelProtocol ,
250
- message: TunnelProviderMessage ,
251
- timeout: Duration ? = nil ,
252
- completionHandler: CompletionHandler ?
253
- ) {
254
- self . init (
255
- dispatchQueue: dispatchQueue,
256
- backgroundTaskProvider: backgroundTaskProvider,
257
- tunnel: tunnel,
258
- message: message,
259
- timeout: timeout,
260
- decoderHandler: { _ in ( ) } ,
261
- completionHandler: completionHandler
262
- )
263
- }
264
- }
265
-
266
218
enum SendTunnelProviderMessageError : LocalizedError , WrappingError {
267
219
/// Tunnel process is either down or about to go down.
268
220
case tunnelDown( NEVPNStatus )
0 commit comments