icrate 0.0.1

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AuthenticationServices::*;
use crate::Foundation::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum ASAuthorizationAppleIDProviderCredentialState {
        ASAuthorizationAppleIDProviderCredentialRevoked = 0,
        ASAuthorizationAppleIDProviderCredentialAuthorized = 1,
        ASAuthorizationAppleIDProviderCredentialNotFound = 2,
        ASAuthorizationAppleIDProviderCredentialTransferred = 3,
    }
);

extern_static!(
    ASAuthorizationAppleIDProviderCredentialRevokedNotification: &'static NSNotificationName
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ASAuthorizationAppleIDProvider;

    unsafe impl ClassType for ASAuthorizationAppleIDProvider {
        type Super = NSObject;
    }
);

extern_methods!(
    unsafe impl ASAuthorizationAppleIDProvider {
        #[method_id(@__retain_semantics Other createRequest)]
        pub unsafe fn createRequest(&self) -> Id<ASAuthorizationAppleIDRequest, Shared>;

        #[method(getCredentialStateForUserID:completion:)]
        pub unsafe fn getCredentialStateForUserID_completion(
            &self,
            userID: &NSString,
            completion: &Block<(ASAuthorizationAppleIDProviderCredentialState, *mut NSError), ()>,
        );
    }
);