3ba3ae33c03a9895befc41a4ba47d12bd52a7ba1
[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.ComponentModel;
7 namespace Efl { namespace Core { 
8 /// <summary>This object can maintain a set of key value pairs
9 /// 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"/>.
10 /// 
11 /// 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>
12 [EnvNativeInherit]
13 public class Env : Efl.Object, Efl.Eo.IWrapper,Efl.IDuplicate
14 {
15     ///<summary>Pointer to the native class description.</summary>
16     public override System.IntPtr NativeClass {
17         get {
18             if (((object)this).GetType() == typeof (Env))
19                 return Efl.Core.EnvNativeInherit.GetEflClassStatic();
20             else
21                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
22         }
23     }
24     [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
25         efl_core_env_class_get();
26     ///<summary>Creates a new instance.</summary>
27     ///<param name="parent">Parent instance.</param>
28     public Env(Efl.Object parent= null
29             ) :
30         base(efl_core_env_class_get(), typeof(Env), parent)
31     {
32         FinishInstantiation();
33     }
34     ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
35     protected Env(System.IntPtr raw) : base(raw)
36     {
37                 RegisterEventProxies();
38     }
39     ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
40     protected Env(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
41     ///<summary>Verifies if the given object is equal to this one.</summary>
42     public override bool Equals(object obj)
43     {
44         var other = obj as Efl.Object;
45         if (other == null)
46             return false;
47         return this.NativeHandle == other.NativeHandle;
48     }
49     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
50     public override int GetHashCode()
51     {
52         return this.NativeHandle.ToInt32();
53     }
54     ///<summary>Turns the native pointer into a string representation.</summary>
55     public override String ToString()
56     {
57         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
58     }
59     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
60     protected override void RegisterEventProxies()
61     {
62         base.RegisterEventProxies();
63     }
64     /// <summary>Get the value of the <c>var</c>, or <c>null</c> if no such <c>var</c> exists in the object</summary>
65     /// <param name="var">The name of the variable</param>
66     /// <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>
67     virtual public System.String GetEnv( System.String var) {
68                                  var _ret_var = Efl.Core.EnvNativeInherit.efl_core_env_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), var);
69         Eina.Error.RaiseIfUnhandledException();
70                         return _ret_var;
71  }
72     /// <summary>Add a new pair to this object</summary>
73     /// <param name="var">The name of the variable</param>
74     /// <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>
75     /// <returns></returns>
76     virtual public void SetEnv( System.String var,  System.String value) {
77                                                          Efl.Core.EnvNativeInherit.efl_core_env_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), var,  value);
78         Eina.Error.RaiseIfUnhandledException();
79                                          }
80     /// <summary>Get the content of this object.
81     /// This will return a iterator that contains all keys that are part of this object.</summary>
82     /// <returns></returns>
83     virtual public Eina.Iterator<System.String> GetContent() {
84          var _ret_var = Efl.Core.EnvNativeInherit.efl_core_env_content_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
85         Eina.Error.RaiseIfUnhandledException();
86         return new Eina.Iterator<System.String>(_ret_var, false, false);
87  }
88     /// <summary>Remove the pair with the matching <c>var</c> from this object</summary>
89     /// <param name="var">The name of the variable</param>
90     /// <returns></returns>
91     virtual public void Unset( System.String var) {
92                                  Efl.Core.EnvNativeInherit.efl_core_env_unset_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), var);
93         Eina.Error.RaiseIfUnhandledException();
94                          }
95     /// <summary>Remove all pairs from this object</summary>
96     /// <returns></returns>
97     virtual public void Clear() {
98          Efl.Core.EnvNativeInherit.efl_core_env_clear_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
99         Eina.Error.RaiseIfUnhandledException();
100          }
101     /// <summary>Creates a carbon copy of this object and returns it.
102     /// The newly created object will have no event handlers or anything of the sort.</summary>
103     /// <returns>Returned carbon copy</returns>
104     virtual public Efl.IDuplicate DoDuplicate() {
105          var _ret_var = Efl.IDuplicateNativeInherit.efl_duplicate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
106         Eina.Error.RaiseIfUnhandledException();
107         return _ret_var;
108  }
109     /// <summary>Get the content of this object.
110 /// This will return a iterator that contains all keys that are part of this object.</summary>
111 /// <value></value>
112     public Eina.Iterator<System.String> Content {
113         get { return GetContent(); }
114     }
115     private static IntPtr GetEflClassStatic()
116     {
117         return Efl.Core.Env.efl_core_env_class_get();
118     }
119 }
120 public class EnvNativeInherit : Efl.ObjectNativeInherit{
121     public new  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Ecore);
122     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
123     {
124         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
125         var methods = Efl.Eo.Globals.GetUserMethods(type);
126         if (efl_core_env_get_static_delegate == null)
127             efl_core_env_get_static_delegate = new efl_core_env_get_delegate(env_get);
128         if (methods.FirstOrDefault(m => m.Name == "GetEnv") != null)
129             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)});
130         if (efl_core_env_set_static_delegate == null)
131             efl_core_env_set_static_delegate = new efl_core_env_set_delegate(env_set);
132         if (methods.FirstOrDefault(m => m.Name == "SetEnv") != null)
133             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)});
134         if (efl_core_env_content_get_static_delegate == null)
135             efl_core_env_content_get_static_delegate = new efl_core_env_content_get_delegate(content_get);
136         if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
137             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)});
138         if (efl_core_env_unset_static_delegate == null)
139             efl_core_env_unset_static_delegate = new efl_core_env_unset_delegate(unset);
140         if (methods.FirstOrDefault(m => m.Name == "Unset") != null)
141             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)});
142         if (efl_core_env_clear_static_delegate == null)
143             efl_core_env_clear_static_delegate = new efl_core_env_clear_delegate(clear);
144         if (methods.FirstOrDefault(m => m.Name == "Clear") != null)
145             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)});
146         if (efl_duplicate_static_delegate == null)
147             efl_duplicate_static_delegate = new efl_duplicate_delegate(duplicate);
148         if (methods.FirstOrDefault(m => m.Name == "DoDuplicate") != null)
149             descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_duplicate"), func = Marshal.GetFunctionPointerForDelegate(efl_duplicate_static_delegate)});
150         descs.AddRange(base.GetEoOps(type));
151         return descs;
152     }
153     public override IntPtr GetEflClass()
154     {
155         return Efl.Core.Env.efl_core_env_class_get();
156     }
157     public static new  IntPtr GetEflClassStatic()
158     {
159         return Efl.Core.Env.efl_core_env_class_get();
160     }
161
162
163      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] 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);
164
165
166      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_core_env_get_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String var);
167      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");
168      private static System.String env_get(System.IntPtr obj, System.IntPtr pd,  System.String var)
169     {
170         Eina.Log.Debug("function efl_core_env_get was called");
171         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
172         if(wrapper != null) {
173                                                 System.String _ret_var = default(System.String);
174             try {
175                 _ret_var = ((Env)wrapper).GetEnv( var);
176             } catch (Exception e) {
177                 Eina.Log.Warning($"Callback error: {e.ToString()}");
178                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
179             }
180                         return _ret_var;
181         } else {
182             return efl_core_env_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  var);
183         }
184     }
185     private static efl_core_env_get_delegate efl_core_env_get_static_delegate;
186
187
188      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);
189
190
191      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);
192      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");
193      private static void env_set(System.IntPtr obj, System.IntPtr pd,  System.String var,  System.String value)
194     {
195         Eina.Log.Debug("function efl_core_env_set was called");
196         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
197         if(wrapper != null) {
198                                                                         
199             try {
200                 ((Env)wrapper).SetEnv( var,  value);
201             } catch (Exception e) {
202                 Eina.Log.Warning($"Callback error: {e.ToString()}");
203                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
204             }
205                                                 } else {
206             efl_core_env_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  var,  value);
207         }
208     }
209     private static efl_core_env_set_delegate efl_core_env_set_static_delegate;
210
211
212      private delegate System.IntPtr efl_core_env_content_get_delegate(System.IntPtr obj, System.IntPtr pd);
213
214
215      public delegate System.IntPtr efl_core_env_content_get_api_delegate(System.IntPtr obj);
216      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");
217      private static System.IntPtr content_get(System.IntPtr obj, System.IntPtr pd)
218     {
219         Eina.Log.Debug("function efl_core_env_content_get was called");
220         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
221         if(wrapper != null) {
222                         Eina.Iterator<System.String> _ret_var = default(Eina.Iterator<System.String>);
223             try {
224                 _ret_var = ((Env)wrapper).GetContent();
225             } catch (Exception e) {
226                 Eina.Log.Warning($"Callback error: {e.ToString()}");
227                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
228             }
229         return _ret_var.Handle;
230         } else {
231             return efl_core_env_content_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
232         }
233     }
234     private static efl_core_env_content_get_delegate efl_core_env_content_get_static_delegate;
235
236
237      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);
238
239
240      public delegate void efl_core_env_unset_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String var);
241      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");
242      private static void unset(System.IntPtr obj, System.IntPtr pd,  System.String var)
243     {
244         Eina.Log.Debug("function efl_core_env_unset was called");
245         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
246         if(wrapper != null) {
247                                                 
248             try {
249                 ((Env)wrapper).Unset( var);
250             } catch (Exception e) {
251                 Eina.Log.Warning($"Callback error: {e.ToString()}");
252                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
253             }
254                                 } else {
255             efl_core_env_unset_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  var);
256         }
257     }
258     private static efl_core_env_unset_delegate efl_core_env_unset_static_delegate;
259
260
261      private delegate void efl_core_env_clear_delegate(System.IntPtr obj, System.IntPtr pd);
262
263
264      public delegate void efl_core_env_clear_api_delegate(System.IntPtr obj);
265      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");
266      private static void clear(System.IntPtr obj, System.IntPtr pd)
267     {
268         Eina.Log.Debug("function efl_core_env_clear was called");
269         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
270         if(wrapper != null) {
271                         
272             try {
273                 ((Env)wrapper).Clear();
274             } catch (Exception e) {
275                 Eina.Log.Warning($"Callback error: {e.ToString()}");
276                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
277             }
278                 } else {
279             efl_core_env_clear_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
280         }
281     }
282     private static efl_core_env_clear_delegate efl_core_env_clear_static_delegate;
283
284
285     [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.IDuplicateConcrete, Efl.Eo.OwnTag>))] private delegate Efl.IDuplicate efl_duplicate_delegate(System.IntPtr obj, System.IntPtr pd);
286
287
288     [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.IDuplicateConcrete, Efl.Eo.OwnTag>))] public delegate Efl.IDuplicate efl_duplicate_api_delegate(System.IntPtr obj);
289      public static Efl.Eo.FunctionWrapper<efl_duplicate_api_delegate> efl_duplicate_ptr = new Efl.Eo.FunctionWrapper<efl_duplicate_api_delegate>(_Module, "efl_duplicate");
290      private static Efl.IDuplicate duplicate(System.IntPtr obj, System.IntPtr pd)
291     {
292         Eina.Log.Debug("function efl_duplicate was called");
293         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
294         if(wrapper != null) {
295                         Efl.IDuplicate _ret_var = default(Efl.IDuplicate);
296             try {
297                 _ret_var = ((Env)wrapper).DoDuplicate();
298             } catch (Exception e) {
299                 Eina.Log.Warning($"Callback error: {e.ToString()}");
300                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
301             }
302         return _ret_var;
303         } else {
304             return efl_duplicate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
305         }
306     }
307     private static efl_duplicate_delegate efl_duplicate_static_delegate;
308 }
309 } }