engage/generated/unity_engine/networking/
downloadhandler.rs1#[cfg(feature = "unity_engine-networking-downloadhandler-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/networking/downloadhandler/DownloadHandler.md"))]
11 #[::unity::class(namespace = "UnityEngine.Networking", name = "DownloadHandler")]
12 #[parent(crate::system::object::Object)]
13 pub struct DownloadHandler {
14 #[offset(16)]
15 #[rename(name = "m_Ptr")]
16 pub m_ptr: ::unity::IntPtr,
17 }
18}
19
20#[cfg(feature = "unity_engine-networking-downloadhandler-types")]
21pub use __types::*;
22
23#[cfg(feature = "unity_engine-networking-downloadhandler")]
24impl DownloadHandler {
25 #[doc = "`InternalGetByteArray(crate::unity_engine::networking::downloadhandler::DownloadHandler)` overload"]
26 pub fn internal_get_byte_array(
27 dh: impl ::core::convert::Into<crate::unity_engine::networking::downloadhandler::DownloadHandler>,
28 ) -> ::unity::Array<u8> {
29 unsafe {
30 ::unity::il2cpp_call!((::unity::module_base()+0x3f18940usize)as*mut u8, ::unity::Array<u8> ;
31(crate::unity_engine::networking::downloadhandler::DownloadHandler)::core::convert::Into::into(dh))
32 }
33 }
34}
35
36#[cfg(feature = "unity_engine-networking-downloadhandler")]
37pub trait IDownloadHandlerMethods: IDownloadHandler {
38 #[doc = "`Release()` overload"]
39 fn release(self) -> () {
40 unsafe {
41 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
42 ::unity::il2cpp_call!((::unity::module_base()+0x3f18320usize)as*mut u8,();
43(DownloadHandler)__receiver)
44 }
45 }
46 #[doc = "`.ctor()` overload"]
47 fn ctor(self) -> () {
48 unsafe {
49 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50 ::unity::il2cpp_call!((::unity::module_base()+0x3f18370usize)as*mut u8,();
51(DownloadHandler)__receiver)
52 }
53 }
54 #[doc = "`Finalize()` overload"]
55 fn finalize(self) -> () {
56 unsafe {
57 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
58 {
59 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
60 let __vi = *__vt.get(1usize).unwrap_or_else(|| {
61 panic!(
62 "unity: virtual slot {}
63 out of range (vtable len {}
64) on the runtime class behind {}
65 (method `{}
66`)",
67 1usize,
68 __vt.len(),
69 <DownloadHandler as ::unity::ClassIdentity>::NAME,
70 "Finalize",
71 )
72 });
73 let __inner: extern "C" fn(DownloadHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
74 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
75 __inner(__receiver, __mi)
76 }
77 }
78 }
79 #[doc = "`Dispose()` overload"]
80 fn dispose(self) -> () {
81 unsafe {
82 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83 {
84 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
85 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
86 panic!(
87 "unity: virtual slot {}
88 out of range (vtable len {}
89) on the runtime class behind {}
90 (method `{}
91`)",
92 4usize,
93 __vt.len(),
94 <DownloadHandler as ::unity::ClassIdentity>::NAME,
95 "Dispose",
96 )
97 });
98 let __inner: extern "C" fn(DownloadHandler, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
99 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
100 __inner(__receiver, __mi)
101 }
102 }
103 }
104 #[doc = "`get_error()` overload"]
105 fn get_error(self) -> ::unity::Il2CppString {
106 unsafe {
107 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108 ::unity::il2cpp_call!((::unity::module_base()+0x3f184d0usize)as*mut u8, ::unity::Il2CppString;
109(DownloadHandler)__receiver)
110 }
111 }
112 #[doc = "`GetErrorMsg()` overload"]
113 fn get_error_msg(self) -> ::unity::Il2CppString {
114 unsafe {
115 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116 ::unity::il2cpp_call!((::unity::module_base()+0x3f18520usize)as*mut u8, ::unity::Il2CppString;
117(DownloadHandler)__receiver)
118 }
119 }
120 #[doc = "`get_data()` overload"]
121 fn get_data(self) -> ::unity::Array<u8> {
122 unsafe {
123 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124 ::unity::il2cpp_call!((::unity::module_base()+0x3f18570usize)as*mut u8, ::unity::Array<u8> ;
125(DownloadHandler)__receiver)
126 }
127 }
128 #[doc = "`get_text()` overload"]
129 fn get_text(self) -> ::unity::Il2CppString {
130 unsafe {
131 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132 ::unity::il2cpp_call!((::unity::module_base()+0x3f18580usize)as*mut u8, ::unity::Il2CppString;
133(DownloadHandler)__receiver)
134 }
135 }
136 #[doc = "`GetContentType()` overload"]
137 fn get_content_type(self) -> ::unity::Il2CppString {
138 unsafe {
139 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 ::unity::il2cpp_call!((::unity::module_base()+0x3f188d0usize)as*mut u8, ::unity::Il2CppString;
141(DownloadHandler)__receiver)
142 }
143 }
144 #[doc = "`ReceiveContentLengthHeader(u64)` overload"]
145 fn receive_content_length_header(self, content_length: impl ::core::convert::Into<u64>) -> () {
146 unsafe {
147 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148 {
149 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
150 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
151 panic!(
152 "unity: virtual slot {}
153 out of range (vtable len {}
154) on the runtime class behind {}
155 (method `{}
156`)",
157 7usize,
158 __vt.len(),
159 <DownloadHandler as ::unity::ClassIdentity>::NAME,
160 "ReceiveContentLengthHeader",
161 )
162 });
163 let __inner: extern "C" fn(DownloadHandler, u64, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
164 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
165 __inner(__receiver, ::core::convert::Into::into(content_length), __mi)
166 }
167 }
168 }
169 #[doc = "`ReceiveContentLength(i32)` overload"]
170 fn receive_content_length(self, content_length: impl ::core::convert::Into<i32>) -> () {
171 unsafe {
172 let __receiver = <DownloadHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
173 {
174 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
175 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
176 panic!(
177 "unity: virtual slot {}
178 out of range (vtable len {}
179) on the runtime class behind {}
180 (method `{}
181`)",
182 8usize,
183 __vt.len(),
184 <DownloadHandler as ::unity::ClassIdentity>::NAME,
185 "ReceiveContentLength",
186 )
187 });
188 let __inner: extern "C" fn(DownloadHandler, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
189 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
190 __inner(__receiver, ::core::convert::Into::into(content_length), __mi)
191 }
192 }
193 }
194}
195
196#[cfg(feature = "unity_engine-networking-downloadhandler")]
197impl<__T: IDownloadHandler> IDownloadHandlerMethods for __T {}
198
199#[cfg(feature = "unity_engine-networking-downloadhandler")]
200impl DownloadHandler {
201 pub fn release_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
203 }
204
205 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
207 }
208
209 pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
211 }
212
213 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
215 }
216
217 pub fn get_error_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
219 }
220
221 pub fn get_error_msg_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
223 }
224
225 pub fn get_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
227 }
228
229 pub fn get_text_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
231 }
232
233 pub fn get_content_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
235 }
236
237 pub fn receive_content_length_header_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
239 }
240
241 pub fn receive_content_length_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
243 }
244
245 pub fn internal_get_byte_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
247 }
248}
249
250#[cfg(feature = "unity_engine-networking-downloadhandler")]
251impl DownloadHandler {
252 #[doc = "Direct (non-virtual) call to `DownloadHandler`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
253 pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
254 let __mi = Self::finalize_method_info();
255 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
256 __inner(this.into(), ::core::option::Option::None)
257 }
258
259 #[doc = "Direct (non-virtual) call to `DownloadHandler`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
260 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
261 let __mi = Self::dispose_method_info();
262 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
263 __inner(this.into(), ::core::option::Option::None)
264 }
265
266 #[doc = "Direct (non-virtual) call to `DownloadHandler`'s own `ReceiveContentLengthHeader`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
267 pub unsafe fn receive_content_length_header(this: impl ::core::convert::Into<::unity::IlInstance>, content_length: u64) -> () {
268 let __mi = Self::receive_content_length_header_method_info();
269 let __inner: extern "C" fn(::unity::IlInstance, u64, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
270 __inner(this.into(), content_length, ::core::option::Option::None)
271 }
272
273 #[doc = "Direct (non-virtual) call to `DownloadHandler`'s own `ReceiveContentLength`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
274 pub unsafe fn receive_content_length(this: impl ::core::convert::Into<::unity::IlInstance>, content_length: i32) -> () {
275 let __mi = Self::receive_content_length_method_info();
276 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
277 __inner(this.into(), content_length, ::core::option::Option::None)
278 }
279}
280
281#[cfg(feature = "unity_engine-networking-downloadhandler")]
282impl DownloadHandler {
283 #[doc = "`.ctor()` — no args"]
284 pub fn new() -> Self {
285 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
286 panic!(
287 "{}
288::{}
289 failed to instantiate",
290 ::core::stringify!(DownloadHandler),
291 ::core::stringify!(new),
292 )
293 });
294 <Self as IDownloadHandlerMethods>::ctor(this);
295 this
296 }
297}
298
299#[cfg(feature = "unity_engine-networking-downloadhandler")]
300#[doc(hidden)]
301pub mod prelude {
302 pub use super::{DownloadHandler, IDownloadHandler, IDownloadHandlerMethods};
303 pub use crate::system::object::IObject;
304 #[cfg(feature = "system-object")]
305 pub use crate::system::object::IObjectMethods;
306}