objc2_core_telephony/generated/
CTTelephonyNetworkInfo.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 pub static CTServiceRadioAccessTechnologyDidChangeNotification: &'static NSString;
13}
14
15extern "C" {
16 pub static CTRadioAccessTechnologyDidChangeNotification: &'static NSString;
18}
19
20extern "C" {
21 pub static CTRadioAccessTechnologyGPRS: &'static NSString;
23}
24
25extern "C" {
26 pub static CTRadioAccessTechnologyEdge: &'static NSString;
28}
29
30extern "C" {
31 pub static CTRadioAccessTechnologyWCDMA: &'static NSString;
33}
34
35extern "C" {
36 pub static CTRadioAccessTechnologyHSDPA: &'static NSString;
38}
39
40extern "C" {
41 pub static CTRadioAccessTechnologyHSUPA: &'static NSString;
43}
44
45extern "C" {
46 pub static CTRadioAccessTechnologyCDMA1x: &'static NSString;
48}
49
50extern "C" {
51 pub static CTRadioAccessTechnologyCDMAEVDORev0: &'static NSString;
53}
54
55extern "C" {
56 pub static CTRadioAccessTechnologyCDMAEVDORevA: &'static NSString;
58}
59
60extern "C" {
61 pub static CTRadioAccessTechnologyCDMAEVDORevB: &'static NSString;
63}
64
65extern "C" {
66 pub static CTRadioAccessTechnologyeHRPD: &'static NSString;
68}
69
70extern "C" {
71 pub static CTRadioAccessTechnologyLTE: &'static NSString;
73}
74
75extern "C" {
76 pub static CTRadioAccessTechnologyNRNSA: &'static NSString;
78}
79
80extern "C" {
81 pub static CTRadioAccessTechnologyNR: &'static NSString;
83}
84
85extern_protocol!(
86 pub unsafe trait CTTelephonyNetworkInfoDelegate: NSObjectProtocol {
88 #[optional]
89 #[unsafe(method(dataServiceIdentifierDidChange:))]
90 #[unsafe(method_family = none)]
91 unsafe fn dataServiceIdentifierDidChange(&self, identifier: &NSString);
92 }
93);
94
95extern_class!(
96 #[unsafe(super(NSObject))]
98 #[derive(Debug, PartialEq, Eq, Hash)]
99 pub struct CTTelephonyNetworkInfo;
100);
101
102extern_conformance!(
103 unsafe impl NSObjectProtocol for CTTelephonyNetworkInfo {}
104);
105
106impl CTTelephonyNetworkInfo {
107 extern_methods!(
108 #[unsafe(method(dataServiceIdentifier))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn dataServiceIdentifier(&self) -> Option<Retained<NSString>>;
111
112 #[unsafe(method(delegate))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn delegate(
115 &self,
116 ) -> Option<Retained<ProtocolObject<dyn CTTelephonyNetworkInfoDelegate>>>;
117
118 #[unsafe(method(setDelegate:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setDelegate(
123 &self,
124 delegate: Option<&ProtocolObject<dyn CTTelephonyNetworkInfoDelegate>>,
125 );
126
127 #[cfg(feature = "CTCarrier")]
128 #[deprecated = "Deprecated with no replacement"]
129 #[unsafe(method(serviceSubscriberCellularProviders))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn serviceSubscriberCellularProviders(
132 &self,
133 ) -> Option<Retained<NSDictionary<NSString, CTCarrier>>>;
134
135 #[cfg(feature = "CTCarrier")]
136 #[deprecated]
137 #[unsafe(method(subscriberCellularProvider))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn subscriberCellularProvider(&self) -> Option<Retained<CTCarrier>>;
140
141 #[cfg(feature = "block2")]
142 #[deprecated = "Deprecated with no replacement"]
143 #[unsafe(method(serviceSubscriberCellularProvidersDidUpdateNotifier))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn serviceSubscriberCellularProvidersDidUpdateNotifier(
146 &self,
147 ) -> *mut block2::DynBlock<dyn Fn(NonNull<NSString>)>;
148
149 #[cfg(feature = "block2")]
150 #[deprecated = "Deprecated with no replacement"]
152 #[unsafe(method(setServiceSubscriberCellularProvidersDidUpdateNotifier:))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn setServiceSubscriberCellularProvidersDidUpdateNotifier(
155 &self,
156 service_subscriber_cellular_providers_did_update_notifier: Option<
157 &block2::DynBlock<dyn Fn(NonNull<NSString>)>,
158 >,
159 );
160
161 #[cfg(all(feature = "CTCarrier", feature = "block2"))]
162 #[deprecated]
163 #[unsafe(method(subscriberCellularProviderDidUpdateNotifier))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn subscriberCellularProviderDidUpdateNotifier(
166 &self,
167 ) -> *mut block2::DynBlock<dyn Fn(NonNull<CTCarrier>)>;
168
169 #[cfg(all(feature = "CTCarrier", feature = "block2"))]
170 #[deprecated]
172 #[unsafe(method(setSubscriberCellularProviderDidUpdateNotifier:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn setSubscriberCellularProviderDidUpdateNotifier(
175 &self,
176 subscriber_cellular_provider_did_update_notifier: Option<
177 &block2::DynBlock<dyn Fn(NonNull<CTCarrier>)>,
178 >,
179 );
180
181 #[unsafe(method(serviceCurrentRadioAccessTechnology))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn serviceCurrentRadioAccessTechnology(
184 &self,
185 ) -> Option<Retained<NSDictionary<NSString, NSString>>>;
186
187 #[deprecated]
188 #[unsafe(method(currentRadioAccessTechnology))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn currentRadioAccessTechnology(&self) -> Option<Retained<NSString>>;
191 );
192}
193
194impl CTTelephonyNetworkInfo {
196 extern_methods!(
197 #[unsafe(method(init))]
198 #[unsafe(method_family = init)]
199 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
200
201 #[unsafe(method(new))]
202 #[unsafe(method_family = new)]
203 pub unsafe fn new() -> Retained<Self>;
204 );
205}