icrate/generated/AuthenticationServices/
ASWebAuthenticationSessionRequest.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::AuthenticationServices::*;
6use crate::Foundation::*;
7
8extern_protocol!(
9 pub unsafe trait ASWebAuthenticationSessionRequestDelegate: NSObjectProtocol {
10 #[cfg(all(
11 feature = "AuthenticationServices_ASWebAuthenticationSessionRequest",
12 feature = "Foundation_NSURL"
13 ))]
14 #[optional]
15 #[method(authenticationSessionRequest:didCompleteWithCallbackURL:)]
16 unsafe fn authenticationSessionRequest_didCompleteWithCallbackURL(
17 &self,
18 authentication_session_request: &ASWebAuthenticationSessionRequest,
19 callback_url: &NSURL,
20 );
21
22 #[cfg(all(
23 feature = "AuthenticationServices_ASWebAuthenticationSessionRequest",
24 feature = "Foundation_NSError"
25 ))]
26 #[optional]
27 #[method(authenticationSessionRequest:didCancelWithError:)]
28 unsafe fn authenticationSessionRequest_didCancelWithError(
29 &self,
30 authentication_session_request: &ASWebAuthenticationSessionRequest,
31 error: &NSError,
32 );
33 }
34
35 unsafe impl ProtocolType for dyn ASWebAuthenticationSessionRequestDelegate {}
36);
37
38extern_class!(
39 #[derive(Debug, PartialEq, Eq, Hash)]
40 #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
41 pub struct ASWebAuthenticationSessionRequest;
42
43 #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
44 unsafe impl ClassType for ASWebAuthenticationSessionRequest {
45 type Super = NSObject;
46 type Mutability = InteriorMutable;
47 }
48);
49
50#[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
51unsafe impl NSCoding for ASWebAuthenticationSessionRequest {}
52
53#[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
54unsafe impl NSCopying for ASWebAuthenticationSessionRequest {}
55
56#[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
57unsafe impl NSObjectProtocol for ASWebAuthenticationSessionRequest {}
58
59#[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
60unsafe impl NSSecureCoding for ASWebAuthenticationSessionRequest {}
61
62extern_methods!(
63 #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")]
64 unsafe impl ASWebAuthenticationSessionRequest {
65 #[cfg(feature = "Foundation_NSUUID")]
66 #[method_id(@__retain_semantics Other UUID)]
67 pub unsafe fn UUID(&self) -> Id<NSUUID>;
68
69 #[cfg(feature = "Foundation_NSURL")]
70 #[method_id(@__retain_semantics Other URL)]
71 pub unsafe fn URL(&self) -> Id<NSURL>;
72
73 #[cfg(feature = "Foundation_NSString")]
74 #[method_id(@__retain_semantics Other callbackURLScheme)]
75 pub unsafe fn callbackURLScheme(&self) -> Option<Id<NSString>>;
76
77 #[method(shouldUseEphemeralSession)]
78 pub unsafe fn shouldUseEphemeralSession(&self) -> bool;
79
80 #[method_id(@__retain_semantics Other delegate)]
81 pub unsafe fn delegate(
82 &self,
83 ) -> Option<Id<ProtocolObject<dyn ASWebAuthenticationSessionRequestDelegate>>>;
84
85 #[method(setDelegate:)]
86 pub unsafe fn setDelegate(
87 &self,
88 delegate: Option<&ProtocolObject<dyn ASWebAuthenticationSessionRequestDelegate>>,
89 );
90
91 #[method_id(@__retain_semantics New new)]
92 pub unsafe fn new() -> Id<Self>;
93
94 #[method_id(@__retain_semantics Init init)]
95 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
96
97 #[cfg(feature = "Foundation_NSError")]
98 #[method(cancelWithError:)]
99 pub unsafe fn cancelWithError(&self, error: &NSError);
100
101 #[cfg(feature = "Foundation_NSURL")]
102 #[method(completeWithCallbackURL:)]
103 pub unsafe fn completeWithCallbackURL(&self, url: &NSURL);
104 }
105);