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::Foundation::*;

extern_static!(NSURLProtectionSpaceHTTP: &'static NSString);

extern_static!(NSURLProtectionSpaceHTTPS: &'static NSString);

extern_static!(NSURLProtectionSpaceFTP: &'static NSString);

extern_static!(NSURLProtectionSpaceHTTPProxy: &'static NSString);

extern_static!(NSURLProtectionSpaceHTTPSProxy: &'static NSString);

extern_static!(NSURLProtectionSpaceFTPProxy: &'static NSString);

extern_static!(NSURLProtectionSpaceSOCKSProxy: &'static NSString);

extern_static!(NSURLAuthenticationMethodDefault: &'static NSString);

extern_static!(NSURLAuthenticationMethodHTTPBasic: &'static NSString);

extern_static!(NSURLAuthenticationMethodHTTPDigest: &'static NSString);

extern_static!(NSURLAuthenticationMethodHTMLForm: &'static NSString);

extern_static!(NSURLAuthenticationMethodNTLM: &'static NSString);

extern_static!(NSURLAuthenticationMethodNegotiate: &'static NSString);

extern_static!(NSURLAuthenticationMethodClientCertificate: &'static NSString);

extern_static!(NSURLAuthenticationMethodServerTrust: &'static NSString);

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

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

extern_methods!(
    unsafe impl NSURLProtectionSpace {
        #[method_id(@__retain_semantics Init initWithHost:port:protocol:realm:authenticationMethod:)]
        pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod(
            this: Option<Allocated<Self>>,
            host: &NSString,
            port: NSInteger,
            protocol: Option<&NSString>,
            realm: Option<&NSString>,
            authenticationMethod: Option<&NSString>,
        ) -> Id<Self, Shared>;

        #[method_id(@__retain_semantics Init initWithProxyHost:port:type:realm:authenticationMethod:)]
        pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod(
            this: Option<Allocated<Self>>,
            host: &NSString,
            port: NSInteger,
            type_: Option<&NSString>,
            realm: Option<&NSString>,
            authenticationMethod: Option<&NSString>,
        ) -> Id<Self, Shared>;

        #[method_id(@__retain_semantics Other realm)]
        pub unsafe fn realm(&self) -> Option<Id<NSString, Shared>>;

        #[method(receivesCredentialSecurely)]
        pub unsafe fn receivesCredentialSecurely(&self) -> bool;

        #[method(isProxy)]
        pub unsafe fn isProxy(&self) -> bool;

        #[method_id(@__retain_semantics Other host)]
        pub unsafe fn host(&self) -> Id<NSString, Shared>;

        #[method(port)]
        pub unsafe fn port(&self) -> NSInteger;

        #[method_id(@__retain_semantics Other proxyType)]
        pub unsafe fn proxyType(&self) -> Option<Id<NSString, Shared>>;

        #[method_id(@__retain_semantics Other protocol)]
        pub unsafe fn protocol(&self) -> Option<Id<NSString, Shared>>;

        #[method_id(@__retain_semantics Other authenticationMethod)]
        pub unsafe fn authenticationMethod(&self) -> Id<NSString, Shared>;
    }
);

extern_methods!(
    /// NSClientCertificateSpace
    unsafe impl NSURLProtectionSpace {
        #[method_id(@__retain_semantics Other distinguishedNames)]
        pub unsafe fn distinguishedNames(&self) -> Option<Id<NSArray<NSData>, Shared>>;
    }
);

extern_methods!(
    /// NSServerTrustValidationSpace
    unsafe impl NSURLProtectionSpace {}
);