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")]
37unsafe impl NSCoding for SKCloudServiceSetupViewController {}
38
39#[cfg(feature = "objc2-app-kit")]
40#[cfg(target_os = "macos")]
41unsafe impl NSEditor for SKCloudServiceSetupViewController {}
42
43#[cfg(feature = "objc2-app-kit")]
44#[cfg(target_os = "macos")]
45unsafe impl NSObjectProtocol for SKCloudServiceSetupViewController {}
46
47#[cfg(feature = "objc2-app-kit")]
48#[cfg(target_os = "macos")]
49unsafe impl NSSeguePerforming for SKCloudServiceSetupViewController {}
50
51#[cfg(feature = "objc2-app-kit")]
52#[cfg(target_os = "macos")]
53unsafe impl NSUserInterfaceItemIdentification for SKCloudServiceSetupViewController {}
54
55#[cfg(feature = "objc2-app-kit")]
56#[cfg(target_os = "macos")]
57impl SKCloudServiceSetupViewController {
58 extern_methods!(
59 #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
61 #[unsafe(method(delegate))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn delegate(
64 &self,
65 ) -> Option<Retained<ProtocolObject<dyn SKCloudServiceSetupViewControllerDelegate>>>;
66
67 #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
70 #[unsafe(method(setDelegate:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setDelegate(
73 &self,
74 delegate: Option<&ProtocolObject<dyn SKCloudServiceSetupViewControllerDelegate>>,
75 );
76
77 #[cfg(feature = "block2")]
78 #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
81 #[unsafe(method(loadWithOptions:completionHandler:))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn loadWithOptions_completionHandler(
84 &self,
85 options: &NSDictionary<SKCloudServiceSetupOptionsKey, AnyObject>,
86 completion_handler: Option<&block2::Block<dyn Fn(Bool, *mut NSError)>>,
87 );
88 );
89}
90
91#[cfg(feature = "objc2-app-kit")]
93#[cfg(target_os = "macos")]
94impl SKCloudServiceSetupViewController {
95 extern_methods!(
96 #[unsafe(method(initWithNibName:bundle:))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn initWithNibName_bundle(
99 this: Allocated<Self>,
100 nib_name_or_nil: Option<&NSNibName>,
101 nib_bundle_or_nil: Option<&NSBundle>,
102 ) -> Retained<Self>;
103
104 #[unsafe(method(initWithCoder:))]
105 #[unsafe(method_family = init)]
106 pub unsafe fn initWithCoder(
107 this: Allocated<Self>,
108 coder: &NSCoder,
109 ) -> Option<Retained<Self>>;
110 );
111}
112
113#[cfg(feature = "objc2-app-kit")]
115#[cfg(target_os = "macos")]
116impl SKCloudServiceSetupViewController {
117 extern_methods!(
118 #[unsafe(method(init))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
121 );
122}
123
124#[cfg(feature = "objc2-app-kit")]
126#[cfg(target_os = "macos")]
127impl SKCloudServiceSetupViewController {
128 extern_methods!(
129 #[unsafe(method(new))]
130 #[unsafe(method_family = new)]
131 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
132 );
133}
134
135extern_protocol!(
136 #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
138 pub unsafe trait SKCloudServiceSetupViewControllerDelegate: NSObjectProtocol {
139 #[cfg(feature = "objc2-app-kit")]
140 #[cfg(target_os = "macos")]
141 #[deprecated = "Use the musicSubscriptionOffer(isPresented:options:onLoadCompletion:) SwiftUI View Modifier from MusicKit"]
143 #[optional]
144 #[unsafe(method(cloudServiceSetupViewControllerDidDismiss:))]
145 #[unsafe(method_family = none)]
146 unsafe fn cloudServiceSetupViewControllerDidDismiss(
147 &self,
148 cloud_service_setup_view_controller: &SKCloudServiceSetupViewController,
149 );
150 }
151);
152
153extern "C" {
154 pub static SKCloudServiceSetupOptionsActionKey: &'static SKCloudServiceSetupOptionsKey;
158}
159
160extern "C" {
161 pub static SKCloudServiceSetupOptionsITunesItemIdentifierKey:
165 &'static SKCloudServiceSetupOptionsKey;
166}
167
168extern "C" {
169 pub static SKCloudServiceSetupOptionsAffiliateTokenKey: &'static SKCloudServiceSetupOptionsKey;
173}
174
175extern "C" {
176 pub static SKCloudServiceSetupOptionsCampaignTokenKey: &'static SKCloudServiceSetupOptionsKey;
180}
181
182extern "C" {
183 pub static SKCloudServiceSetupOptionsMessageIdentifierKey:
188 &'static SKCloudServiceSetupOptionsKey;
189}
190
191extern "C" {
192 pub static SKCloudServiceSetupActionSubscribe: &'static SKCloudServiceSetupAction;
194}
195
196extern "C" {
197 pub static SKCloudServiceSetupMessageIdentifierJoin:
199 &'static SKCloudServiceSetupMessageIdentifier;
200}
201
202extern "C" {
203 pub static SKCloudServiceSetupMessageIdentifierConnect:
205 &'static SKCloudServiceSetupMessageIdentifier;
206}
207
208extern "C" {
209 pub static SKCloudServiceSetupMessageIdentifierAddMusic:
211 &'static SKCloudServiceSetupMessageIdentifier;
212}
213
214extern "C" {
215 pub static SKCloudServiceSetupMessageIdentifierPlayMusic:
217 &'static SKCloudServiceSetupMessageIdentifier;
218}