objc2_ad_services/generated/
AAAttribution.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10 pub static AAAttributionErrorDomain: &'static NSErrorDomain;
14}
15
16#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct AAAttributionErrorCode(pub NSInteger);
23impl AAAttributionErrorCode {
24 #[doc(alias = "AAAttributionErrorCodeNetworkError")]
29 pub const NetworkError: Self = Self(1);
30 #[doc(alias = "AAAttributionErrorCodeInternalError")]
32 pub const InternalError: Self = Self(2);
33 #[doc(alias = "AAAttributionErrorCodePlatformNotSupported")]
35 pub const PlatformNotSupported: Self = Self(3);
36}
37
38unsafe impl Encode for AAAttributionErrorCode {
39 const ENCODING: Encoding = NSInteger::ENCODING;
40}
41
42unsafe impl RefEncode for AAAttributionErrorCode {
43 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
44}
45
46extern_class!(
47 #[unsafe(super(NSObject))]
51 #[derive(Debug, PartialEq, Eq, Hash)]
52 pub struct AAAttribution;
53);
54
55extern_conformance!(
56 unsafe impl NSObjectProtocol for AAAttribution {}
57);
58
59impl AAAttribution {
60 extern_methods!(
61 #[unsafe(method(attributionTokenWithError:_))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn attributionTokenWithError() -> Result<Retained<NSString>, Retained<NSError>>;
65 );
66}
67
68impl AAAttribution {
70 extern_methods!(
71 #[unsafe(method(init))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75 #[unsafe(method(new))]
76 #[unsafe(method_family = new)]
77 pub unsafe fn new() -> Retained<Self>;
78 );
79}