objc2_pass_kit/generated/
PKAddSecureElementPassConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-graphics")]
7use objc2_core_graphics::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddpassmetadatapreview?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct PKAddPassMetadataPreview;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for PKAddPassMetadataPreview {}
21);
22
23impl PKAddPassMetadataPreview {
24    extern_methods!(
25        #[cfg(feature = "objc2-core-graphics")]
26        /// Initializer preview object to represent the pass being added to Wallet.which requires a CGImage of the pass's card art and a localized description.
27        /// - Properties:
28        /// - passThumbnail: CGImage representing the card artwork of the pass to be presented during provisioning.
29        /// - localizedDescription: Localized description of the pass.
30        #[unsafe(method(initWithPassThumbnail:localizedDescription:))]
31        #[unsafe(method_family = init)]
32        pub unsafe fn initWithPassThumbnail_localizedDescription(
33            this: Allocated<Self>,
34            pass_thumbnail: &CGImage,
35            description: &NSString,
36        ) -> Retained<Self>;
37
38        #[cfg(feature = "objc2-core-graphics")]
39        #[unsafe(method(previewWithPassThumbnail:localizedDescription:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn previewWithPassThumbnail_localizedDescription(
42            pass_thumbnail: &CGImage,
43            description: &NSString,
44        ) -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53
54        #[cfg(feature = "objc2-core-graphics")]
55        /// CGImage representing the pass in our provisioning UI.
56        ///
57        /// # Safety
58        ///
59        /// This is not retained internally, you must ensure the object is still alive.
60        #[unsafe(method(passThumbnailImage))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn passThumbnailImage(&self) -> Option<Retained<CGImage>>;
63
64        /// Localized description of the pass to be referenced during provisioning.
65        #[unsafe(method(localizedDescription))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
68    );
69}
70
71extern_class!(
72    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddsecureelementpassconfiguration?language=objc)
73    #[unsafe(super(NSObject))]
74    #[derive(Debug, PartialEq, Eq, Hash)]
75    pub struct PKAddSecureElementPassConfiguration;
76);
77
78extern_conformance!(
79    unsafe impl NSObjectProtocol for PKAddSecureElementPassConfiguration {}
80);
81
82impl PKAddSecureElementPassConfiguration {
83    extern_methods!(
84        #[unsafe(method(init))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88        #[unsafe(method(new))]
89        #[unsafe(method_family = new)]
90        pub unsafe fn new() -> Retained<Self>;
91
92        #[unsafe(method(issuerIdentifier))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn issuerIdentifier(&self) -> Option<Retained<NSString>>;
95
96        /// Setter for [`issuerIdentifier`][Self::issuerIdentifier].
97        ///
98        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
99        #[unsafe(method(setIssuerIdentifier:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn setIssuerIdentifier(&self, issuer_identifier: Option<&NSString>);
102
103        #[unsafe(method(localizedDescription))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
106
107        /// Setter for [`localizedDescription`][Self::localizedDescription].
108        ///
109        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
110        #[unsafe(method(setLocalizedDescription:))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn setLocalizedDescription(&self, localized_description: Option<&NSString>);
113    );
114}