objc2_authentication_services/generated/
ASAuthorization.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
9/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationscope?language=objc)
10// NS_TYPED_EXTENSIBLE_ENUM
11pub type ASAuthorizationScope = NSString;
12
13extern "C" {
14    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationscopefullname?language=objc)
15    pub static ASAuthorizationScopeFullName: &'static ASAuthorizationScope;
16}
17
18extern "C" {
19    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationscopeemail?language=objc)
20    pub static ASAuthorizationScopeEmail: &'static ASAuthorizationScope;
21}
22
23extern_class!(
24    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorization?language=objc)
25    #[unsafe(super(NSObject))]
26    #[derive(Debug, PartialEq, Eq, Hash)]
27    pub struct ASAuthorization;
28);
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for ASAuthorization {}
32);
33
34impl ASAuthorization {
35    extern_methods!(
36        #[cfg(feature = "ASAuthorizationProvider")]
37        /// Provider which was used to generate this authorization response.
38        #[unsafe(method(provider))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn provider(&self) -> Retained<ProtocolObject<dyn ASAuthorizationProvider>>;
41
42        #[cfg(feature = "ASAuthorizationCredential")]
43        /// The credential that was returned by the authorization provider. Authorization provider type should be used to determine how to introspect the credential.
44        #[unsafe(method(credential))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn credential(&self) -> Retained<ProtocolObject<dyn ASAuthorizationCredential>>;
47
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55    );
56}