Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / DeviceProvider.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 DeviceProvider : Gst.Object {
13
14                 protected DeviceProvider (IntPtr raw) : base(raw) {}
15
16                 protected DeviceProvider() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22                 static extern IntPtr gst_device_provider_get_devices(IntPtr raw);
23
24                 public Gst.Device[] Devices {
25                         get  {
26                                 IntPtr raw_ret = gst_device_provider_get_devices(Handle);
27                                 Gst.Device[] ret = (Gst.Device[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Device));
28                                 return ret;
29                         }
30                 }
31
32                 [GLib.Signal("provider-unhidden")]
33                 public event Gst.ProviderUnhiddenHandler ProviderUnhidden {
34                         add {
35                                 this.AddSignalHandler ("provider-unhidden", value, typeof (Gst.ProviderUnhiddenArgs));
36                         }
37                         remove {
38                                 this.RemoveSignalHandler ("provider-unhidden", value);
39                         }
40                 }
41
42                 [GLib.Signal("provider-hidden")]
43                 public event Gst.ProviderHiddenHandler ProviderHidden {
44                         add {
45                                 this.AddSignalHandler ("provider-hidden", value, typeof (Gst.ProviderHiddenArgs));
46                         }
47                         remove {
48                                 this.RemoveSignalHandler ("provider-hidden", value);
49                         }
50                 }
51
52                 static ProviderHiddenNativeDelegate ProviderHidden_cb_delegate;
53                 static ProviderHiddenNativeDelegate ProviderHiddenVMCallback {
54                         get {
55                                 if (ProviderHidden_cb_delegate == null)
56                                         ProviderHidden_cb_delegate = new ProviderHiddenNativeDelegate (ProviderHidden_cb);
57                                 return ProviderHidden_cb_delegate;
58                         }
59                 }
60
61                 static void OverrideProviderHidden (GLib.GType gtype)
62                 {
63                         OverrideProviderHidden (gtype, ProviderHiddenVMCallback);
64                 }
65
66                 static void OverrideProviderHidden (GLib.GType gtype, ProviderHiddenNativeDelegate callback)
67                 {
68                         OverrideVirtualMethod (gtype, "provider-hidden", callback);
69                 }
70                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
71                 delegate void ProviderHiddenNativeDelegate (IntPtr inst, IntPtr _object);
72
73                 static void ProviderHidden_cb (IntPtr inst, IntPtr _object)
74                 {
75                         try {
76                                 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
77                                 __obj.OnProviderHidden (GLib.Marshaller.Utf8PtrToString (_object));
78                         } catch (Exception e) {
79                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
80                         }
81                 }
82
83                 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideProviderHidden")]
84                 protected virtual void OnProviderHidden (string _object)
85                 {
86                         InternalProviderHidden (_object);
87                 }
88
89                 private void InternalProviderHidden (string _object)
90                 {
91                         GLib.Value ret = GLib.Value.Empty;
92                         GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
93                         GLib.Value[] vals = new GLib.Value [2];
94                         vals [0] = new GLib.Value (this);
95                         inst_and_params.Append (vals [0]);
96                         vals [1] = new GLib.Value (_object);
97                         inst_and_params.Append (vals [1]);
98                         g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
99                         foreach (GLib.Value v in vals)
100                                 v.Dispose ();
101                 }
102
103                 static ProviderUnhiddenNativeDelegate ProviderUnhidden_cb_delegate;
104                 static ProviderUnhiddenNativeDelegate ProviderUnhiddenVMCallback {
105                         get {
106                                 if (ProviderUnhidden_cb_delegate == null)
107                                         ProviderUnhidden_cb_delegate = new ProviderUnhiddenNativeDelegate (ProviderUnhidden_cb);
108                                 return ProviderUnhidden_cb_delegate;
109                         }
110                 }
111
112                 static void OverrideProviderUnhidden (GLib.GType gtype)
113                 {
114                         OverrideProviderUnhidden (gtype, ProviderUnhiddenVMCallback);
115                 }
116
117                 static void OverrideProviderUnhidden (GLib.GType gtype, ProviderUnhiddenNativeDelegate callback)
118                 {
119                         OverrideVirtualMethod (gtype, "provider-unhidden", callback);
120                 }
121                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
122                 delegate void ProviderUnhiddenNativeDelegate (IntPtr inst, IntPtr _object);
123
124                 static void ProviderUnhidden_cb (IntPtr inst, IntPtr _object)
125                 {
126                         try {
127                                 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
128                                 __obj.OnProviderUnhidden (GLib.Marshaller.Utf8PtrToString (_object));
129                         } catch (Exception e) {
130                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
131                         }
132                 }
133
134                 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideProviderUnhidden")]
135                 protected virtual void OnProviderUnhidden (string _object)
136                 {
137                         InternalProviderUnhidden (_object);
138                 }
139
140                 private void InternalProviderUnhidden (string _object)
141                 {
142                         GLib.Value ret = GLib.Value.Empty;
143                         GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
144                         GLib.Value[] vals = new GLib.Value [2];
145                         vals [0] = new GLib.Value (this);
146                         inst_and_params.Append (vals [0]);
147                         vals [1] = new GLib.Value (_object);
148                         inst_and_params.Append (vals [1]);
149                         g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
150                         foreach (GLib.Value v in vals)
151                                 v.Dispose ();
152                 }
153
154                 static StartNativeDelegate Start_cb_delegate;
155                 static StartNativeDelegate StartVMCallback {
156                         get {
157                                 if (Start_cb_delegate == null)
158                                         Start_cb_delegate = new StartNativeDelegate (Start_cb);
159                                 return Start_cb_delegate;
160                         }
161                 }
162
163                 static void OverrideStart (GLib.GType gtype)
164                 {
165                         OverrideStart (gtype, StartVMCallback);
166                 }
167
168                 static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback)
169                 {
170                         unsafe {
171                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
172                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
173                         }
174                 }
175
176                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
177                 delegate bool StartNativeDelegate (IntPtr inst);
178
179                 static bool Start_cb (IntPtr inst)
180                 {
181                         try {
182                                 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
183                                 bool __result;
184                                 __result = __obj.OnStart ();
185                                 return __result;
186                         } catch (Exception e) {
187                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
188                                 // NOTREACHED: above call does not return.
189                                 throw e;
190                         }
191                 }
192
193                 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideStart")]
194                 protected virtual bool OnStart ()
195                 {
196                         return InternalStart ();
197                 }
198
199                 private bool InternalStart ()
200                 {
201                         StartNativeDelegate unmanaged = null;
202                         unsafe {
203                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
204                                 unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate));
205                         }
206                         if (unmanaged == null) return false;
207
208                         bool __result = unmanaged (this.Handle);
209                         return __result;
210                 }
211
212                 static StopNativeDelegate Stop_cb_delegate;
213                 static StopNativeDelegate StopVMCallback {
214                         get {
215                                 if (Stop_cb_delegate == null)
216                                         Stop_cb_delegate = new StopNativeDelegate (Stop_cb);
217                                 return Stop_cb_delegate;
218                         }
219                 }
220
221                 static void OverrideStop (GLib.GType gtype)
222                 {
223                         OverrideStop (gtype, StopVMCallback);
224                 }
225
226                 static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback)
227                 {
228                         unsafe {
229                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
230                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
231                         }
232                 }
233
234                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
235                 delegate void StopNativeDelegate (IntPtr inst);
236
237                 static void Stop_cb (IntPtr inst)
238                 {
239                         try {
240                                 DeviceProvider __obj = GLib.Object.GetObject (inst, false) as DeviceProvider;
241                                 __obj.OnStop ();
242                         } catch (Exception e) {
243                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
244                         }
245                 }
246
247                 [GLib.DefaultSignalHandler(Type=typeof(Gst.DeviceProvider), ConnectionMethod="OverrideStop")]
248                 protected virtual void OnStop ()
249                 {
250                         InternalStop ();
251                 }
252
253                 private void InternalStop ()
254                 {
255                         StopNativeDelegate unmanaged = null;
256                         unsafe {
257                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
258                                 unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate));
259                         }
260                         if (unmanaged == null) return;
261
262                         unmanaged (this.Handle);
263                 }
264
265
266                 // Internal representation of the wrapped structure ABI.
267                 static GLib.AbiStruct _class_abi = null;
268                 static public new GLib.AbiStruct class_abi {
269                         get {
270                                 if (_class_abi == null)
271                                         _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
272                                                 new GLib.AbiField("factory"
273                                                         , Gst.Object.class_abi.Fields
274                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // factory
275                                                         , null
276                                                         , "probe"
277                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
278                                                         , 0
279                                                         ),
280                                                 new GLib.AbiField("probe"
281                                                         , -1
282                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // probe
283                                                         , "factory"
284                                                         , "start"
285                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
286                                                         , 0
287                                                         ),
288                                                 new GLib.AbiField("start"
289                                                         , -1
290                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // start
291                                                         , "probe"
292                                                         , "stop"
293                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
294                                                         , 0
295                                                         ),
296                                                 new GLib.AbiField("stop"
297                                                         , -1
298                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop
299                                                         , "start"
300                                                         , "metadata"
301                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
302                                                         , 0
303                                                         ),
304                                                 new GLib.AbiField("metadata"
305                                                         , -1
306                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // metadata
307                                                         , "stop"
308                                                         , "_gst_reserved"
309                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
310                                                         , 0
311                                                         ),
312                                                 new GLib.AbiField("_gst_reserved"
313                                                         , -1
314                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
315                                                         , "metadata"
316                                                         , null
317                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
318                                                         , 0
319                                                         ),
320                                         });
321
322                                 return _class_abi;
323                         }
324                 }
325
326
327                 // End of the ABI representation.
328
329                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
330                 static extern IntPtr gst_device_provider_get_type();
331
332                 public static new GLib.GType GType { 
333                         get {
334                                 IntPtr raw_ret = gst_device_provider_get_type();
335                                 GLib.GType ret = new GLib.GType(raw_ret);
336                                 return ret;
337                         }
338                 }
339
340                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
341                 static extern bool gst_device_provider_register(IntPtr plugin, IntPtr name, uint rank, IntPtr type);
342
343                 public static bool Register(Gst.Plugin plugin, string name, uint rank, GLib.GType type) {
344                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
345                         bool raw_ret = gst_device_provider_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, type.Val);
346                         bool ret = raw_ret;
347                         GLib.Marshaller.Free (native_name);
348                         return ret;
349                 }
350
351                 public static bool Register(string name, uint rank, GLib.GType type) {
352                         return Register (null, name, rank, type);
353                 }
354
355                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
356                 static extern bool gst_device_provider_can_monitor(IntPtr raw);
357
358                 public bool CanMonitor() {
359                         bool raw_ret = gst_device_provider_can_monitor(Handle);
360                         bool ret = raw_ret;
361                         return ret;
362                 }
363
364                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
365                 static extern void gst_device_provider_device_add(IntPtr raw, IntPtr device);
366
367                 public void DeviceAdd(Gst.Device device) {
368                         gst_device_provider_device_add(Handle, device == null ? IntPtr.Zero : device.Handle);
369                 }
370
371                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
372                 static extern void gst_device_provider_device_changed(IntPtr raw, IntPtr device, IntPtr changed_device);
373
374                 public void DeviceChanged(Gst.Device device, Gst.Device changed_device) {
375                         gst_device_provider_device_changed(Handle, device == null ? IntPtr.Zero : device.Handle, changed_device == null ? IntPtr.Zero : changed_device.Handle);
376                 }
377
378                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
379                 static extern void gst_device_provider_device_remove(IntPtr raw, IntPtr device);
380
381                 public void DeviceRemove(Gst.Device device) {
382                         gst_device_provider_device_remove(Handle, device == null ? IntPtr.Zero : device.Handle);
383                 }
384
385                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
386                 static extern IntPtr gst_device_provider_get_bus(IntPtr raw);
387
388                 public Gst.Bus Bus { 
389                         get {
390                                 IntPtr raw_ret = gst_device_provider_get_bus(Handle);
391                                 Gst.Bus ret = GLib.Object.GetObject(raw_ret, true) as Gst.Bus;
392                                 return ret;
393                         }
394                 }
395
396                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
397                 static extern IntPtr gst_device_provider_get_factory(IntPtr raw);
398
399                 public Gst.DeviceProviderFactory Factory { 
400                         get {
401                                 IntPtr raw_ret = gst_device_provider_get_factory(Handle);
402                                 Gst.DeviceProviderFactory ret = GLib.Object.GetObject(raw_ret) as Gst.DeviceProviderFactory;
403                                 return ret;
404                         }
405                 }
406
407                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
408                 static extern IntPtr gst_device_provider_get_hidden_providers(IntPtr raw);
409
410                 public string[] HiddenProviders { 
411                         get {
412                                 IntPtr raw_ret = gst_device_provider_get_hidden_providers(Handle);
413                                 string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
414                                 return ret;
415                         }
416                 }
417
418                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
419                 static extern IntPtr gst_device_provider_get_metadata(IntPtr raw, IntPtr key);
420
421                 public string GetMetadata(string key) {
422                         IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key);
423                         IntPtr raw_ret = gst_device_provider_get_metadata(Handle, native_key);
424                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
425                         GLib.Marshaller.Free (native_key);
426                         return ret;
427                 }
428
429                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
430                 static extern void gst_device_provider_hide_provider(IntPtr raw, IntPtr name);
431
432                 public void HideProvider(string name) {
433                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
434                         gst_device_provider_hide_provider(Handle, native_name);
435                         GLib.Marshaller.Free (native_name);
436                 }
437
438                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
439                 static extern bool gst_device_provider_is_started(IntPtr raw);
440
441                 public bool IsStarted { 
442                         get {
443                                 bool raw_ret = gst_device_provider_is_started(Handle);
444                                 bool ret = raw_ret;
445                                 return ret;
446                         }
447                 }
448
449                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
450                 static extern bool gst_device_provider_start(IntPtr raw);
451
452                 public bool Start() {
453                         bool raw_ret = gst_device_provider_start(Handle);
454                         bool ret = raw_ret;
455                         return ret;
456                 }
457
458                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
459                 static extern void gst_device_provider_stop(IntPtr raw);
460
461                 public void Stop() {
462                         gst_device_provider_stop(Handle);
463                 }
464
465                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
466                 static extern void gst_device_provider_unhide_provider(IntPtr raw, IntPtr name);
467
468                 public void UnhideProvider(string name) {
469                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
470                         gst_device_provider_unhide_provider(Handle, native_name);
471                         GLib.Marshaller.Free (native_name);
472                 }
473
474
475                 // Internal representation of the wrapped structure ABI.
476                 static GLib.AbiStruct _abi_info = null;
477                 static public new GLib.AbiStruct abi_info {
478                         get {
479                                 if (_abi_info == null)
480                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
481                                                 new GLib.AbiField("devices"
482                                                         , Gst.Object.abi_info.Fields
483                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // devices
484                                                         , null
485                                                         , "priv"
486                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
487                                                         , 0
488                                                         ),
489                                                 new GLib.AbiField("priv"
490                                                         , -1
491                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
492                                                         , "devices"
493                                                         , "_gst_reserved"
494                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
495                                                         , 0
496                                                         ),
497                                                 new GLib.AbiField("_gst_reserved"
498                                                         , -1
499                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
500                                                         , "priv"
501                                                         , null
502                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
503                                                         , 0
504                                                         ),
505                                         });
506
507                                 return _abi_info;
508                         }
509                 }
510
511
512                 // End of the ABI representation.
513
514 #endregion
515         }
516 }