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        ///
69        /// # Safety
70        ///
71        /// `user_info` generic should be of the correct type.
72        #[unsafe(method(convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier:existingCredential:userInfo:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier_existingCredential_userInfo(
75            &self,
76            service_identifier: &ASCredentialServiceIdentifier,
77            existing_credential: &ASPasswordCredential,
78            user_info: Option<&NSDictionary>,
79        );
80
81        #[cfg(all(
82            feature = "ASCredentialServiceIdentifier",
83            feature = "ASPasswordCredential"
84        ))]
85        /// This method will be called when a Sign in with Apple upgrade request requires user interaction.
86        ///
87        /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
88        ///
89        /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
90        ///
91        /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
92        /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
93        ///
94        /// This method will be called when the initial request is canceled with the
95        /// ASExtensionErrorCodeUserCanceled error code. The implementation of this method should do any
96        /// work necessary to prepare to present the extension UI. Once it finishes, the system will present the
97        /// extension UI. The existingCredential parameter will have an empty password for in-app upgrades. The
98        /// extension should check if a user is already logged in by checking state in a data container shared
99        /// with its containing app.
100        ///
101        /// # Safety
102        ///
103        /// `user_info` generic should be of the correct type.
104        #[unsafe(method(prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier:existingCredential:userInfo:))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier_existingCredential_userInfo(
107            &self,
108            service_identifier: &ASCredentialServiceIdentifier,
109            existing_credential: &ASPasswordCredential,
110            user_info: Option<&NSDictionary>,
111        );
112
113        #[cfg(all(
114            feature = "ASCredentialServiceIdentifier",
115            feature = "ASPasswordCredential"
116        ))]
117        /// This method will be called when a user initiates a strong password upgrade request.
118        ///
119        /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
120        ///
121        /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
122        ///
123        /// Parameter `newPassword`: A strong password generated by the system to be used for the upgrade.
124        ///
125        /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
126        /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
127        ///
128        /// Password rules for generating the newPassword parameter can be specified
129        /// with the ASAccountAuthenticationModificationSupportsUpgradeToSignInWithApple key in the
130        /// extension's Info.plist. This method will be called to begin a strong password upgrade request and
131        /// will not present any extension UI. If extension UI needs to be shown, this initial request should be
132        /// canceled with the ASExtensionErrorCodeUserCanceled error code. The existingCredential parameter
133        /// will have an empty password for in-app upgrades. The extension should check if a user is already
134        /// logged in by checking a data container shared with its containing app.
135        ///
136        /// # Safety
137        ///
138        /// `user_info` generic should be of the correct type.
139        #[unsafe(method(changePasswordWithoutUserInteractionForServiceIdentifier:existingCredential:newPassword:userInfo:))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn changePasswordWithoutUserInteractionForServiceIdentifier_existingCredential_newPassword_userInfo(
142            &self,
143            service_identifier: &ASCredentialServiceIdentifier,
144            existing_credential: &ASPasswordCredential,
145            new_password: &NSString,
146            user_info: Option<&NSDictionary>,
147        );
148
149        #[cfg(all(
150            feature = "ASCredentialServiceIdentifier",
151            feature = "ASPasswordCredential"
152        ))]
153        /// This method will be called when a strong password upgrade request requires user interaction.
154        ///
155        /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
156        ///
157        /// Parameter `existingCredential`: The current password-based credential of the account for the upgrade.
158        ///
159        /// Parameter `newPassword`: A strong password generated by the system to be used for the upgrade.
160        ///
161        /// Parameter `userInfo`: For upgrades invoked within the extension's containing app, any
162        /// information the app wants to pass to the extension, most likely to help authorize the upgrade.
163        ///
164        /// This method will be called when the initial request is canceled with the
165        /// ASExtensionErrorCodeUserCanceled error code. The implementation of this method should do
166        /// any work necessary to prepare to present the extension UI. Once it finishes, the system will present
167        /// the extension UI. Password rules for generating the newPassword parameter can be specified
168        /// with the ASAccountAuthenticationModificationSupportsUpgradeToSignInWithApple key in the
169        /// extension's Info.plist. The existingCredential parameter will have an empty password for in-app upgrades.
170        /// The extension should check if a user is already logged in by checking state in a data container shared
171        /// with its containing app.
172        ///
173        /// # Safety
174        ///
175        /// `user_info` generic should be of the correct type.
176        #[unsafe(method(prepareInterfaceToChangePasswordForServiceIdentifier:existingCredential:newPassword:userInfo:))]
177        #[unsafe(method_family = none)]
178        pub unsafe fn prepareInterfaceToChangePasswordForServiceIdentifier_existingCredential_newPassword_userInfo(
179            &self,
180            service_identifier: &ASCredentialServiceIdentifier,
181            existing_credential: &ASPasswordCredential,
182            new_password: &NSString,
183            user_info: Option<&NSDictionary>,
184        );
185
186        /// This method will be called when the user taps the system-provided "Cancel" button shown above extension UI.
187        ///
188        /// Extension UI will be dismissed as soon as this method is called. The default
189        /// implementation simply cancels the request with the ASExtensionErrorCodeUserCanceled error code.
190        /// Override this method to do any cleanup work before the request is canceled. The implementation of this
191        /// method should still cancel the request with the ASExtensionErrorCodeUserCanceled error code once the
192        /// cleanup work is completed. If the request is not canceled in 10 seconds, the system will cancel the request.
193        #[unsafe(method(cancelRequest))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn cancelRequest(&self);
196    );
197}
198
199/// Methods declared on superclass `NSViewController`.
200#[cfg(target_os = "macos")]
201impl ASAccountAuthenticationModificationViewController {
202    extern_methods!(
203        #[unsafe(method(initWithNibName:bundle:))]
204        #[unsafe(method_family = init)]
205        pub unsafe fn initWithNibName_bundle(
206            this: Allocated<Self>,
207            nib_name_or_nil: Option<&NSNibName>,
208            nib_bundle_or_nil: Option<&NSBundle>,
209        ) -> Retained<Self>;
210
211        /// # Safety
212        ///
213        /// `coder` possibly has further requirements.
214        #[unsafe(method(initWithCoder:))]
215        #[unsafe(method_family = init)]
216        pub unsafe fn initWithCoder(
217            this: Allocated<Self>,
218            coder: &NSCoder,
219        ) -> Option<Retained<Self>>;
220    );
221}
222
223/// Methods declared on superclass `NSResponder`.
224#[cfg(target_os = "macos")]
225impl ASAccountAuthenticationModificationViewController {
226    extern_methods!(
227        #[unsafe(method(init))]
228        #[unsafe(method_family = init)]
229        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
230    );
231}
232
233/// Methods declared on superclass `NSObject`.
234#[cfg(target_os = "macos")]
235impl ASAccountAuthenticationModificationViewController {
236    extern_methods!(
237        #[unsafe(method(new))]
238        #[unsafe(method_family = new)]
239        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
240    );
241}