4f8faccdbc258fc2801c329c5306de0d331308d6
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_cached_item.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Cached {
11
12 /// <summary>Efl Cached Item interface</summary>
13 [Efl.Cached.IItemConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IItem : 
16     Efl.Eo.IWrapper, IDisposable
17 {
18     /// <summary>Get the memory size associated with an object.</summary>
19 /// <returns>Bytes of memory consumed by this object.</returns>
20 uint GetMemorySize();
21         /// <summary>Get the memory size associated with an object.</summary>
22     /// <value>Bytes of memory consumed by this object.</value>
23     uint MemorySize {
24         get ;
25     }
26 }
27 /// <summary>Efl Cached Item interface</summary>
28 sealed public class IItemConcrete :
29     Efl.Eo.EoWrapper
30     , IItem
31     
32 {
33     ///<summary>Pointer to the native class description.</summary>
34     public override System.IntPtr NativeClass
35     {
36         get
37         {
38             if (((object)this).GetType() == typeof(IItemConcrete))
39             {
40                 return GetEflClassStatic();
41             }
42             else
43             {
44                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
45             }
46         }
47     }
48
49     /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
50     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
51     private IItemConcrete(ConstructingHandle ch) : base(ch)
52     {
53     }
54
55     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
56         efl_cached_item_interface_get();
57     /// <summary>Initializes a new instance of the <see cref="IItem"/> class.
58     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
59     /// <param name="wh">The native pointer to be wrapped.</param>
60     private IItemConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
61     {
62     }
63
64     /// <summary>Get the memory size associated with an object.</summary>
65     /// <returns>Bytes of memory consumed by this object.</returns>
66     public uint GetMemorySize() {
67          var _ret_var = Efl.Cached.IItemConcrete.NativeMethods.efl_cached_item_memory_size_get_ptr.Value.Delegate(this.NativeHandle);
68         Eina.Error.RaiseIfUnhandledException();
69         return _ret_var;
70  }
71     /// <summary>Get the memory size associated with an object.</summary>
72     /// <value>Bytes of memory consumed by this object.</value>
73     public uint MemorySize {
74         get { return GetMemorySize(); }
75     }
76     private static IntPtr GetEflClassStatic()
77     {
78         return Efl.Cached.IItemConcrete.efl_cached_item_interface_get();
79     }
80     /// <summary>Wrapper for native methods and virtual method delegates.
81     /// For internal use by generated code only.</summary>
82     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
83     {
84         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
85         /// <summary>Gets the list of Eo operations to override.</summary>
86         /// <returns>The list of Eo operations to be overload.</returns>
87         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
88         {
89             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
90             var methods = Efl.Eo.Globals.GetUserMethods(type);
91
92             if (efl_cached_item_memory_size_get_static_delegate == null)
93             {
94                 efl_cached_item_memory_size_get_static_delegate = new efl_cached_item_memory_size_get_delegate(memory_size_get);
95             }
96
97             if (methods.FirstOrDefault(m => m.Name == "GetMemorySize") != null)
98             {
99                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_cached_item_memory_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_cached_item_memory_size_get_static_delegate) });
100             }
101
102             return descs;
103         }
104         /// <summary>Returns the Eo class for the native methods of this class.</summary>
105         /// <returns>The native class pointer.</returns>
106         public override IntPtr GetEflClass()
107         {
108             return Efl.Cached.IItemConcrete.efl_cached_item_interface_get();
109         }
110
111         #pragma warning disable CA1707, CS1591, SA1300, SA1600
112
113         
114         private delegate uint efl_cached_item_memory_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
115
116         
117         public delegate uint efl_cached_item_memory_size_get_api_delegate(System.IntPtr obj);
118
119         public static Efl.Eo.FunctionWrapper<efl_cached_item_memory_size_get_api_delegate> efl_cached_item_memory_size_get_ptr = new Efl.Eo.FunctionWrapper<efl_cached_item_memory_size_get_api_delegate>(Module, "efl_cached_item_memory_size_get");
120
121         private static uint memory_size_get(System.IntPtr obj, System.IntPtr pd)
122         {
123             Eina.Log.Debug("function efl_cached_item_memory_size_get was called");
124             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
125             if (ws != null)
126             {
127             uint _ret_var = default(uint);
128                 try
129                 {
130                     _ret_var = ((IItem)ws.Target).GetMemorySize();
131                 }
132                 catch (Exception e)
133                 {
134                     Eina.Log.Warning($"Callback error: {e.ToString()}");
135                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
136                 }
137
138         return _ret_var;
139
140             }
141             else
142             {
143                 return efl_cached_item_memory_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
144             }
145         }
146
147         private static efl_cached_item_memory_size_get_delegate efl_cached_item_memory_size_get_static_delegate;
148
149         #pragma warning restore CA1707, CS1591, SA1300, SA1600
150
151 }
152 }
153 }
154
155 }
156