objc2_authentication_services/generated/ASAccountAuthenticationModificationViewController.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(target_os = "macos")]
7use objc2_app_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[cfg(target_os = "macos")]
13extern_conformance!(
14 unsafe impl NSCoding for ASAccountAuthenticationModificationViewController {}
15);
16
17#[cfg(target_os = "macos")]
18extern_conformance!(
19 unsafe impl NSEditor for ASAccountAuthenticationModificationViewController {}
20);
21
22#[cfg(target_os = "macos")]
23extern_conformance!(
24 unsafe impl NSObjectProtocol for ASAccountAuthenticationModificationViewController {}
25);
26
27#[cfg(target_os = "macos")]
28extern_conformance!(
29 unsafe impl NSSeguePerforming for ASAccountAuthenticationModificationViewController {}
30);
31
32#[cfg(target_os = "macos")]
33extern_conformance!(
34 unsafe impl NSUserInterfaceItemIdentification
35 for ASAccountAuthenticationModificationViewController
36 {
37 }
38);
39
40#[cfg(target_os = "macos")]
41impl ASAccountAuthenticationModificationViewController {
42 extern_methods!(
43 #[cfg(feature = "ASAccountAuthenticationModificationExtensionContext")]
44 #[unsafe(method(extensionContext))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn extensionContext(
47 &self,
48 ) -> Retained<ASAccountAuthenticationModificationExtensionContext>;
49
50 #[cfg(all(
51 feature = "ASCredentialServiceIdentifier",
52 feature = "ASPasswordCredential"
53 ))]
54 /// This method will be called when a user initiates a Sign in with Apple upgrade request.
55 ///
56 /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
57 ///
58 /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
59 ///
60 /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
61 /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
62 ///
63 /// This method will be called to begin a Sign in with Apple upgrade request and will not
64 /// present any extension UI. If extension UI needs to be shown, this initial request should be canceled
65 /// with the ASExtensionErrorCodeUserCanceled error code. The existingCredential parameter will have
66 /// an empty password for in-app upgrades. The extension should check if a user is already logged in by
67 /// checking a data container shared with its containing app.
68 #[unsafe(method(convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier:existingCredential:userInfo:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier_existingCredential_userInfo(
71 &self,
72 service_identifier: &ASCredentialServiceIdentifier,
73 existing_credential: &ASPasswordCredential,
74 user_info: Option<&NSDictionary>,
75 );
76
77 #[cfg(all(
78 feature = "ASCredentialServiceIdentifier",
79 feature = "ASPasswordCredential"
80 ))]
81 /// This method will be called when a Sign in with Apple upgrade request requires user interaction.
82 ///
83 /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
84 ///
85 /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
86 ///
87 /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
88 /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
89 ///
90 /// This method will be called when the initial request is canceled with the
91 /// ASExtensionErrorCodeUserCanceled error code. The implementation of this method should do any
92 /// work necessary to prepare to present the extension UI. Once it finishes, the system will present the
93 /// extension UI. The existingCredential parameter will have an empty password for in-app upgrades. The
94 /// extension should check if a user is already logged in by checking state in a data container shared
95 /// with its containing app.
96 #[unsafe(method(prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier:existingCredential:userInfo:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier_existingCredential_userInfo(
99 &self,
100 service_identifier: &ASCredentialServiceIdentifier,
101 existing_credential: &ASPasswordCredential,
102 user_info: Option<&NSDictionary>,
103 );
104
105 #[cfg(all(
106 feature = "ASCredentialServiceIdentifier",
107 feature = "ASPasswordCredential"
108 ))]
109 /// This method will be called when a user initiates a strong password upgrade request.
110 ///
111 /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
112 ///
113 /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
114 ///
115 /// Parameter `newPassword`: A strong password generated by the system to be used for the upgrade.
116 ///
117 /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
118 /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
119 ///
120 /// Password rules for generating the newPassword parameter can be specified
121 /// with the ASAccountAuthenticationModificationSupportsUpgradeToSignInWithApple key in the
122 /// extension's Info.plist. This method will be called to begin a strong password upgrade request and
123 /// will not present any extension UI. If extension UI needs to be shown, this initial request should be
124 /// canceled with the ASExtensionErrorCodeUserCanceled error code. The existingCredential parameter
125 /// will have an empty password for in-app upgrades. The extension should check if a user is already
126 /// logged in by checking a data container shared with its containing app.
127 #[unsafe(method(changePasswordWithoutUserInteractionForServiceIdentifier:existingCredential:newPassword:userInfo:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn changePasswordWithoutUserInteractionForServiceIdentifier_existingCredential_newPassword_userInfo(
130 &self,
131 service_identifier: &ASCredentialServiceIdentifier,
132 existing_credential: &ASPasswordCredential,
133 new_password: &NSString,
134 user_info: Option<&NSDictionary>,
135 );
136
137 #[cfg(all(
138 feature = "ASCredentialServiceIdentifier",
139 feature = "ASPasswordCredential"
140 ))]
141 /// This method will be called when a strong password upgrade request requires user interaction.
142 ///
143 /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
144 ///
145 /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
146 ///
147 /// Parameter `newPassword`: A strong password generated by the system to be used for the upgrade.
148 ///
149 /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
150 /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
151 ///
152 /// This method will be called when the initial request is canceled with the
153 /// ASExtensionErrorCodeUserCanceled error code. The implementation of this method should do
154 /// any work necessary to prepare to present the extension UI. Once it finishes, the system will present
155 /// the extension UI. Password rules for generating the newPassword parameter can be specified
156 /// with the ASAccountAuthenticationModificationSupportsUpgradeToSignInWithApple key in the
157 /// extension's Info.plist. The existingCredential parameter will have an empty password for in-app upgrades.
158 /// The extension should check if a user is already logged in by checking state in a data container shared
159 /// with its containing app.
160 #[unsafe(method(prepareInterfaceToChangePasswordForServiceIdentifier:existingCredential:newPassword:userInfo:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn prepareInterfaceToChangePasswordForServiceIdentifier_existingCredential_newPassword_userInfo(
163 &self,
164 service_identifier: &ASCredentialServiceIdentifier,
165 existing_credential: &ASPasswordCredential,
166 new_password: &NSString,
167 user_info: Option<&NSDictionary>,
168 );
169
170 /// This method will be called when the user taps the system-provided "Cancel" button shown above extension UI.
171 ///
172 /// Extension UI will be dismissed as soon as this method is called. The default
173 /// implementation simply cancels the request with the ASExtensionErrorCodeUserCanceled error code.
174 /// Override this method to do any cleanup work before the request is canceled. The implementation of this
175 /// method should still cancel the request with the ASExtensionErrorCodeUserCanceled error code once the
176 /// cleanup work is completed. If the request is not canceled in 10 seconds, the system will cancel the request.
177 #[unsafe(method(cancelRequest))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn cancelRequest(&self);
180 );
181}
182
183/// Methods declared on superclass `NSViewController`.
184#[cfg(target_os = "macos")]
185impl ASAccountAuthenticationModificationViewController {
186 extern_methods!(
187 #[unsafe(method(initWithNibName:bundle:))]
188 #[unsafe(method_family = init)]
189 pub unsafe fn initWithNibName_bundle(
190 this: Allocated<Self>,
191 nib_name_or_nil: Option<&NSNibName>,
192 nib_bundle_or_nil: Option<&NSBundle>,
193 ) -> Retained<Self>;
194
195 #[unsafe(method(initWithCoder:))]
196 #[unsafe(method_family = init)]
197 pub unsafe fn initWithCoder(
198 this: Allocated<Self>,
199 coder: &NSCoder,
200 ) -> Option<Retained<Self>>;
201 );
202}
203
204/// Methods declared on superclass `NSResponder`.
205#[cfg(target_os = "macos")]
206impl ASAccountAuthenticationModificationViewController {
207 extern_methods!(
208 #[unsafe(method(init))]
209 #[unsafe(method_family = init)]
210 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
211 );
212}
213
214/// Methods declared on superclass `NSObject`.
215#[cfg(target_os = "macos")]
216impl ASAccountAuthenticationModificationViewController {
217 extern_methods!(
218 #[unsafe(method(new))]
219 #[unsafe(method_family = new)]
220 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
221 );
222}