objc2_authentication_services/generated/
ASSettingsHelper.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// A helper class to provide static utility methods for quick access to settings related to credential providers.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/assettingshelper?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct ASSettingsHelper;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for ASSettingsHelper {}
21);
22
23impl ASSettingsHelper {
24    extern_methods!(
25        #[cfg(feature = "block2")]
26        /// Calling this method will open the Settings app and navigate directly to the AutoFill provider settings.
27        #[unsafe(method(openCredentialProviderAppSettingsWithCompletionHandler:))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn openCredentialProviderAppSettingsWithCompletionHandler(
30            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
31        );
32
33        #[cfg(feature = "block2")]
34        /// Calling this method will open the Settings app and navigate directly to the Verification Code provider settings.
35        #[unsafe(method(openVerificationCodeAppSettingsWithCompletionHandler:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn openVerificationCodeAppSettingsWithCompletionHandler(
38            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
39        );
40
41        #[cfg(feature = "block2")]
42        /// Call this method from your containing app to request to turn on a contained Credential Provider Extension.
43        /// If the extension is not currently enabled, a prompt will be shown to allow it to be turned on.
44        /// The completion handler is called with YES or NO depending on whether the credential provider is enabled.
45        /// You need to wait 10 seconds in order to make additional request to this API.
46        #[unsafe(method(requestToTurnOnCredentialProviderExtensionWithCompletionHandler:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn requestToTurnOnCredentialProviderExtensionWithCompletionHandler(
49            completion_handler: &block2::DynBlock<dyn Fn(Bool)>,
50        );
51
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56        #[unsafe(method(new))]
57        #[unsafe(method_family = new)]
58        pub unsafe fn new() -> Retained<Self>;
59    );
60}