1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// Account details for accessing a streaming media service.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/mediasetup/msserviceaccount?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MSServiceAccount;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MSServiceAccount {}
);
impl MSServiceAccount {
extern_methods!(
/// Creates a new account.
///
/// - Parameters:
/// - serviceName: The name of the streaming media service.
///
/// - accountName: The user’s display name in the streaming media service.
#[unsafe(method(initWithServiceName:accountName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithServiceName_accountName(
this: Allocated<Self>,
service_name: &NSString,
account_name: &NSString,
) -> Retained<Self>;
/// The localized name of the streaming media service.
#[unsafe(method(serviceName))]
#[unsafe(method_family = none)]
pub unsafe fn serviceName(&self) -> Retained<NSString>;
/// The user’s display name, email address, or other identifier in a streaming media service.
#[unsafe(method(accountName))]
#[unsafe(method_family = none)]
pub unsafe fn accountName(&self) -> Retained<NSString>;
/// A user identifier for the token request.
///
/// The Media Setup framework uses the ``MSServiceAccount/clientID`` to create a
/// token request. You can choose the identifier format, but the identifier must
/// be unique to the current account. You can provide a new identifier each time
/// the user begins the home setup.
#[unsafe(method(clientID))]
#[unsafe(method_family = none)]
pub unsafe fn clientID(&self) -> Option<Retained<NSString>>;
/// Setter for [`clientID`][Self::clientID].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setClientID:))]
#[unsafe(method_family = none)]
pub unsafe fn setClientID(&self, client_id: Option<&NSString>);
/// A string that authenticates the user’s setup request.
///
/// The Media Setup framework uses the `clientSecret` to create a token request.
/// Hashed passwords are acceptable, but plaintext passwords aren't.
#[unsafe(method(clientSecret))]
#[unsafe(method_family = none)]
pub unsafe fn clientSecret(&self) -> Option<Retained<NSString>>;
/// Setter for [`clientSecret`][Self::clientSecret].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setClientSecret:))]
#[unsafe(method_family = none)]
pub unsafe fn setClientSecret(&self, client_secret: Option<&NSString>);
/// The path to access the configuration endpoint of your streaming media
/// service for the home.
///
/// The device retrieves the configuration with the OAuth 2.0 Bearer token.
#[unsafe(method(configurationURL))]
#[unsafe(method_family = none)]
pub unsafe fn configurationURL(&self) -> Option<Retained<NSURL>>;
/// Setter for [`configurationURL`][Self::configurationURL].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setConfigurationURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setConfigurationURL(&self, configuration_url: Option<&NSURL>);
/// A URL that provides a token for the user’s HomePod speakers.
///
/// The authorization token URL is an OAuth 2.0 token service endpoint that provides a
/// Bearer Token for retrieving configuration.
#[unsafe(method(authorizationTokenURL))]
#[unsafe(method_family = none)]
pub unsafe fn authorizationTokenURL(&self) -> Option<Retained<NSURL>>;
/// Setter for [`authorizationTokenURL`][Self::authorizationTokenURL].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setAuthorizationTokenURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setAuthorizationTokenURL(&self, authorization_token_url: Option<&NSURL>);
/// A list of permissions for the token request.
///
/// The authorization scope is an optional OAuth 2.0 scope parameter the system provides
/// when requesting a token.
#[unsafe(method(authorizationScope))]
#[unsafe(method_family = none)]
pub unsafe fn authorizationScope(&self) -> Option<Retained<NSString>>;
/// Setter for [`authorizationScope`][Self::authorizationScope].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setAuthorizationScope:))]
#[unsafe(method_family = none)]
pub unsafe fn setAuthorizationScope(&self, authorization_scope: Option<&NSString>);
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}