objc2_store_kit/generated/
SKCloudServiceSetupViewController.rs1use 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
13pub type SKCloudServiceSetupOptionsKey = NSString;
16
17pub type SKCloudServiceSetupAction = NSString;
20
21pub type SKCloudServiceSetupMessageIdentifier = NSString;
24
25extern_class!(
26 #[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 #[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 #[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 #[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#[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#[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#[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 #[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 #[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 pub static SKCloudServiceSetupOptionsActionKey: &'static SKCloudServiceSetupOptionsKey;
168}
169
170extern "C" {
171 pub static SKCloudServiceSetupOptionsITunesItemIdentifierKey:
175 &'static SKCloudServiceSetupOptionsKey;
176}
177
178extern "C" {
179 pub static SKCloudServiceSetupOptionsAffiliateTokenKey: &'static SKCloudServiceSetupOptionsKey;
183}
184
185extern "C" {
186 pub static SKCloudServiceSetupOptionsCampaignTokenKey: &'static SKCloudServiceSetupOptionsKey;
190}
191
192extern "C" {
193 pub static SKCloudServiceSetupOptionsMessageIdentifierKey:
198 &'static SKCloudServiceSetupOptionsKey;
199}
200
201extern "C" {
202 pub static SKCloudServiceSetupActionSubscribe: &'static SKCloudServiceSetupAction;
204}
205
206extern "C" {
207 pub static SKCloudServiceSetupMessageIdentifierJoin:
209 &'static SKCloudServiceSetupMessageIdentifier;
210}
211
212extern "C" {
213 pub static SKCloudServiceSetupMessageIdentifierConnect:
215 &'static SKCloudServiceSetupMessageIdentifier;
216}
217
218extern "C" {
219 pub static SKCloudServiceSetupMessageIdentifierAddMusic:
221 &'static SKCloudServiceSetupMessageIdentifier;
222}
223
224extern "C" {
225 pub static SKCloudServiceSetupMessageIdentifierPlayMusic:
227 &'static SKCloudServiceSetupMessageIdentifier;
228}