Skip to main content

engage/generated/app/
filecommon.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-filecommon-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        r#enum::{Enum, IEnum},
11        valuetype::{IValueType, ValueType},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/filecommon/FileCommon_State.md"))]
15    #[repr(C)]
16    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17    pub struct FileCommon_State {
18        pub value: i32,
19    }
20    impl ::unity::ClassIdentity for FileCommon_State {
21        const NAME: &'static str = "FileCommon.State";
22        const NAMESPACE: &'static str = "App";
23
24        fn class() -> ::unity::Class {
25            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27        }
28    }
29    impl ::unity::IlType for FileCommon_State {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34    impl FileCommon_State {
35        pub fn none() -> Self {
36            Self { value: 0 }
37        }
38
39        pub fn r#async() -> Self {
40            Self { value: 1 }
41        }
42
43        pub fn done() -> Self {
44            Self { value: 2 }
45        }
46    }
47
48    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/filecommon/FileCommon.md"))]
49    #[::unity::class(namespace = "App", name = "FileCommon")]
50    #[parent(crate::system::object::Object)]
51    pub struct FileCommon {
52        #[static_field]
53        #[rename(name = "s_LockObject")]
54        pub s_lock_object: ::unity::IlInstance,
55        #[static_field]
56        #[rename(name = "s_Dictionary")]
57        pub s_dictionary: crate::system::collections::generic::dictionary_2::Dictionary_2<::unity::Il2CppString, crate::app::filedata::FileData>,
58        #[static_field]
59        #[rename(name = "s_PreAsyncList")]
60        pub s_pre_async_list: crate::system::collections::generic::list_1::List_1<crate::app::filedata::FileData>,
61        #[static_field]
62        #[rename(name = "s_PostAsyncList")]
63        pub s_post_async_list: crate::system::collections::generic::list_1::List_1<crate::app::filedata::FileData>,
64    }
65}
66
67#[cfg(feature = "app-filecommon-types")]
68pub use __types::*;
69
70#[cfg(feature = "app-filecommon")]
71impl FileCommon {
72    #[doc = "`ReadAllBytes(::unity::Il2CppString)` overload"]
73    pub fn read_all_bytes(path: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Array<u8> {
74        unsafe {
75            ::unity::il2cpp_call!((::unity::module_base()+0x26e8330usize)as*mut u8, ::unity::Array<u8> ;
76(::unity::Il2CppString)::core::convert::Into::into(path))
77        }
78    }
79
80    #[doc = "`GetFullPath(::unity::Il2CppString)` overload"]
81    pub fn get_full_path(path: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
82        unsafe {
83            ::unity::il2cpp_call!((::unity::module_base()+0x26e86a0usize)as*mut u8, ::unity::Il2CppString;
84(::unity::Il2CppString)::core::convert::Into::into(path))
85        }
86    }
87
88    #[doc = "`.cctor()` overload"]
89    pub fn cctor() -> () {
90        unsafe {
91            ::unity::il2cpp_call!((::unity::module_base()+0x26e88b0usize)as*mut u8,();
92            )
93        }
94    }
95}
96
97#[cfg(feature = "app-filecommon")]
98pub trait IFileCommonMethods: IFileCommon {
99    #[doc = "`.ctor()` overload"]
100    fn ctor(self) -> () {
101        unsafe {
102            let __receiver = <FileCommon as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103            ::unity::il2cpp_call!((::unity::module_base()+0x26e88a0usize)as*mut u8,();
104(FileCommon)__receiver)
105        }
106    }
107}
108
109#[cfg(feature = "app-filecommon")]
110impl<__T: IFileCommon> IFileCommonMethods for __T {}
111
112#[cfg(feature = "app-filecommon")]
113impl FileCommon {
114    pub fn read_all_bytes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
116    }
117
118    pub fn get_full_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
119        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
120    }
121
122    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
123        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
124    }
125
126    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
128    }
129}
130
131#[cfg(feature = "app-filecommon")]
132impl FileCommon {
133    #[doc = "`.ctor()` — no args"]
134    pub fn new() -> Self {
135        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
136            panic!(
137                "{}
138::{}
139 failed to instantiate",
140                ::core::stringify!(FileCommon),
141                ::core::stringify!(new),
142            )
143        });
144        <Self as IFileCommonMethods>::ctor(this);
145        this
146    }
147}
148
149#[cfg(feature = "app-filecommon")]
150#[doc(hidden)]
151pub mod prelude {
152    pub use super::{FileCommon, FileCommon_State, IFileCommon, IFileCommonMethods};
153    #[cfg(feature = "system-object")]
154    pub use crate::system::object::IObjectMethods;
155    #[cfg(feature = "system-enum")]
156    pub use crate::system::r#enum::IEnumMethods;
157    #[cfg(feature = "system-valuetype")]
158    pub use crate::system::valuetype::IValueTypeMethods;
159    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
160}