objc2_pass_kit/generated/
PKPass.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(PKObject, NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 #[cfg(feature = "PKObject")]
14 pub struct PKPass;
15);
16
17#[cfg(feature = "PKObject")]
18extern_conformance!(
19 unsafe impl NSObjectProtocol for PKPass {}
20);
21
22#[cfg(feature = "PKObject")]
23impl PKPass {
24 extern_methods!(
25 #[unsafe(method(initWithData:error:_))]
26 #[unsafe(method_family = init)]
27 pub unsafe fn initWithData_error(
28 this: Allocated<Self>,
29 data: &NSData,
30 ) -> Result<Retained<Self>, Retained<NSError>>;
31
32 #[cfg(feature = "PKPass_Types")]
33 #[unsafe(method(passType))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn passType(&self) -> PKPassType;
36
37 #[cfg(all(feature = "PKPaymentPass", feature = "PKSecureElementPass"))]
38 #[deprecated = "Use -[PKPass secureElementPass] instead"]
39 #[unsafe(method(paymentPass))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn paymentPass(&self) -> Option<Retained<PKPaymentPass>>;
42
43 #[cfg(feature = "PKSecureElementPass")]
44 #[unsafe(method(secureElementPass))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn secureElementPass(&self) -> Option<Retained<PKSecureElementPass>>;
47
48 #[unsafe(method(serialNumber))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn serialNumber(&self) -> Retained<NSString>;
51
52 #[unsafe(method(passTypeIdentifier))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn passTypeIdentifier(&self) -> Retained<NSString>;
55
56 #[unsafe(method(webServiceURL))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn webServiceURL(&self) -> Option<Retained<NSURL>>;
59
60 #[unsafe(method(authenticationToken))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn authenticationToken(&self) -> Option<Retained<NSString>>;
63
64 #[unsafe(method(localizedName))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn localizedName(&self) -> Retained<NSString>;
67
68 #[unsafe(method(localizedDescription))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn localizedDescription(&self) -> Retained<NSString>;
71
72 #[unsafe(method(organizationName))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn organizationName(&self) -> Retained<NSString>;
75
76 #[deprecated = "Use relevantDates"]
77 #[unsafe(method(relevantDate))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn relevantDate(&self) -> Option<Retained<NSDate>>;
80
81 #[unsafe(method(userInfo))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
84
85 #[unsafe(method(passURL))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn passURL(&self) -> Option<Retained<NSURL>>;
88
89 #[unsafe(method(isRemotePass))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn isRemotePass(&self) -> bool;
92
93 #[unsafe(method(deviceName))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn deviceName(&self) -> Retained<NSString>;
96
97 #[unsafe(method(localizedValueForFieldKey:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn localizedValueForFieldKey(
100 &self,
101 key: &NSString,
102 ) -> Option<Retained<AnyObject>>;
103 );
104}
105
106#[cfg(feature = "PKObject")]
108impl PKPass {
109 extern_methods!(
110 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new() -> Retained<Self>;
117 );
118}