aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-08-02 13:46:06 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2021-09-22 06:58:14 +0200
commit73c708d9028e8dada52c69e45e02b9d2255adbec (patch)
treefd7a98c0ffe83efc742d89776063c0a3ba19e7b8 /Sources/WireGuardApp/Tunnel/TunnelsManager.swift
parentbuild: Include 'swiftlint' location in the PATH before invoking it (diff)
downloadwireguard-apple-73c708d9028e8dada52c69e45e02b9d2255adbec.tar.xz
wireguard-apple-73c708d9028e8dada52c69e45e02b9d2255adbec.zip
build: Fix swift warnings
Use 'AnyObject' instead of 'class' to restrict protocol inheritance Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'Sources/WireGuardApp/Tunnel/TunnelsManager.swift')
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelsManager.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
index 2865f7a..fe3955b 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
@@ -5,14 +5,14 @@ import Foundation
import NetworkExtension
import os.log
-protocol TunnelsManagerListDelegate: class {
+protocol TunnelsManagerListDelegate: AnyObject {
func tunnelAdded(at index: Int)
func tunnelModified(at index: Int)
func tunnelMoved(from oldIndex: Int, to newIndex: Int)
func tunnelRemoved(at index: Int, tunnel: TunnelContainer)
}
-protocol TunnelsManagerActivationDelegate: class {
+protocol TunnelsManagerActivationDelegate: AnyObject {
func tunnelActivationAttemptFailed(tunnel: TunnelContainer, error: TunnelsManagerActivationAttemptError) // startTunnel wasn't called or failed
func tunnelActivationAttemptSucceeded(tunnel: TunnelContainer) // startTunnel succeeded
func tunnelActivationFailed(tunnel: TunnelContainer, error: TunnelsManagerActivationError) // status didn't change to connected