From 6b743cfa9d3bb18a1c59c5401e9444386d1680c9 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sun, 31 Mar 2024 11:01:01 +0200 Subject: [PATCH] Fix missing delegate --- Sources/WireGuardKit/WireGuardAdapter.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/WireGuardKit/WireGuardAdapter.swift b/Sources/WireGuardKit/WireGuardAdapter.swift index 8c41078..6ff6126 100644 --- a/Sources/WireGuardKit/WireGuardAdapter.swift +++ b/Sources/WireGuardKit/WireGuardAdapter.swift @@ -37,6 +37,12 @@ private enum State { case temporaryShutdown(_ settingsGenerator: PacketTunnelSettingsGenerator) } +public protocol WireGuardAdapterDelegate: AnyObject { + func adapterShouldReassert(_ adapter: WireGuardAdapter, reasserting: Bool) + + func adapterShouldSetNetworkSettings(_ adapter: WireGuardAdapter, settings: NEPacketTunnelNetworkSettings, completionHandler: ((Error?) -> Void)?) +} + public class WireGuardAdapter { public typealias LogHandler = (WireGuardLogLevel, String) -> Void