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