Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / Promise.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 Promise : Gst.MiniObject {
13
14                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
15                 static extern IntPtr gst_promise_get_type();
16
17                 public static GLib.GType GType { 
18                         get {
19                                 IntPtr raw_ret = gst_promise_get_type();
20                                 GLib.GType ret = new GLib.GType(raw_ret);
21                                 return ret;
22                         }
23                 }
24
25                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
26                 static extern void gst_promise_expire(IntPtr raw);
27
28                 public void Expire() {
29                         gst_promise_expire(Handle);
30                 }
31
32                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
33                 static extern IntPtr gst_promise_get_reply(IntPtr raw);
34
35                 public Gst.Structure RetrieveReply() {
36                         IntPtr raw_ret = gst_promise_get_reply(Handle);
37                         Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
38                         return ret;
39                 }
40
41                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
42                 static extern void gst_promise_interrupt(IntPtr raw);
43
44                 public void Interrupt() {
45                         gst_promise_interrupt(Handle);
46                 }
47
48                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
49                 static extern void gst_promise_reply(IntPtr raw, IntPtr s);
50
51                 public void Reply(Gst.Structure s) {
52                         s.Owned = false;
53                         gst_promise_reply(Handle, s == null ? IntPtr.Zero : s.Handle);
54                 }
55
56                 public void Reply() {
57                         Reply (null);
58                 }
59
60                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
61                 static extern int gst_promise_wait(IntPtr raw);
62
63                 public Gst.PromiseResult Wait() {
64                         int raw_ret = gst_promise_wait(Handle);
65                         Gst.PromiseResult ret = (Gst.PromiseResult) raw_ret;
66                         return ret;
67                 }
68
69                 public Promise(IntPtr raw) : base(raw) {}
70
71                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
72                 static extern IntPtr gst_promise_new();
73
74                 public Promise () 
75                 {
76                         Raw = gst_promise_new();
77                 }
78
79                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
80                 static extern IntPtr gst_promise_new_with_change_func(GstSharp.PromiseChangeFuncNative func, IntPtr user_data, GLib.DestroyNotify notify);
81
82                 public Promise (Gst.PromiseChangeFunc func) 
83                 {
84                         GstSharp.PromiseChangeFuncWrapper func_wrapper = new GstSharp.PromiseChangeFuncWrapper (func);
85                         IntPtr user_data;
86                         GLib.DestroyNotify notify;
87                         if (func == null) {
88                                 user_data = IntPtr.Zero;
89                                 notify = null;
90                         } else {
91                                 user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
92                                 notify = GLib.DestroyHelper.NotifyHandler;
93                         }
94                         Raw = gst_promise_new_with_change_func(func_wrapper.NativeDelegate, user_data, notify);
95                 }
96
97
98                 // Internal representation of the wrapped structure ABI.
99                 static GLib.AbiStruct _abi_info = null;
100                 static public new GLib.AbiStruct abi_info {
101                         get {
102                                 if (_abi_info == null)
103                                         _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields);
104
105                                 return _abi_info;
106                         }
107                 }
108
109
110                 // End of the ABI representation.
111
112 #endregion
113         }
114 }