summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/DateTime.cs
blob: 56639ccf5f1f1235509151124cd3b451b1fa62db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class DateTime : GLib.Opaque {

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_get_type();

		public static GLib.GType GType { 
			get {
				IntPtr raw_ret = gst_date_time_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_day(IntPtr raw);

		public int Day { 
			get {
				int raw_ret = gst_date_time_get_day(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_hour(IntPtr raw);

		public int Hour { 
			get {
				int raw_ret = gst_date_time_get_hour(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_microsecond(IntPtr raw);

		public int Microsecond { 
			get {
				int raw_ret = gst_date_time_get_microsecond(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_minute(IntPtr raw);

		public int Minute { 
			get {
				int raw_ret = gst_date_time_get_minute(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_month(IntPtr raw);

		public int Month { 
			get {
				int raw_ret = gst_date_time_get_month(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_second(IntPtr raw);

		public int Second { 
			get {
				int raw_ret = gst_date_time_get_second(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern float gst_date_time_get_time_zone_offset(IntPtr raw);

		public float TimeZoneOffset { 
			get {
				float raw_ret = gst_date_time_get_time_zone_offset(Handle);
				float ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_date_time_get_year(IntPtr raw);

		public int Year { 
			get {
				int raw_ret = gst_date_time_get_year(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_date_time_has_day(IntPtr raw);

		public bool HasDay { 
			get {
				bool raw_ret = gst_date_time_has_day(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_date_time_has_month(IntPtr raw);

		public bool HasMonth { 
			get {
				bool raw_ret = gst_date_time_has_month(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_date_time_has_second(IntPtr raw);

		public bool HasSecond { 
			get {
				bool raw_ret = gst_date_time_has_second(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_date_time_has_time(IntPtr raw);

		public bool HasTime { 
			get {
				bool raw_ret = gst_date_time_has_time(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_date_time_has_year(IntPtr raw);

		public bool HasYear { 
			get {
				bool raw_ret = gst_date_time_has_year(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_to_g_date_time(IntPtr raw);

		public GLib.DateTime ToGDateTime() {
			IntPtr raw_ret = gst_date_time_to_g_date_time(Handle);
			GLib.DateTime ret = new GLib.DateTime(raw_ret);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_to_iso8601_string(IntPtr raw);

		public string ToIso8601String() {
			IntPtr raw_ret = gst_date_time_to_iso8601_string(Handle);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

		public DateTime(IntPtr raw) : base(raw) {}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new(float tzoffset, int year, int month, int day, int hour, int minute, double seconds);

		public DateTime (float tzoffset, int year, int month, int day, int hour, int minute, double seconds) 
		{
			Raw = gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_from_g_date_time(IntPtr dt);

		public DateTime (GLib.DateTime dt) 
		{
			Raw = gst_date_time_new_from_g_date_time(dt == null ? IntPtr.Zero : dt.Handle);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_from_iso8601_string(IntPtr str1ng);

		public DateTime (string str1ng) 
		{
			IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng);
			Raw = gst_date_time_new_from_iso8601_string(native_str1ng);
			GLib.Marshaller.Free (native_str1ng);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_from_unix_epoch_local_time(long secs);

		public DateTime (long secs) 
		{
			Raw = gst_date_time_new_from_unix_epoch_local_time(secs);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_from_unix_epoch_utc(long secs);

		public static DateTime NewFromUnixEpochUtc(long secs)
		{
			DateTime result = new DateTime (gst_date_time_new_from_unix_epoch_utc(secs));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_local_time(int year, int month, int day, int hour, int minute, double seconds);

		public DateTime (int year, int month, int day, int hour, int minute, double seconds) 
		{
			Raw = gst_date_time_new_local_time(year, month, day, hour, minute, seconds);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_now_local_time();

		public DateTime () 
		{
			Raw = gst_date_time_new_now_local_time();
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_now_utc();

		public static DateTime NewNowUtc()
		{
			DateTime result = new DateTime (gst_date_time_new_now_utc());
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_y(int year);

		public DateTime (int year) 
		{
			Raw = gst_date_time_new_y(year);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_ym(int year, int month);

		public DateTime (int year, int month) 
		{
			Raw = gst_date_time_new_ym(year, month);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_new_ymd(int year, int month, int day);

		public DateTime (int year, int month, int day) 
		{
			Raw = gst_date_time_new_ymd(year, month, day);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_date_time_ref(IntPtr raw);

		protected override void Ref (IntPtr raw)
		{
			if (!Owned) {
				gst_date_time_ref (raw);
				Owned = true;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_date_time_unref(IntPtr raw);

		protected override void Unref (IntPtr raw)
		{
			if (Owned) {
				gst_date_time_unref (raw);
				Owned = false;
			}
		}

		class FinalizerInfo {
			IntPtr handle;

			public FinalizerInfo (IntPtr handle)
			{
				this.handle = handle;
			}

			public bool Handler ()
			{
				gst_date_time_unref (handle);
				return false;
			}
		}

		~DateTime ()
		{
			if (!Owned)
				return;
			FinalizerInfo info = new FinalizerInfo (Handle);
			GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler));
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}