Skip to content

Commit

Permalink
Use a more appropriate protocol name
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Jun 13, 2024
1 parent d76fa40 commit e8a3388
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ios/MullvadPostQuantum/PostQuantumKeyNegotiator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import TalpidTunnelConfigClientProxy
import WireGuardKitTypes

// swiftlint:disable function_parameter_count
public protocol PostQuantumKeyNegotiation {
public protocol PostQuantumKeyNegotiating {
func startNegotiation(
gatewayIP: IPv4Address,
devicePublicKey: PublicKey,
Expand All @@ -32,7 +32,7 @@ public protocol PostQuantumKeyNegotiation {
/**
Attempt to start the asynchronous process of key negotiation. Returns true if successfully started, false if failed.
*/
public class PostQuantumKeyNegotiator: PostQuantumKeyNegotiation {
public class PostQuantumKeyNegotiator: PostQuantumKeyNegotiating {
required public init() {}

var cancelToken: PostQuantumCancelToken?
Expand Down
4 changes: 2 additions & 2 deletions ios/MullvadPostQuantumTests/MullvadPostQuantum+Stubs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TunnelProviderStub: TunnelProvider {
}
}

class FailedNegotiatorStub: PostQuantumKeyNegotiation {
class FailedNegotiatorStub: PostQuantumKeyNegotiating {
var onCancelKeyNegotiation: (() -> Void)?

required init() {
Expand All @@ -68,7 +68,7 @@ class FailedNegotiatorStub: PostQuantumKeyNegotiation {
}
}

class SuccessfulNegotiatorStub: PostQuantumKeyNegotiation {
class SuccessfulNegotiatorStub: PostQuantumKeyNegotiating {
var onCancelKeyNegotiation: (() -> Void)?
required init() {
onCancelKeyNegotiation = nil
Expand Down
6 changes: 3 additions & 3 deletions ios/PacketTunnel/PostQuantumKeyExchangeActor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import WireGuardKitTypes

public class PostQuantumKeyExchangeActor {
struct Negotiation {
var negotiator: PostQuantumKeyNegotiation
var negotiator: PostQuantumKeyNegotiating
var inTunnelTCPConnection: NWTCPConnection
var tcpConnectionObserver: NSKeyValueObservation

Expand All @@ -30,15 +30,15 @@ public class PostQuantumKeyExchangeActor {
internal var negotiation: Negotiation?
private var timer: DispatchSourceTimer?
private var keyExchangeRetriesIterator: AnyIterator<Duration>
private let negotiationProvider: PostQuantumKeyNegotiation.Type
private let negotiationProvider: PostQuantumKeyNegotiating.Type

// Callback in the event of the negotiation failing on startup
var onFailure: () -> Void

public init(
packetTunnel: any TunnelProvider,
onFailure: @escaping (() -> Void),
negotiationProvider: PostQuantumKeyNegotiation.Type = PostQuantumKeyNegotiator.self,
negotiationProvider: PostQuantumKeyNegotiating.Type = PostQuantumKeyNegotiator.self,
keyExchangeRetriesIterator: AnyIterator<Duration> = REST.RetryStrategy.postQuantumKeyExchange
.makeDelayIterator()
) {
Expand Down

0 comments on commit e8a3388

Please sign in to comment.