objc2_store_kit/generated/
SKCloudServiceSetupViewController.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-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13/// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupoptionskey?language=objc)
14// NS_TYPED_ENUM
15pub type SKCloudServiceSetupOptionsKey = NSString;
16
17/// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupaction?language=objc)
18// NS_TYPED_ENUM
19pub type SKCloudServiceSetupAction = NSString;
20
21/// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupmessageidentifier?language=objc)
22// NS_TYPED_ENUM
23pub type SKCloudServiceSetupMessageIdentifier = NSString;
24
25extern_class!(
26    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupviewcontroller?language=objc)
27    #[unsafe(super(NSViewController, NSResponder, NSObject))]
28    #[derive(Debug, PartialEq, Eq, Hash)]
29    #[cfg(feature = "objc2-app-kit")]
30    #[cfg(target_os = "macos")]
31    #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
32    pub struct SKCloudServiceSetupViewController;
33);
34
35#[cfg(feature = "objc2-app-kit")]
36#[cfg(target_os = "macos")]
37extern_conformance!(
38    unsafe impl NSCoding for SKCloudServiceSetupViewController {}
39);
40
41#[cfg(feature = "objc2-app-kit")]
42#[cfg(target_os = "macos")]
43extern_conformance!(
44    unsafe impl NSEditor for SKCloudServiceSetupViewController {}
45);
46
47#[cfg(feature = "objc2-app-kit")]
48#[cfg(target_os = "macos")]
49extern_conformance!(
50    unsafe impl NSObjectProtocol for SKCloudServiceSetupViewController {}
51);
52
53#[cfg(feature = "objc2-app-kit")]
54#[cfg(target_os = "macos")]
55extern_conformance!(
56    unsafe impl NSSeguePerforming for SKCloudServiceSetupViewController {}
57);
58
59#[cfg(feature = "objc2-app-kit")]
60#[cfg(target_os = "macos")]
61extern_conformance!(
62    unsafe impl NSUserInterfaceItemIdentification for SKCloudServiceSetupViewController {}
63);
64
65#[cfg(feature = "objc2-app-kit")]
66#[cfg(target_os = "macos")]
67impl SKCloudServiceSetupViewController {
68    extern_methods!(
69        /// Optional delegate.
70        #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
71        #[unsafe(method(delegate))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn delegate(
74            &self,
75        ) -> Option<Retained<ProtocolObject<dyn SKCloudServiceSetupViewControllerDelegate>>>;
76
77        /// This is a [weak property][objc2::topics::weak_property].
78        /// Setter for [`delegate`][Self::delegate].
79        #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
80        #[unsafe(method(setDelegate:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn setDelegate(
83            &self,
84            delegate: Option<&ProtocolObject<dyn SKCloudServiceSetupViewControllerDelegate>>,
85        );
86
87        #[cfg(feature = "block2")]
88        /// Load cloud service setup view with the given options.
89        /// Block is invoked on the main thread when the load finishes.
90        #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
91        #[unsafe(method(loadWithOptions:completionHandler:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn loadWithOptions_completionHandler(
94            &self,
95            options: &NSDictionary<SKCloudServiceSetupOptionsKey, AnyObject>,
96            completion_handler: Option<&block2::DynBlock<dyn Fn(Bool, *mut NSError)>>,
97        );
98    );
99}
100
101/// Methods declared on superclass `NSViewController`.
102#[cfg(feature = "objc2-app-kit")]
103#[cfg(target_os = "macos")]
104impl SKCloudServiceSetupViewController {
105    extern_methods!(
106        #[unsafe(method(initWithNibName:bundle:))]
107        #[unsafe(method_family = init)]
108        pub unsafe fn initWithNibName_bundle(
109            this: Allocated<Self>,
110            nib_name_or_nil: Option<&NSNibName>,
111            nib_bundle_or_nil: Option<&NSBundle>,
112        ) -> Retained<Self>;
113
114        #[unsafe(method(initWithCoder:))]
115        #[unsafe(method_family = init)]
116        pub unsafe fn initWithCoder(
117            this: Allocated<Self>,
118            coder: &NSCoder,
119        ) -> Option<Retained<Self>>;
120    );
121}
122
123/// Methods declared on superclass `NSResponder`.
124#[cfg(feature = "objc2-app-kit")]
125#[cfg(target_os = "macos")]
126impl SKCloudServiceSetupViewController {
127    extern_methods!(
128        #[unsafe(method(init))]
129        #[unsafe(method_family = init)]
130        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
131    );
132}
133
134/// Methods declared on superclass `NSObject`.
135#[cfg(feature = "objc2-app-kit")]
136#[cfg(target_os = "macos")]
137impl SKCloudServiceSetupViewController {
138    extern_methods!(
139        #[unsafe(method(new))]
140        #[unsafe(method_family = new)]
141        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
142    );
143}
144
145extern_protocol!(
146    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupviewcontrollerdelegate?language=objc)
147    #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
148    pub unsafe trait SKCloudServiceSetupViewControllerDelegate: NSObjectProtocol {
149        #[cfg(feature = "objc2-app-kit")]
150        #[cfg(target_os = "macos")]
151        /// Sent when the view controller was dismissed.
152        #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
153        #[optional]
154        #[unsafe(method(cloudServiceSetupViewControllerDidDismiss:))]
155        #[unsafe(method_family = none)]
156        unsafe fn cloudServiceSetupViewControllerDidDismiss(
157            &self,
158            cloud_service_setup_view_controller: &SKCloudServiceSetupViewController,
159        );
160    }
161);
162
163extern "C" {
164    /// Action for setup entry point (of type SKCloudServiceSetupAction).
165    ///
166    /// See also [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupoptionsactionkey?language=objc)
167    pub static SKCloudServiceSetupOptionsActionKey: &'static SKCloudServiceSetupOptionsKey;
168}
169
170extern "C" {
171    /// Identifier of the iTunes Store item the user is trying to access which requires cloud service setup (NSNumber).
172    ///
173    /// See also [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupoptionsitunesitemidentifierkey?language=objc)
174    pub static SKCloudServiceSetupOptionsITunesItemIdentifierKey:
175        &'static SKCloudServiceSetupOptionsKey;
176}
177
178extern "C" {
179    /// iTunes Store affiliate token (NSString).
180    ///
181    /// See also [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupoptionsaffiliatetokenkey?language=objc)
182    pub static SKCloudServiceSetupOptionsAffiliateTokenKey: &'static SKCloudServiceSetupOptionsKey;
183}
184
185extern "C" {
186    /// iTunes Store affiliate campaign token (NSString).
187    ///
188    /// See also [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupoptionscampaigntokenkey?language=objc)
189    pub static SKCloudServiceSetupOptionsCampaignTokenKey: &'static SKCloudServiceSetupOptionsKey;
190}
191
192extern "C" {
193    /// Identifier used to select the main message presented to the user for this setup view (SKCloudServiceSetupMessageIdentifier).
194    /// When missing, the setup view will be configured in a way that is equivalent to using SKCloudServiceSetupMessageIdentifierJoin.
195    ///
196    /// See also [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupoptionsmessageidentifierkey?language=objc)
197    pub static SKCloudServiceSetupOptionsMessageIdentifierKey:
198        &'static SKCloudServiceSetupOptionsKey;
199}
200
201extern "C" {
202    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupactionsubscribe?language=objc)
203    pub static SKCloudServiceSetupActionSubscribe: &'static SKCloudServiceSetupAction;
204}
205
206extern "C" {
207    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupmessageidentifierjoin?language=objc)
208    pub static SKCloudServiceSetupMessageIdentifierJoin:
209        &'static SKCloudServiceSetupMessageIdentifier;
210}
211
212extern "C" {
213    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupmessageidentifierconnect?language=objc)
214    pub static SKCloudServiceSetupMessageIdentifierConnect:
215        &'static SKCloudServiceSetupMessageIdentifier;
216}
217
218extern "C" {
219    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupmessageidentifieraddmusic?language=objc)
220    pub static SKCloudServiceSetupMessageIdentifierAddMusic:
221        &'static SKCloudServiceSetupMessageIdentifier;
222}
223
224extern "C" {
225    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skcloudservicesetupmessageidentifierplaymusic?language=objc)
226    pub static SKCloudServiceSetupMessageIdentifierPlayMusic:
227        &'static SKCloudServiceSetupMessageIdentifier;
228}