Files
wireguard-apple/Sources/WireGuardIntentsExtension/IntentHandler.swift
T
Alessio Nossa ab1e96fcdc Implemented GetPeers intent
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
2022-02-01 20:12:47 +01:00

22 lines
505 B
Swift

// SPDX-License-Identifier: MIT
// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
import Intents
class IntentHandler: INExtension {
override init() {
super.init()
Logger.configureGlobal(tagged: "INTENTS", withFilePath: FileManager.logFileURL?.path)
}
override func handler(for intent: INIntent) -> Any {
guard intent is GetPeersIntent else {
fatalError("Unhandled intent type: \(intent)")
}
return IntentHandling()
}
}