objc2_web_kit/generated/
WKSecurityOrigin.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
9extern_class!(
10    /// A WKSecurityOrigin object contains information about a security origin.
11    ///
12    /// An instance of this class is a transient, data-only object;
13    /// it does not uniquely identify a security origin across multiple delegate method
14    /// calls.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wksecurityorigin?language=objc)
17    #[unsafe(super(NSObject))]
18    #[thread_kind = MainThreadOnly]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    pub struct WKSecurityOrigin;
21);
22
23extern_conformance!(
24    unsafe impl NSObjectProtocol for WKSecurityOrigin {}
25);
26
27impl WKSecurityOrigin {
28    extern_methods!(
29        #[unsafe(method(init))]
30        #[unsafe(method_family = init)]
31        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33        /// The security origin's protocol.
34        #[unsafe(method(protocol))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn protocol(&self) -> Retained<NSString>;
37
38        /// The security origin's host.
39        #[unsafe(method(host))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn host(&self) -> Retained<NSString>;
42
43        /// The security origin's port.
44        #[unsafe(method(port))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn port(&self) -> NSInteger;
47    );
48}
49
50/// Methods declared on superclass `NSObject`.
51impl WKSecurityOrigin {
52    extern_methods!(
53        #[unsafe(method(new))]
54        #[unsafe(method_family = new)]
55        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
56    );
57}