objc2_intents/generated/
INVoiceShortcut.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A shortcut that has been added to Siri
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/invoiceshortcut?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct INVoiceShortcut;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for INVoiceShortcut {}
20);
21
22extern_conformance!(
23    unsafe impl NSCopying for INVoiceShortcut {}
24);
25
26unsafe impl CopyingHelper for INVoiceShortcut {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for INVoiceShortcut {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for INVoiceShortcut {}
36);
37
38impl INVoiceShortcut {
39    extern_methods!(
40        /// The unique identifier for this voice shortcut
41        #[unsafe(method(identifier))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn identifier(&self) -> Retained<NSUUID>;
44
45        /// The phrase the user speaks to invoke this shortcut; set by the user when they add it to Siri.
46        #[unsafe(method(invocationPhrase))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn invocationPhrase(&self) -> Retained<NSString>;
49
50        #[cfg(feature = "INShortcut")]
51        /// The shortcut that will be performed when this voice shortcut is invoked via Siri.
52        #[unsafe(method(shortcut))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn shortcut(&self) -> Retained<INShortcut>;
55
56        /// An
57        /// `INVoiceShortcut`cannot be created directly. Instead, create an
58        /// `INShortcut,`and add it using
59        /// `INUIAddVoiceShortcutViewController.`
60        #[unsafe(method(init))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
63
64        /// An
65        /// `INVoiceShortcut`cannot be created directly. Instead, create an
66        /// `INShortcut,`and add it using
67        /// `INUIAddVoiceShortcutViewController.`
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71    );
72}