objc2_store_kit/generated/
SKRequest.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skrequest?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[deprecated = "No longer supported"]
15    pub struct SKRequest;
16);
17
18extern_conformance!(
19    unsafe impl NSObjectProtocol for SKRequest {}
20);
21
22impl SKRequest {
23    extern_methods!(
24        #[deprecated = "No longer supported"]
25        #[unsafe(method(delegate))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn SKRequestDelegate>>>;
28
29        /// Setter for [`delegate`][Self::delegate].
30        ///
31        /// This is a [weak property][objc2::topics::weak_property].
32        #[deprecated = "No longer supported"]
33        #[unsafe(method(setDelegate:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn SKRequestDelegate>>);
36
37        #[deprecated = "No longer supported"]
38        #[unsafe(method(cancel))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn cancel(&self);
41
42        #[deprecated = "No longer supported"]
43        #[unsafe(method(start))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn start(&self);
46    );
47}
48
49/// Methods declared on superclass `NSObject`.
50impl SKRequest {
51    extern_methods!(
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56        #[unsafe(method(new))]
57        #[unsafe(method_family = new)]
58        pub unsafe fn new() -> Retained<Self>;
59    );
60}
61
62extern_protocol!(
63    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skrequestdelegate?language=objc)
64    #[deprecated = "No longer supported"]
65    pub unsafe trait SKRequestDelegate: NSObjectProtocol {
66        #[deprecated = "No longer supported"]
67        #[optional]
68        #[unsafe(method(requestDidFinish:))]
69        #[unsafe(method_family = none)]
70        unsafe fn requestDidFinish(&self, request: &SKRequest);
71
72        #[deprecated = "No longer supported"]
73        #[optional]
74        #[unsafe(method(request:didFailWithError:))]
75        #[unsafe(method_family = none)]
76        unsafe fn request_didFailWithError(&self, request: &SKRequest, error: &NSError);
77    }
78);