Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / Registry.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class Registry : Gst.Object {
13
14                 public Registry (IntPtr raw) : base(raw) {}
15
16                 protected Registry() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 [GLib.Signal("plugin-added")]
22                 public event Gst.PluginAddedHandler PluginAdded {
23                         add {
24                                 this.AddSignalHandler ("plugin-added", value, typeof (Gst.PluginAddedArgs));
25                         }
26                         remove {
27                                 this.RemoveSignalHandler ("plugin-added", value);
28                         }
29                 }
30
31                 [GLib.Signal("feature-added")]
32                 public event Gst.FeatureAddedHandler FeatureAdded {
33                         add {
34                                 this.AddSignalHandler ("feature-added", value, typeof (Gst.FeatureAddedArgs));
35                         }
36                         remove {
37                                 this.RemoveSignalHandler ("feature-added", value);
38                         }
39                 }
40
41                 static FeatureAddedNativeDelegate FeatureAdded_cb_delegate;
42                 static FeatureAddedNativeDelegate FeatureAddedVMCallback {
43                         get {
44                                 if (FeatureAdded_cb_delegate == null)
45                                         FeatureAdded_cb_delegate = new FeatureAddedNativeDelegate (FeatureAdded_cb);
46                                 return FeatureAdded_cb_delegate;
47                         }
48                 }
49
50                 static void OverrideFeatureAdded (GLib.GType gtype)
51                 {
52                         OverrideFeatureAdded (gtype, FeatureAddedVMCallback);
53                 }
54
55                 static void OverrideFeatureAdded (GLib.GType gtype, FeatureAddedNativeDelegate callback)
56                 {
57                         OverrideVirtualMethod (gtype, "feature-added", callback);
58                 }
59                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
60                 delegate void FeatureAddedNativeDelegate (IntPtr inst, IntPtr feature);
61
62                 static void FeatureAdded_cb (IntPtr inst, IntPtr feature)
63                 {
64                         try {
65                                 Registry __obj = GLib.Object.GetObject (inst, false) as Registry;
66                                 __obj.OnFeatureAdded (GLib.Object.GetObject(feature) as Gst.PluginFeature);
67                         } catch (Exception e) {
68                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
69                         }
70                 }
71
72                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Registry), ConnectionMethod="OverrideFeatureAdded")]
73                 protected virtual void OnFeatureAdded (Gst.PluginFeature feature)
74                 {
75                         InternalFeatureAdded (feature);
76                 }
77
78                 private void InternalFeatureAdded (Gst.PluginFeature feature)
79                 {
80                         GLib.Value ret = GLib.Value.Empty;
81                         GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
82                         GLib.Value[] vals = new GLib.Value [2];
83                         vals [0] = new GLib.Value (this);
84                         inst_and_params.Append (vals [0]);
85                         vals [1] = new GLib.Value (feature);
86                         inst_and_params.Append (vals [1]);
87                         g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
88                         foreach (GLib.Value v in vals)
89                                 v.Dispose ();
90                 }
91
92                 static PluginAddedNativeDelegate PluginAdded_cb_delegate;
93                 static PluginAddedNativeDelegate PluginAddedVMCallback {
94                         get {
95                                 if (PluginAdded_cb_delegate == null)
96                                         PluginAdded_cb_delegate = new PluginAddedNativeDelegate (PluginAdded_cb);
97                                 return PluginAdded_cb_delegate;
98                         }
99                 }
100
101                 static void OverridePluginAdded (GLib.GType gtype)
102                 {
103                         OverridePluginAdded (gtype, PluginAddedVMCallback);
104                 }
105
106                 static void OverridePluginAdded (GLib.GType gtype, PluginAddedNativeDelegate callback)
107                 {
108                         OverrideVirtualMethod (gtype, "plugin-added", callback);
109                 }
110                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
111                 delegate void PluginAddedNativeDelegate (IntPtr inst, IntPtr plugin);
112
113                 static void PluginAdded_cb (IntPtr inst, IntPtr plugin)
114                 {
115                         try {
116                                 Registry __obj = GLib.Object.GetObject (inst, false) as Registry;
117                                 __obj.OnPluginAdded (GLib.Object.GetObject(plugin) as Gst.Plugin);
118                         } catch (Exception e) {
119                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
120                         }
121                 }
122
123                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Registry), ConnectionMethod="OverridePluginAdded")]
124                 protected virtual void OnPluginAdded (Gst.Plugin plugin)
125                 {
126                         InternalPluginAdded (plugin);
127                 }
128
129                 private void InternalPluginAdded (Gst.Plugin plugin)
130                 {
131                         GLib.Value ret = GLib.Value.Empty;
132                         GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
133                         GLib.Value[] vals = new GLib.Value [2];
134                         vals [0] = new GLib.Value (this);
135                         inst_and_params.Append (vals [0]);
136                         vals [1] = new GLib.Value (plugin);
137                         inst_and_params.Append (vals [1]);
138                         g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
139                         foreach (GLib.Value v in vals)
140                                 v.Dispose ();
141                 }
142
143
144                 // Internal representation of the wrapped structure ABI.
145                 static GLib.AbiStruct _class_abi = null;
146                 static public new GLib.AbiStruct class_abi {
147                         get {
148                                 if (_class_abi == null)
149                                         _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields);
150
151                                 return _class_abi;
152                         }
153                 }
154
155
156                 // End of the ABI representation.
157
158                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
159                 static extern IntPtr gst_registry_get_type();
160
161                 public static new GLib.GType GType { 
162                         get {
163                                 IntPtr raw_ret = gst_registry_get_type();
164                                 GLib.GType ret = new GLib.GType(raw_ret);
165                                 return ret;
166                         }
167                 }
168
169                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
170                 static extern bool gst_registry_fork_is_enabled();
171
172                 public static bool ForkIsEnabled() {
173                         bool raw_ret = gst_registry_fork_is_enabled();
174                         bool ret = raw_ret;
175                         return ret;
176                 }
177
178                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
179                 static extern void gst_registry_fork_set_enabled(bool enabled);
180
181                 public static void ForkSetEnabled(bool enabled) {
182                         gst_registry_fork_set_enabled(enabled);
183                 }
184
185                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
186                 static extern IntPtr gst_registry_get();
187
188                 public static Gst.Registry Get() {
189                         IntPtr raw_ret = gst_registry_get();
190                         Gst.Registry ret = GLib.Object.GetObject(raw_ret) as Gst.Registry;
191                         return ret;
192                 }
193
194                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
195                 static extern bool gst_registry_add_feature(IntPtr raw, IntPtr feature);
196
197                 public bool AddFeature(Gst.PluginFeature feature) {
198                         bool raw_ret = gst_registry_add_feature(Handle, feature == null ? IntPtr.Zero : feature.Handle);
199                         bool ret = raw_ret;
200                         return ret;
201                 }
202
203                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
204                 static extern bool gst_registry_add_plugin(IntPtr raw, IntPtr plugin);
205
206                 public bool AddPlugin(Gst.Plugin plugin) {
207                         bool raw_ret = gst_registry_add_plugin(Handle, plugin == null ? IntPtr.Zero : plugin.Handle);
208                         bool ret = raw_ret;
209                         return ret;
210                 }
211
212                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
213                 static extern bool gst_registry_check_feature_version(IntPtr raw, IntPtr feature_name, uint min_major, uint min_minor, uint min_micro);
214
215                 public bool CheckFeatureVersion(string feature_name, uint min_major, uint min_minor, uint min_micro) {
216                         IntPtr native_feature_name = GLib.Marshaller.StringToPtrGStrdup (feature_name);
217                         bool raw_ret = gst_registry_check_feature_version(Handle, native_feature_name, min_major, min_minor, min_micro);
218                         bool ret = raw_ret;
219                         GLib.Marshaller.Free (native_feature_name);
220                         return ret;
221                 }
222
223                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
224                 static extern IntPtr gst_registry_feature_filter(IntPtr raw, GstSharp.PluginFeatureFilterNative filter, bool first, IntPtr user_data);
225
226                 public Gst.PluginFeature[] FeatureFilter(Gst.PluginFeatureFilter filter, bool first) {
227                         GstSharp.PluginFeatureFilterWrapper filter_wrapper = new GstSharp.PluginFeatureFilterWrapper (filter);
228                         IntPtr raw_ret = gst_registry_feature_filter(Handle, filter_wrapper.NativeDelegate, first, IntPtr.Zero);
229                         Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature));
230                         return ret;
231                 }
232
233                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234                 static extern IntPtr gst_registry_find_feature(IntPtr raw, IntPtr name, IntPtr type);
235
236                 public Gst.PluginFeature FindFeature(string name, GLib.GType type) {
237                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
238                         IntPtr raw_ret = gst_registry_find_feature(Handle, native_name, type.Val);
239                         Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature;
240                         GLib.Marshaller.Free (native_name);
241                         return ret;
242                 }
243
244                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
245                 static extern IntPtr gst_registry_find_plugin(IntPtr raw, IntPtr name);
246
247                 public Gst.Plugin FindPlugin(string name) {
248                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
249                         IntPtr raw_ret = gst_registry_find_plugin(Handle, native_name);
250                         Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
251                         GLib.Marshaller.Free (native_name);
252                         return ret;
253                 }
254
255                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
256                 static extern IntPtr gst_registry_get_feature_list(IntPtr raw, IntPtr type);
257
258                 public Gst.PluginFeature[] GetFeatureList(GLib.GType type) {
259                         IntPtr raw_ret = gst_registry_get_feature_list(Handle, type.Val);
260                         Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature));
261                         return ret;
262                 }
263
264                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
265                 static extern IntPtr gst_registry_get_feature_list_by_plugin(IntPtr raw, IntPtr name);
266
267                 public Gst.PluginFeature[] GetFeatureListByPlugin(string name) {
268                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
269                         IntPtr raw_ret = gst_registry_get_feature_list_by_plugin(Handle, native_name);
270                         Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature));
271                         GLib.Marshaller.Free (native_name);
272                         return ret;
273                 }
274
275                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
276                 static extern uint gst_registry_get_feature_list_cookie(IntPtr raw);
277
278                 public uint FeatureListCookie { 
279                         get {
280                                 uint raw_ret = gst_registry_get_feature_list_cookie(Handle);
281                                 uint ret = raw_ret;
282                                 return ret;
283                         }
284                 }
285
286                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
287                 static extern IntPtr gst_registry_get_plugin_list(IntPtr raw);
288
289                 public Gst.Plugin[] PluginList { 
290                         get {
291                                 IntPtr raw_ret = gst_registry_get_plugin_list(Handle);
292                                 Gst.Plugin[] ret = (Gst.Plugin[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Plugin));
293                                 return ret;
294                         }
295                 }
296
297                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
298                 static extern IntPtr gst_registry_lookup(IntPtr raw, IntPtr filename);
299
300                 public Gst.Plugin Lookup(string filename) {
301                         IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
302                         IntPtr raw_ret = gst_registry_lookup(Handle, native_filename);
303                         Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
304                         GLib.Marshaller.Free (native_filename);
305                         return ret;
306                 }
307
308                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
309                 static extern IntPtr gst_registry_lookup_feature(IntPtr raw, IntPtr name);
310
311                 public Gst.PluginFeature LookupFeature(string name) {
312                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
313                         IntPtr raw_ret = gst_registry_lookup_feature(Handle, native_name);
314                         Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature;
315                         GLib.Marshaller.Free (native_name);
316                         return ret;
317                 }
318
319                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
320                 static extern IntPtr gst_registry_plugin_filter(IntPtr raw, GstSharp.PluginFilterNative filter, bool first, IntPtr user_data);
321
322                 public Gst.Plugin[] PluginFilter(Gst.PluginFilter filter, bool first) {
323                         GstSharp.PluginFilterWrapper filter_wrapper = new GstSharp.PluginFilterWrapper (filter);
324                         IntPtr raw_ret = gst_registry_plugin_filter(Handle, filter_wrapper.NativeDelegate, first, IntPtr.Zero);
325                         Gst.Plugin[] ret = (Gst.Plugin[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Plugin));
326                         return ret;
327                 }
328
329                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
330                 static extern void gst_registry_remove_feature(IntPtr raw, IntPtr feature);
331
332                 public void RemoveFeature(Gst.PluginFeature feature) {
333                         gst_registry_remove_feature(Handle, feature == null ? IntPtr.Zero : feature.Handle);
334                 }
335
336                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
337                 static extern void gst_registry_remove_plugin(IntPtr raw, IntPtr plugin);
338
339                 public void RemovePlugin(Gst.Plugin plugin) {
340                         gst_registry_remove_plugin(Handle, plugin == null ? IntPtr.Zero : plugin.Handle);
341                 }
342
343                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
344                 static extern bool gst_registry_scan_path(IntPtr raw, IntPtr path);
345
346                 public bool ScanPath(string path) {
347                         IntPtr native_path = GLib.Marshaller.StringToFilenamePtr (path);
348                         bool raw_ret = gst_registry_scan_path(Handle, native_path);
349                         bool ret = raw_ret;
350                         GLib.Marshaller.Free (native_path);
351                         return ret;
352                 }
353
354                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
355                 static extern bool gst_update_registry();
356
357                 public static bool UpdateRegistry() {
358                         bool raw_ret = gst_update_registry();
359                         bool ret = raw_ret;
360                         return ret;
361                 }
362
363
364                 // Internal representation of the wrapped structure ABI.
365                 static GLib.AbiStruct _abi_info = null;
366                 static public new GLib.AbiStruct abi_info {
367                         get {
368                                 if (_abi_info == null)
369                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
370                                                 new GLib.AbiField("priv"
371                                                         , Gst.Object.abi_info.Fields
372                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
373                                                         , null
374                                                         , null
375                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
376                                                         , 0
377                                                         ),
378                                         });
379
380                                 return _abi_info;
381                         }
382                 }
383
384
385                 // End of the ABI representation.
386
387 #endregion
388         }
389 }