#pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.Threading; using System.ComponentModel; namespace Efl { /// Efl file interface /// (Since EFL 1.22) [Efl.IFileConcrete.NativeMethods] public interface IFile : Efl.Eo.IWrapper, IDisposable { /// Get the mmaped file from where an object will fetch the real data (it must be an ). /// (Since EFL 1.22) /// The handle to the that will be used Eina.File GetMmap(); /// Set the mmaped file from where an object will fetch the real data (it must be an ). /// If mmap is set during object construction, the object will automatically call during the finalize phase of construction. /// (Since EFL 1.22) /// The handle to the that will be used /// 0 on success, error code otherwise Eina.Error SetMmap(Eina.File f); /// Retrieve the file path from where an object is to fetch the data. /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The file path. System.String GetFile(); /// Set the file path from where an object will fetch the data. /// If file is set during object construction, the object will automatically call during the finalize phase of construction. /// (Since EFL 1.22) /// The file path. /// 0 on success, error code otherwise Eina.Error SetFile(System.String file); /// Get the previously-set key which corresponds to the target data within a file. /// Some filetypes can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example or ). /// /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. System.String GetKey(); /// Set the key which corresponds to the target data within a file. /// Some filetypes can contain multiple data streams which are indexed by a key. Use this property for such cases. /// (Since EFL 1.22) /// The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. void SetKey(System.String key); /// Get the load state of the object. /// (Since EFL 1.22) /// true if the object is loaded, false otherwise. bool GetLoaded(); /// Perform all necessary operations to open and load file data into the object using the (or ) and properties. /// In the case where has been called on an object, this will internally open the file and call on the object using the opened file handle. /// /// Calling on an object which has already performed file operations based on the currently set properties will have no effect. /// (Since EFL 1.22) /// 0 on success, error code otherwise Eina.Error Load(); /// Perform all necessary operations to unload file data from the object. /// In the case where has been externally called on an object, the file handle stored in the object will be preserved. /// /// Calling on an object which is not currently loaded will have no effect. /// (Since EFL 1.22) void Unload(); /// Get the mmaped file from where an object will fetch the real data (it must be an ). /// (Since EFL 1.22) /// The handle to the that will be used Eina.File Mmap { get ; set ; } /// Retrieve the file path from where an object is to fetch the data. /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The file path. System.String File { get ; set ; } /// Get the previously-set key which corresponds to the target data within a file. /// Some filetypes can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example or ). /// /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. System.String Key { get ; set ; } /// Get the load state of the object. /// (Since EFL 1.22) /// true if the object is loaded, false otherwise. bool Loaded { get ; } } /// Efl file interface /// (Since EFL 1.22) sealed public class IFileConcrete : IFile { ///Pointer to the native class description. public System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(IFileConcrete)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } private System.IntPtr handle; ///Pointer to the native instance. public System.IntPtr NativeHandle { get { return handle; } } [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr efl_file_mixin_get(); /// Initializes a new instance of the class. /// Internal usage: This is used when interacting with C code and should not be used directly. private IFileConcrete(System.IntPtr raw) { handle = raw; } ///Destructor. ~IFileConcrete() { Dispose(false); } ///Releases the underlying native instance. private void Dispose(bool disposing) { if (handle != System.IntPtr.Zero) { IntPtr h = handle; handle = IntPtr.Zero; IntPtr gcHandlePtr = IntPtr.Zero; if (disposing) { Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr); } else { Monitor.Enter(Efl.All.InitLock); if (Efl.All.MainLoopInitialized) { Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr); } Monitor.Exit(Efl.All.InitLock); } } } ///Releases the underlying native instance. public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } /// Verifies if the given object is equal to this one. /// The object to compare to. /// True if both objects point to the same native object. public override bool Equals(object instance) { var other = instance as Efl.Object; if (other == null) { return false; } return this.NativeHandle == other.NativeHandle; } /// Gets the hash code for this object based on the native pointer it points to. /// The value of the pointer, to be used as the hash code of this object. public override int GetHashCode() { return this.NativeHandle.ToInt32(); } /// Turns the native pointer into a string representation. /// A string with the type and the native pointer for this object. public override String ToString() { return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]"; } /// Get the mmaped file from where an object will fetch the real data (it must be an ). /// (Since EFL 1.22) /// The handle to the that will be used public Eina.File GetMmap() { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_mmap_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Set the mmaped file from where an object will fetch the real data (it must be an ). /// If mmap is set during object construction, the object will automatically call during the finalize phase of construction. /// (Since EFL 1.22) /// The handle to the that will be used /// 0 on success, error code otherwise public Eina.Error SetMmap(Eina.File f) { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_mmap_set_ptr.Value.Delegate(this.NativeHandle,f); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Retrieve the file path from where an object is to fetch the data. /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The file path. public System.String GetFile() { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Set the file path from where an object will fetch the data. /// If file is set during object construction, the object will automatically call during the finalize phase of construction. /// (Since EFL 1.22) /// The file path. /// 0 on success, error code otherwise public Eina.Error SetFile(System.String file) { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_set_ptr.Value.Delegate(this.NativeHandle,file); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Get the previously-set key which corresponds to the target data within a file. /// Some filetypes can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example or ). /// /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. public System.String GetKey() { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_key_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Set the key which corresponds to the target data within a file. /// Some filetypes can contain multiple data streams which are indexed by a key. Use this property for such cases. /// (Since EFL 1.22) /// The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. public void SetKey(System.String key) { Efl.IFileConcrete.NativeMethods.efl_file_key_set_ptr.Value.Delegate(this.NativeHandle,key); Eina.Error.RaiseIfUnhandledException(); } /// Get the load state of the object. /// (Since EFL 1.22) /// true if the object is loaded, false otherwise. public bool GetLoaded() { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_loaded_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Perform all necessary operations to open and load file data into the object using the (or ) and properties. /// In the case where has been called on an object, this will internally open the file and call on the object using the opened file handle. /// /// Calling on an object which has already performed file operations based on the currently set properties will have no effect. /// (Since EFL 1.22) /// 0 on success, error code otherwise public Eina.Error Load() { var _ret_var = Efl.IFileConcrete.NativeMethods.efl_file_load_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Perform all necessary operations to unload file data from the object. /// In the case where has been externally called on an object, the file handle stored in the object will be preserved. /// /// Calling on an object which is not currently loaded will have no effect. /// (Since EFL 1.22) public void Unload() { Efl.IFileConcrete.NativeMethods.efl_file_unload_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); } /// Get the mmaped file from where an object will fetch the real data (it must be an ). /// (Since EFL 1.22) /// The handle to the that will be used public Eina.File Mmap { get { return GetMmap(); } set { SetMmap(value); } } /// Retrieve the file path from where an object is to fetch the data. /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The file path. public System.String File { get { return GetFile(); } set { SetFile(value); } } /// Get the previously-set key which corresponds to the target data within a file. /// Some filetypes can contain multiple data streams which are indexed by a key. Use this property for such cases (See for example or ). /// /// You must not modify the strings on the returned pointers. /// (Since EFL 1.22) /// The group that the data belongs to. See the class documentation for particular implementations of this interface to see how this property is used. public System.String Key { get { return GetKey(); } set { SetKey(value); } } /// Get the load state of the object. /// (Since EFL 1.22) /// true if the object is loaded, false otherwise. public bool Loaded { get { return GetLoaded(); } } private static IntPtr GetEflClassStatic() { return Efl.IFileConcrete.efl_file_mixin_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public class NativeMethods : Efl.Eo.NativeClass { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl); /// Gets the list of Eo operations to override. /// The list of Eo operations to be overload. public override System.Collections.Generic.List GetEoOps(System.Type type) { var descs = new System.Collections.Generic.List(); var methods = Efl.Eo.Globals.GetUserMethods(type); if (efl_file_mmap_get_static_delegate == null) { efl_file_mmap_get_static_delegate = new efl_file_mmap_get_delegate(mmap_get); } if (methods.FirstOrDefault(m => m.Name == "GetMmap") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_mmap_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_mmap_get_static_delegate) }); } if (efl_file_mmap_set_static_delegate == null) { efl_file_mmap_set_static_delegate = new efl_file_mmap_set_delegate(mmap_set); } if (methods.FirstOrDefault(m => m.Name == "SetMmap") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_mmap_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_mmap_set_static_delegate) }); } if (efl_file_get_static_delegate == null) { efl_file_get_static_delegate = new efl_file_get_delegate(file_get); } if (methods.FirstOrDefault(m => m.Name == "GetFile") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_get_static_delegate) }); } if (efl_file_set_static_delegate == null) { efl_file_set_static_delegate = new efl_file_set_delegate(file_set); } if (methods.FirstOrDefault(m => m.Name == "SetFile") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_set_static_delegate) }); } if (efl_file_key_get_static_delegate == null) { efl_file_key_get_static_delegate = new efl_file_key_get_delegate(key_get); } if (methods.FirstOrDefault(m => m.Name == "GetKey") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_key_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_key_get_static_delegate) }); } if (efl_file_key_set_static_delegate == null) { efl_file_key_set_static_delegate = new efl_file_key_set_delegate(key_set); } if (methods.FirstOrDefault(m => m.Name == "SetKey") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_key_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_key_set_static_delegate) }); } if (efl_file_loaded_get_static_delegate == null) { efl_file_loaded_get_static_delegate = new efl_file_loaded_get_delegate(loaded_get); } if (methods.FirstOrDefault(m => m.Name == "GetLoaded") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_loaded_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_loaded_get_static_delegate) }); } if (efl_file_load_static_delegate == null) { efl_file_load_static_delegate = new efl_file_load_delegate(load); } if (methods.FirstOrDefault(m => m.Name == "Load") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_load"), func = Marshal.GetFunctionPointerForDelegate(efl_file_load_static_delegate) }); } if (efl_file_unload_static_delegate == null) { efl_file_unload_static_delegate = new efl_file_unload_delegate(unload); } if (methods.FirstOrDefault(m => m.Name == "Unload") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_unload"), func = Marshal.GetFunctionPointerForDelegate(efl_file_unload_static_delegate) }); } return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.IFileConcrete.efl_file_mixin_get(); } #pragma warning disable CA1707, SA1300, SA1600 private delegate Eina.File efl_file_mmap_get_delegate(System.IntPtr obj, System.IntPtr pd); public delegate Eina.File efl_file_mmap_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_file_mmap_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_mmap_get"); private static Eina.File mmap_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_file_mmap_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Eina.File _ret_var = default(Eina.File); try { _ret_var = ((IFileConcrete)wrapper).GetMmap(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_mmap_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_file_mmap_get_delegate efl_file_mmap_get_static_delegate; private delegate Eina.Error efl_file_mmap_set_delegate(System.IntPtr obj, System.IntPtr pd, Eina.File f); public delegate Eina.Error efl_file_mmap_set_api_delegate(System.IntPtr obj, Eina.File f); public static Efl.Eo.FunctionWrapper efl_file_mmap_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_mmap_set"); private static Eina.Error mmap_set(System.IntPtr obj, System.IntPtr pd, Eina.File f) { Eina.Log.Debug("function efl_file_mmap_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Eina.Error _ret_var = default(Eina.Error); try { _ret_var = ((IFileConcrete)wrapper).SetMmap(f); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_mmap_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), f); } } private static efl_file_mmap_set_delegate efl_file_mmap_set_static_delegate; [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_file_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_file_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_file_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_get"); private static System.String file_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_file_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { System.String _ret_var = default(System.String); try { _ret_var = ((IFileConcrete)wrapper).GetFile(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_file_get_delegate efl_file_get_static_delegate; private delegate Eina.Error efl_file_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String file); public delegate Eina.Error efl_file_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String file); public static Efl.Eo.FunctionWrapper efl_file_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_set"); private static Eina.Error file_set(System.IntPtr obj, System.IntPtr pd, System.String file) { Eina.Log.Debug("function efl_file_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Eina.Error _ret_var = default(Eina.Error); try { _ret_var = ((IFileConcrete)wrapper).SetFile(file); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), file); } } private static efl_file_set_delegate efl_file_set_static_delegate; [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_file_key_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_file_key_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_file_key_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_key_get"); private static System.String key_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_file_key_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { System.String _ret_var = default(System.String); try { _ret_var = ((IFileConcrete)wrapper).GetKey(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_key_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_file_key_get_delegate efl_file_key_get_static_delegate; private delegate void efl_file_key_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key); public delegate void efl_file_key_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String key); public static Efl.Eo.FunctionWrapper efl_file_key_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_key_set"); private static void key_set(System.IntPtr obj, System.IntPtr pd, System.String key) { Eina.Log.Debug("function efl_file_key_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { try { ((IFileConcrete)wrapper).SetKey(key); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_file_key_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), key); } } private static efl_file_key_set_delegate efl_file_key_set_static_delegate; [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_file_loaded_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_file_loaded_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_file_loaded_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_loaded_get"); private static bool loaded_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_file_loaded_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { bool _ret_var = default(bool); try { _ret_var = ((IFileConcrete)wrapper).GetLoaded(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_loaded_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_file_loaded_get_delegate efl_file_loaded_get_static_delegate; private delegate Eina.Error efl_file_load_delegate(System.IntPtr obj, System.IntPtr pd); public delegate Eina.Error efl_file_load_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_file_load_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_load"); private static Eina.Error load(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_file_load was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { Eina.Error _ret_var = default(Eina.Error); try { _ret_var = ((IFileConcrete)wrapper).Load(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_file_load_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_file_load_delegate efl_file_load_static_delegate; private delegate void efl_file_unload_delegate(System.IntPtr obj, System.IntPtr pd); public delegate void efl_file_unload_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_file_unload_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_file_unload"); private static void unload(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_file_unload was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { try { ((IFileConcrete)wrapper).Unload(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_file_unload_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_file_unload_delegate efl_file_unload_static_delegate; #pragma warning restore CA1707, SA1300, SA1600 } } }