Gemini/GeminiIntents/IntentHandler.swift

44 lines
1.1 KiB
Swift
Raw Normal View History

2021-10-02 14:53:05 +00:00
//
// IntentHandler.swift
// GeminiIntents
//
// Created by Shadowfacts on 9/30/21.
//
import Intents
class IntentHandler: INExtension {
override func handler(for intent: INIntent) -> Any? {
switch intent {
// we also need to support extension-based handling because in-app handling isn't support <iOS 14
case is OpenURLIntent:
return OpenURLIntentHandler()
2021-10-02 15:47:01 +00:00
case is OpenHomepageIntent:
return OpenHomepageIntentHandler()
2021-10-02 14:53:05 +00:00
case is MakeRequestIntent:
return MakeRequestIntentHandler()
case is GetBodyIntent:
return GetBodyIntentHandler()
case is GetStatusIntent:
return GetStatusIntentHandler()
case is GetMetaIntent:
return GetMetaIntentHandler()
case is GemtextToHTMLIntent:
return GemtextToHTMLIntentHandler()
case is GemtextToMarkdownIntent:
return GemtextToMarkdownIntentHandler()
default:
return nil
}
}
}