objc2_authentication_services/generated/
ASWebAuthenticationSessionRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait ASWebAuthenticationSessionRequestDelegate: NSObjectProtocol {
13 #[optional]
14 #[unsafe(method(authenticationSessionRequest:didCompleteWithCallbackURL:))]
15 #[unsafe(method_family = none)]
16 unsafe fn authenticationSessionRequest_didCompleteWithCallbackURL(
17 &self,
18 authentication_session_request: &ASWebAuthenticationSessionRequest,
19 callback_url: &NSURL,
20 );
21
22 #[optional]
23 #[unsafe(method(authenticationSessionRequest:didCancelWithError:))]
24 #[unsafe(method_family = none)]
25 unsafe fn authenticationSessionRequest_didCancelWithError(
26 &self,
27 authentication_session_request: &ASWebAuthenticationSessionRequest,
28 error: &NSError,
29 );
30 }
31);
32
33extern_class!(
34 #[unsafe(super(NSObject))]
36 #[derive(Debug, PartialEq, Eq, Hash)]
37 pub struct ASWebAuthenticationSessionRequest;
38);
39
40extern_conformance!(
41 unsafe impl NSCoding for ASWebAuthenticationSessionRequest {}
42);
43
44extern_conformance!(
45 unsafe impl NSCopying for ASWebAuthenticationSessionRequest {}
46);
47
48unsafe impl CopyingHelper for ASWebAuthenticationSessionRequest {
49 type Result = Self;
50}
51
52extern_conformance!(
53 unsafe impl NSObjectProtocol for ASWebAuthenticationSessionRequest {}
54);
55
56extern_conformance!(
57 unsafe impl NSSecureCoding for ASWebAuthenticationSessionRequest {}
58);
59
60impl ASWebAuthenticationSessionRequest {
61 extern_methods!(
62 #[unsafe(method(UUID))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn UUID(&self) -> Retained<NSUUID>;
65
66 #[unsafe(method(URL))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn URL(&self) -> Retained<NSURL>;
69
70 #[deprecated = "Use `callback` to match all callback types."]
71 #[unsafe(method(callbackURLScheme))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn callbackURLScheme(&self) -> Option<Retained<NSString>>;
74
75 #[unsafe(method(shouldUseEphemeralSession))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn shouldUseEphemeralSession(&self) -> bool;
78
79 #[unsafe(method(delegate))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn delegate(
82 &self,
83 ) -> Option<Retained<ProtocolObject<dyn ASWebAuthenticationSessionRequestDelegate>>>;
84
85 #[unsafe(method(setDelegate:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setDelegate(
90 &self,
91 delegate: Option<&ProtocolObject<dyn ASWebAuthenticationSessionRequestDelegate>>,
92 );
93
94 #[unsafe(method(additionalHeaderFields))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn additionalHeaderFields(
100 &self,
101 ) -> Option<Retained<NSDictionary<NSString, NSString>>>;
102
103 #[cfg(feature = "ASWebAuthenticationSessionCallback")]
104 #[unsafe(method(callback))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn callback(&self) -> Option<Retained<ASWebAuthenticationSessionCallback>>;
111
112 #[unsafe(method(new))]
113 #[unsafe(method_family = new)]
114 pub unsafe fn new() -> Retained<Self>;
115
116 #[unsafe(method(init))]
117 #[unsafe(method_family = init)]
118 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
119
120 #[unsafe(method(cancelWithError:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn cancelWithError(&self, error: &NSError);
123
124 #[unsafe(method(completeWithCallbackURL:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn completeWithCallbackURL(&self, url: &NSURL);
127 );
128}