[EflSharp] Update Circle and efl cs files (#896)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_core_env.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 Core {
11
12 /// <summary>This object can maintain a set of key value pairs
13 /// A object of this type alone does not apply the object to the system. For getting the value into the system, see <see cref="Efl.Core.ProcEnv"/>.
14 /// 
15 /// A object can be forked, which will only copy its values, changes to the returned object will not change the object where it is forked off.</summary>
16 [Efl.Core.Env.NativeMethods]
17 public class Env : Efl.Object, Efl.IDuplicate
18 {
19     ///<summary>Pointer to the native class description.</summary>
20     public override System.IntPtr NativeClass
21     {
22         get
23         {
24             if (((object)this).GetType() == typeof(Env))
25             {
26                 return GetEflClassStatic();
27             }
28             else
29             {
30                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
31             }
32         }
33     }
34
35     [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
36         efl_core_env_class_get();
37     /// <summary>Initializes a new instance of the <see cref="Env"/> class.</summary>
38     /// <param name="parent">Parent instance.</param>
39     public Env(Efl.Object parent= null
40             ) : base(efl_core_env_class_get(), typeof(Env), parent)
41     {
42         FinishInstantiation();
43     }
44
45     /// <summary>Initializes a new instance of the <see cref="Env"/> class.
46     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
47     /// <param name="raw">The native pointer to be wrapped.</param>
48     protected Env(System.IntPtr raw) : base(raw)
49     {
50     }
51
52     /// <summary>Initializes a new instance of the <see cref="Env"/> class.
53     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
54     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
55     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
56     /// <param name="parent">The Efl.Object parent of this instance.</param>
57     protected Env(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
58     {
59     }
60
61     /// <summary>Get the value of the <c>var</c>, or <c>null</c> if no such <c>var</c> exists in the object</summary>
62     /// <param name="var">The name of the variable</param>
63     /// <returns>Set var to this value if not <c>NULL</c>, otherwise clear this env value if value is <c>NULL</c> or if it is an empty string</returns>
64     virtual public System.String GetEnv(System.String var) {
65                                  var _ret_var = Efl.Core.Env.NativeMethods.efl_core_env_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),var);
66         Eina.Error.RaiseIfUnhandledException();
67                         return _ret_var;
68  }
69     /// <summary>Add a new pair to this object</summary>
70     /// <param name="var">The name of the variable</param>
71     /// <param name="value">Set var to this value if not <c>NULL</c>, otherwise clear this env value if value is <c>NULL</c> or if it is an empty string</param>
72     virtual public void SetEnv(System.String var, System.String value) {
73                                                          Efl.Core.Env.NativeMethods.efl_core_env_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),var, value);
74         Eina.Error.RaiseIfUnhandledException();
75                                          }
76     /// <summary>Get the content of this object.
77     /// This will return a iterator that contains all keys that are part of this object.</summary>
78     virtual public Eina.Iterator<System.String> GetContent() {
79          var _ret_var = Efl.Core.Env.NativeMethods.efl_core_env_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
80         Eina.Error.RaiseIfUnhandledException();
81         return new Eina.Iterator<System.String>(_ret_var, false, false);
82  }
83     /// <summary>Remove the pair with the matching <c>var</c> from this object</summary>
84     /// <param name="var">The name of the variable</param>
85     virtual public void Unset(System.String var) {
86                                  Efl.Core.Env.NativeMethods.efl_core_env_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),var);
87         Eina.Error.RaiseIfUnhandledException();
88                          }
89     /// <summary>Remove all pairs from this object</summary>
90     virtual public void Clear() {
91          Efl.Core.Env.NativeMethods.efl_core_env_clear_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
92         Eina.Error.RaiseIfUnhandledException();
93          }
94     /// <summary>Creates a carbon copy of this object and returns it.
95     /// The newly created object will have no event handlers or anything of the sort.</summary>
96     /// <returns>Returned carbon copy</returns>
97     virtual public Efl.IDuplicate Duplicate() {
98          var _ret_var = Efl.IDuplicateConcrete.NativeMethods.efl_duplicate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
99         Eina.Error.RaiseIfUnhandledException();
100         return _ret_var;
101  }
102     /// <summary>Get the content of this object.
103     /// This will return a iterator that contains all keys that are part of this object.</summary>
104     public Eina.Iterator<System.String> Content {
105         get { return GetContent(); }
106     }
107     private static IntPtr GetEflClassStatic()
108     {
109         return Efl.Core.Env.efl_core_env_class_get();
110     }
111     /// <summary>Wrapper for native methods and virtual method delegates.
112     /// For internal use by generated code only.</summary>
113     public new class NativeMethods : Efl.Object.NativeMethods
114     {
115         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Ecore);
116         /// <summary>Gets the list of Eo operations to override.</summary>
117         /// <returns>The list of Eo operations to be overload.</returns>
118         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
119         {
120             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
121             var methods = Efl.Eo.Globals.GetUserMethods(type);
122
123             if (efl_core_env_get_static_delegate == null)
124             {
125                 efl_core_env_get_static_delegate = new efl_core_env_get_delegate(env_get);
126             }
127
128             if (methods.FirstOrDefault(m => m.Name == "GetEnv") != null)
129             {
130                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_env_get"), func = Marshal.GetFunctionPointerForDelegate(efl_core_env_get_static_delegate) });
131             }
132
133             if (efl_core_env_set_static_delegate == null)
134             {
135                 efl_core_env_set_static_delegate = new efl_core_env_set_delegate(env_set);
136             }
137
138             if (methods.FirstOrDefault(m => m.Name == "SetEnv") != null)
139             {
140                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_env_set"), func = Marshal.GetFunctionPointerForDelegate(efl_core_env_set_static_delegate) });
141             }
142
143             if (efl_core_env_content_get_static_delegate == null)
144             {
145                 efl_core_env_content_get_static_delegate = new efl_core_env_content_get_delegate(content_get);
146             }
147
148             if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
149             {
150                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_env_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_core_env_content_get_static_delegate) });
151             }
152
153             if (efl_core_env_unset_static_delegate == null)
154             {
155                 efl_core_env_unset_static_delegate = new efl_core_env_unset_delegate(unset);
156             }
157
158             if (methods.FirstOrDefault(m => m.Name == "Unset") != null)
159             {
160                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_env_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_core_env_unset_static_delegate) });
161             }
162
163             if (efl_core_env_clear_static_delegate == null)
164             {
165                 efl_core_env_clear_static_delegate = new efl_core_env_clear_delegate(clear);
166             }
167
168             if (methods.FirstOrDefault(m => m.Name == "Clear") != null)
169             {
170                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_env_clear"), func = Marshal.GetFunctionPointerForDelegate(efl_core_env_clear_static_delegate) });
171             }
172
173             if (efl_duplicate_static_delegate == null)
174             {
175                 efl_duplicate_static_delegate = new efl_duplicate_delegate(duplicate);
176             }
177
178             if (methods.FirstOrDefault(m => m.Name == "Duplicate") != null)
179             {
180                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_duplicate"), func = Marshal.GetFunctionPointerForDelegate(efl_duplicate_static_delegate) });
181             }
182
183             descs.AddRange(base.GetEoOps(type));
184             return descs;
185         }
186         /// <summary>Returns the Eo class for the native methods of this class.</summary>
187         /// <returns>The native class pointer.</returns>
188         public override IntPtr GetEflClass()
189         {
190             return Efl.Core.Env.efl_core_env_class_get();
191         }
192
193         #pragma warning disable CA1707, CS1591, SA1300, SA1600
194
195         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
196         private delegate System.String efl_core_env_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String var);
197
198         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
199         public delegate System.String efl_core_env_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String var);
200
201         public static Efl.Eo.FunctionWrapper<efl_core_env_get_api_delegate> efl_core_env_get_ptr = new Efl.Eo.FunctionWrapper<efl_core_env_get_api_delegate>(Module, "efl_core_env_get");
202
203         private static System.String env_get(System.IntPtr obj, System.IntPtr pd, System.String var)
204         {
205             Eina.Log.Debug("function efl_core_env_get was called");
206             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
207             if (ws != null)
208             {
209                                     System.String _ret_var = default(System.String);
210                 try
211                 {
212                     _ret_var = ((Env)ws.Target).GetEnv(var);
213                 }
214                 catch (Exception e)
215                 {
216                     Eina.Log.Warning($"Callback error: {e.ToString()}");
217                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
218                 }
219
220                         return _ret_var;
221
222             }
223             else
224             {
225                 return efl_core_env_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), var);
226             }
227         }
228
229         private static efl_core_env_get_delegate efl_core_env_get_static_delegate;
230
231         
232         private delegate void efl_core_env_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String var, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String value);
233
234         
235         public delegate void efl_core_env_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String var, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String value);
236
237         public static Efl.Eo.FunctionWrapper<efl_core_env_set_api_delegate> efl_core_env_set_ptr = new Efl.Eo.FunctionWrapper<efl_core_env_set_api_delegate>(Module, "efl_core_env_set");
238
239         private static void env_set(System.IntPtr obj, System.IntPtr pd, System.String var, System.String value)
240         {
241             Eina.Log.Debug("function efl_core_env_set was called");
242             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
243             if (ws != null)
244             {
245                                                             
246                 try
247                 {
248                     ((Env)ws.Target).SetEnv(var, value);
249                 }
250                 catch (Exception e)
251                 {
252                     Eina.Log.Warning($"Callback error: {e.ToString()}");
253                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
254                 }
255
256                                         
257             }
258             else
259             {
260                 efl_core_env_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), var, value);
261             }
262         }
263
264         private static efl_core_env_set_delegate efl_core_env_set_static_delegate;
265
266         
267         private delegate System.IntPtr efl_core_env_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
268
269         
270         public delegate System.IntPtr efl_core_env_content_get_api_delegate(System.IntPtr obj);
271
272         public static Efl.Eo.FunctionWrapper<efl_core_env_content_get_api_delegate> efl_core_env_content_get_ptr = new Efl.Eo.FunctionWrapper<efl_core_env_content_get_api_delegate>(Module, "efl_core_env_content_get");
273
274         private static System.IntPtr content_get(System.IntPtr obj, System.IntPtr pd)
275         {
276             Eina.Log.Debug("function efl_core_env_content_get was called");
277             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
278             if (ws != null)
279             {
280             Eina.Iterator<System.String> _ret_var = default(Eina.Iterator<System.String>);
281                 try
282                 {
283                     _ret_var = ((Env)ws.Target).GetContent();
284                 }
285                 catch (Exception e)
286                 {
287                     Eina.Log.Warning($"Callback error: {e.ToString()}");
288                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
289                 }
290
291         return _ret_var.Handle;
292
293             }
294             else
295             {
296                 return efl_core_env_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
297             }
298         }
299
300         private static efl_core_env_content_get_delegate efl_core_env_content_get_static_delegate;
301
302         
303         private delegate void efl_core_env_unset_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String var);
304
305         
306         public delegate void efl_core_env_unset_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String var);
307
308         public static Efl.Eo.FunctionWrapper<efl_core_env_unset_api_delegate> efl_core_env_unset_ptr = new Efl.Eo.FunctionWrapper<efl_core_env_unset_api_delegate>(Module, "efl_core_env_unset");
309
310         private static void unset(System.IntPtr obj, System.IntPtr pd, System.String var)
311         {
312             Eina.Log.Debug("function efl_core_env_unset was called");
313             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
314             if (ws != null)
315             {
316                                     
317                 try
318                 {
319                     ((Env)ws.Target).Unset(var);
320                 }
321                 catch (Exception e)
322                 {
323                     Eina.Log.Warning($"Callback error: {e.ToString()}");
324                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
325                 }
326
327                         
328             }
329             else
330             {
331                 efl_core_env_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), var);
332             }
333         }
334
335         private static efl_core_env_unset_delegate efl_core_env_unset_static_delegate;
336
337         
338         private delegate void efl_core_env_clear_delegate(System.IntPtr obj, System.IntPtr pd);
339
340         
341         public delegate void efl_core_env_clear_api_delegate(System.IntPtr obj);
342
343         public static Efl.Eo.FunctionWrapper<efl_core_env_clear_api_delegate> efl_core_env_clear_ptr = new Efl.Eo.FunctionWrapper<efl_core_env_clear_api_delegate>(Module, "efl_core_env_clear");
344
345         private static void clear(System.IntPtr obj, System.IntPtr pd)
346         {
347             Eina.Log.Debug("function efl_core_env_clear was called");
348             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
349             if (ws != null)
350             {
351             
352                 try
353                 {
354                     ((Env)ws.Target).Clear();
355                 }
356                 catch (Exception e)
357                 {
358                     Eina.Log.Warning($"Callback error: {e.ToString()}");
359                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
360                 }
361
362         
363             }
364             else
365             {
366                 efl_core_env_clear_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
367             }
368         }
369
370         private static efl_core_env_clear_delegate efl_core_env_clear_static_delegate;
371
372         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.OwnTag>))]
373         private delegate Efl.IDuplicate efl_duplicate_delegate(System.IntPtr obj, System.IntPtr pd);
374
375         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.OwnTag>))]
376         public delegate Efl.IDuplicate efl_duplicate_api_delegate(System.IntPtr obj);
377
378         public static Efl.Eo.FunctionWrapper<efl_duplicate_api_delegate> efl_duplicate_ptr = new Efl.Eo.FunctionWrapper<efl_duplicate_api_delegate>(Module, "efl_duplicate");
379
380         private static Efl.IDuplicate duplicate(System.IntPtr obj, System.IntPtr pd)
381         {
382             Eina.Log.Debug("function efl_duplicate was called");
383             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
384             if (ws != null)
385             {
386             Efl.IDuplicate _ret_var = default(Efl.IDuplicate);
387                 try
388                 {
389                     _ret_var = ((Env)ws.Target).Duplicate();
390                 }
391                 catch (Exception e)
392                 {
393                     Eina.Log.Warning($"Callback error: {e.ToString()}");
394                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
395                 }
396
397         return _ret_var;
398
399             }
400             else
401             {
402                 return efl_duplicate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
403             }
404         }
405
406         private static efl_duplicate_delegate efl_duplicate_static_delegate;
407
408         #pragma warning restore CA1707, CS1591, SA1300, SA1600
409
410 }
411 }
412 }
413
414 }
415