Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / TocEntry.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         [StructLayout(LayoutKind.Sequential)]
13         public partial struct TocEntry : IEquatable<TocEntry> {
14
15
16                 public static Gst.TocEntry Zero = new Gst.TocEntry ();
17
18                 public static Gst.TocEntry New(IntPtr raw) {
19                         if (raw == IntPtr.Zero)
20                                 return Gst.TocEntry.Zero;
21                         return (Gst.TocEntry) Marshal.PtrToStructure (raw, typeof (Gst.TocEntry));
22                 }
23
24                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25                 static extern IntPtr gst_toc_entry_new(int type, IntPtr uid);
26
27                 public static TocEntry New(Gst.TocEntryType type, string uid)
28                 {
29                         IntPtr native_uid = GLib.Marshaller.StringToPtrGStrdup (uid);
30                         TocEntry result = TocEntry.New (gst_toc_entry_new((int) type, native_uid));
31                         GLib.Marshaller.Free (native_uid);
32                         return result;
33                 }
34
35                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
36                 static extern IntPtr gst_toc_entry_get_type();
37
38                 public static GLib.GType GType { 
39                         get {
40                                 IntPtr raw_ret = gst_toc_entry_get_type();
41                                 GLib.GType ret = new GLib.GType(raw_ret);
42                                 return ret;
43                         }
44                 }
45
46                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
47                 static extern void gst_toc_entry_append_sub_entry(IntPtr raw, IntPtr subentry);
48
49                 public void AppendSubEntry(Gst.TocEntry subentry) {
50                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
51                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
52                         IntPtr native_subentry = GLib.Marshaller.StructureToPtrAlloc (subentry);
53                         gst_toc_entry_append_sub_entry(this_as_native, native_subentry);
54                         ReadNative (this_as_native, ref this);
55                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
56                         Marshal.FreeHGlobal (native_subentry);
57                 }
58
59                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
60                 static extern int gst_toc_entry_get_entry_type(IntPtr raw);
61
62                 public Gst.TocEntryType EntryType { 
63                         get {
64                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
65                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
66                                 int raw_ret = gst_toc_entry_get_entry_type(this_as_native);
67                                 Gst.TocEntryType ret = (Gst.TocEntryType) raw_ret;
68                                 ReadNative (this_as_native, ref this);
69                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
70                                 return ret;
71                         }
72                 }
73
74                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
75                 static extern bool gst_toc_entry_get_loop(IntPtr raw, out int loop_type, out int repeat_count);
76
77                 public bool GetLoop(out Gst.TocLoopType loop_type, out int repeat_count) {
78                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
79                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
80                         int native_loop_type;
81                         bool raw_ret = gst_toc_entry_get_loop(this_as_native, out native_loop_type, out repeat_count);
82                         bool ret = raw_ret;
83                         ReadNative (this_as_native, ref this);
84                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
85                         loop_type = (Gst.TocLoopType) native_loop_type;
86                         return ret;
87                 }
88
89                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
90                 static extern IntPtr gst_toc_entry_get_parent(IntPtr raw);
91
92                 public Gst.TocEntry Parent { 
93                         get {
94                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
95                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
96                                 IntPtr raw_ret = gst_toc_entry_get_parent(this_as_native);
97                                 Gst.TocEntry ret = Gst.TocEntry.New (raw_ret);
98                                 ReadNative (this_as_native, ref this);
99                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
100                                 return ret;
101                         }
102                 }
103
104                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
105                 static extern bool gst_toc_entry_get_start_stop_times(IntPtr raw, out long start, out long stop);
106
107                 public bool GetStartStopTimes(out long start, out long stop) {
108                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
109                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
110                         bool raw_ret = gst_toc_entry_get_start_stop_times(this_as_native, out start, out stop);
111                         bool ret = raw_ret;
112                         ReadNative (this_as_native, ref this);
113                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
114                         return ret;
115                 }
116
117                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
118                 static extern IntPtr gst_toc_entry_get_sub_entries(IntPtr raw);
119
120                 public GLib.List[] SubEntries { 
121                         get {
122                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
123                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
124                                 IntPtr raw_ret = gst_toc_entry_get_sub_entries(this_as_native);
125                                 GLib.List[] ret = (GLib.List[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(GLib.List));
126                                 ReadNative (this_as_native, ref this);
127                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
128                                 return ret;
129                         }
130                 }
131
132                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
133                 static extern IntPtr gst_toc_entry_get_tags(IntPtr raw);
134
135                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
136                 static extern void gst_toc_entry_set_tags(IntPtr raw, IntPtr tags);
137
138                 public Gst.TagList Tags { 
139                         get {
140                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
141                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
142                                 IntPtr raw_ret = gst_toc_entry_get_tags(this_as_native);
143                                 Gst.TagList ret = raw_ret == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.TagList), false);
144                                 ReadNative (this_as_native, ref this);
145                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
146                                 return ret;
147                         }
148                         set {
149                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
150                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
151                                 value.Owned = false;
152                                 gst_toc_entry_set_tags(this_as_native, value == null ? IntPtr.Zero : value.Handle);
153                                 ReadNative (this_as_native, ref this);
154                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
155                         }
156                 }
157
158                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
159                 static extern IntPtr gst_toc_entry_get_toc(IntPtr raw);
160
161                 public Gst.Toc Toc { 
162                         get {
163                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
164                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
165                                 IntPtr raw_ret = gst_toc_entry_get_toc(this_as_native);
166                                 Gst.Toc ret = Gst.Toc.New (raw_ret);
167                                 ReadNative (this_as_native, ref this);
168                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
169                                 return ret;
170                         }
171                 }
172
173                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
174                 static extern IntPtr gst_toc_entry_get_uid(IntPtr raw);
175
176                 public string Uid { 
177                         get {
178                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
179                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
180                                 IntPtr raw_ret = gst_toc_entry_get_uid(this_as_native);
181                                 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
182                                 ReadNative (this_as_native, ref this);
183                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
184                                 return ret;
185                         }
186                 }
187
188                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
189                 static extern bool gst_toc_entry_is_alternative(IntPtr raw);
190
191                 public bool IsAlternative { 
192                         get {
193                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
194                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
195                                 bool raw_ret = gst_toc_entry_is_alternative(this_as_native);
196                                 bool ret = raw_ret;
197                                 ReadNative (this_as_native, ref this);
198                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
199                                 return ret;
200                         }
201                 }
202
203                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
204                 static extern bool gst_toc_entry_is_sequence(IntPtr raw);
205
206                 public bool IsSequence { 
207                         get {
208                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
209                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
210                                 bool raw_ret = gst_toc_entry_is_sequence(this_as_native);
211                                 bool ret = raw_ret;
212                                 ReadNative (this_as_native, ref this);
213                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
214                                 return ret;
215                         }
216                 }
217
218                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
219                 static extern void gst_toc_entry_merge_tags(IntPtr raw, IntPtr tags, int mode);
220
221                 public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) {
222                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
223                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
224                         gst_toc_entry_merge_tags(this_as_native, tags == null ? IntPtr.Zero : tags.Handle, (int) mode);
225                         ReadNative (this_as_native, ref this);
226                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
227                 }
228
229                 public void MergeTags(Gst.TagMergeMode mode) {
230                         MergeTags (null, mode);
231                 }
232
233                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234                 static extern void gst_toc_entry_set_loop(IntPtr raw, int loop_type, int repeat_count);
235
236                 public void SetLoop(Gst.TocLoopType loop_type, int repeat_count) {
237                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
238                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
239                         gst_toc_entry_set_loop(this_as_native, (int) loop_type, repeat_count);
240                         ReadNative (this_as_native, ref this);
241                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
242                 }
243
244                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
245                 static extern void gst_toc_entry_set_start_stop_times(IntPtr raw, long start, long stop);
246
247                 public void SetStartStopTimes(long start, long stop) {
248                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
249                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
250                         gst_toc_entry_set_start_stop_times(this_as_native, start, stop);
251                         ReadNative (this_as_native, ref this);
252                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
253                 }
254
255                 static void ReadNative (IntPtr native, ref Gst.TocEntry target)
256                 {
257                         target = New (native);
258                 }
259
260                 public bool Equals (TocEntry other)
261                 {
262                         return true;
263                 }
264
265                 public override bool Equals (object other)
266                 {
267                         return other is TocEntry && Equals ((TocEntry) other);
268                 }
269
270                 public override int GetHashCode ()
271                 {
272                         return this.GetType ().FullName.GetHashCode ();
273                 }
274
275                 public static explicit operator GLib.Value (Gst.TocEntry boxed)
276                 {
277                         GLib.Value val = GLib.Value.Empty;
278                         val.Init (Gst.TocEntry.GType);
279                         val.Val = boxed;
280                         return val;
281                 }
282
283                 public static explicit operator Gst.TocEntry (GLib.Value val)
284                 {
285                         return (Gst.TocEntry) val.Val;
286                 }
287 #endregion
288         }
289 }