objc2_speech/generated/
SFSpeechLanguageModel.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct SFSpeechLanguageModelConfiguration;
15);
16
17unsafe impl Send for SFSpeechLanguageModelConfiguration {}
18
19unsafe impl Sync for SFSpeechLanguageModelConfiguration {}
20
21extern_conformance!(
22 unsafe impl NSCopying for SFSpeechLanguageModelConfiguration {}
23);
24
25unsafe impl CopyingHelper for SFSpeechLanguageModelConfiguration {
26 type Result = Self;
27}
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for SFSpeechLanguageModelConfiguration {}
31);
32
33impl SFSpeechLanguageModelConfiguration {
34 extern_methods!(
35 #[unsafe(method(languageModel))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn languageModel(&self) -> Retained<NSURL>;
38
39 #[unsafe(method(vocabulary))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn vocabulary(&self) -> Option<Retained<NSURL>>;
42
43 #[unsafe(method(initWithLanguageModel:))]
44 #[unsafe(method_family = init)]
45 pub unsafe fn initWithLanguageModel(
46 this: Allocated<Self>,
47 language_model: &NSURL,
48 ) -> Retained<Self>;
49
50 #[unsafe(method(initWithLanguageModel:vocabulary:))]
51 #[unsafe(method_family = init)]
52 pub unsafe fn initWithLanguageModel_vocabulary(
53 this: Allocated<Self>,
54 language_model: &NSURL,
55 vocabulary: Option<&NSURL>,
56 ) -> Retained<Self>;
57 );
58}
59
60impl SFSpeechLanguageModelConfiguration {
62 extern_methods!(
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67 #[unsafe(method(new))]
68 #[unsafe(method_family = new)]
69 pub unsafe fn new() -> Retained<Self>;
70 );
71}
72
73extern_class!(
74 #[unsafe(super(NSObject))]
76 #[derive(Debug, PartialEq, Eq, Hash)]
77 pub struct SFSpeechLanguageModel;
78);
79
80extern_conformance!(
81 unsafe impl NSObjectProtocol for SFSpeechLanguageModel {}
82);
83
84impl SFSpeechLanguageModel {
85 extern_methods!(
86 #[cfg(feature = "block2")]
87 #[unsafe(method(prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn prepareCustomLanguageModelForUrl_clientIdentifier_configuration_completion(
90 asset: &NSURL,
91 client_identifier: &NSString,
92 configuration: &SFSpeechLanguageModelConfiguration,
93 completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
94 );
95
96 #[cfg(feature = "block2")]
97 #[unsafe(method(prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn prepareCustomLanguageModelForUrl_clientIdentifier_configuration_ignoresCache_completion(
100 asset: &NSURL,
101 client_identifier: &NSString,
102 configuration: &SFSpeechLanguageModelConfiguration,
103 ignores_cache: bool,
104 completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
105 );
106 );
107}
108
109impl SFSpeechLanguageModel {
111 extern_methods!(
112 #[unsafe(method(init))]
113 #[unsafe(method_family = init)]
114 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
115
116 #[unsafe(method(new))]
117 #[unsafe(method_family = new)]
118 pub unsafe fn new() -> Retained<Self>;
119 );
120}