summaryrefslogtreecommitdiff
path: root/sources/generated/Gst.Rtsp/Global.cs
blob: 86dd03355d9e9105a8ff6a69bd3fec0789387206 (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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst.Rtsp {

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

#region Autogenerated code
	public partial class Global {

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_rtsp_auth_credentials_free(IntPtr credentials);

		public static void RtspAuthCredentialsFree(Gst.Rtsp.RTSPAuthCredential credentials) {
			IntPtr native_credentials = GLib.Marshaller.StructureToPtrAlloc (credentials);
			gst_rtsp_auth_credentials_free(native_credentials);
			Marshal.FreeHGlobal (native_credentials);
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_connection_accept(IntPtr socket, out IntPtr conn, IntPtr cancellable);

		public static Gst.Rtsp.RTSPResult RtspConnectionAccept(GLib.Socket socket, out Gst.Rtsp.RTSPConnection conn, GLib.Cancellable cancellable) {
			IntPtr native_conn;
			int raw_ret = gst_rtsp_connection_accept(socket == null ? IntPtr.Zero : socket.Handle, out native_conn, cancellable == null ? IntPtr.Zero : cancellable.Handle);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true);
			return ret;
		}

		public static Gst.Rtsp.RTSPResult RtspConnectionAccept(GLib.Socket socket, out Gst.Rtsp.RTSPConnection conn) {
			return RtspConnectionAccept (socket, out conn, null);
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_connection_create(IntPtr url, out IntPtr conn);

		public static Gst.Rtsp.RTSPResult RtspConnectionCreate(Gst.Rtsp.RTSPUrl url, out Gst.Rtsp.RTSPConnection conn) {
			IntPtr native_url = GLib.Marshaller.StructureToPtrAlloc (url);
			IntPtr native_conn;
			int raw_ret = gst_rtsp_connection_create(native_url, out native_conn);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			Marshal.FreeHGlobal (native_url);
			conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_connection_create_from_socket(IntPtr socket, IntPtr ip, ushort port, IntPtr initial_buffer, out IntPtr conn);

		public static Gst.Rtsp.RTSPResult RtspConnectionCreateFromSocket(GLib.Socket socket, string ip, ushort port, string initial_buffer, out Gst.Rtsp.RTSPConnection conn) {
			IntPtr native_ip = GLib.Marshaller.StringToPtrGStrdup (ip);
			IntPtr native_initial_buffer = GLib.Marshaller.StringToPtrGStrdup (initial_buffer);
			IntPtr native_conn;
			int raw_ret = gst_rtsp_connection_create_from_socket(socket == null ? IntPtr.Zero : socket.Handle, native_ip, port, native_initial_buffer, out native_conn);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			GLib.Marshaller.Free (native_ip);
			GLib.Marshaller.Free (native_initial_buffer);
			conn = native_conn == IntPtr.Zero ? null : (Gst.Rtsp.RTSPConnection) GLib.Opaque.GetOpaque (native_conn, typeof (Gst.Rtsp.RTSPConnection), true);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_find_header_field(IntPtr header);

		public static Gst.Rtsp.RTSPHeaderField RtspFindHeaderField(string header) {
			IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header);
			int raw_ret = gst_rtsp_find_header_field(native_header);
			Gst.Rtsp.RTSPHeaderField ret = (Gst.Rtsp.RTSPHeaderField) raw_ret;
			GLib.Marshaller.Free (native_header);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_find_method(IntPtr method);

		public static Gst.Rtsp.RTSPMethod RtspFindMethod(string method) {
			IntPtr native_method = GLib.Marshaller.StringToPtrGStrdup (method);
			int raw_ret = gst_rtsp_find_method(native_method);
			Gst.Rtsp.RTSPMethod ret = (Gst.Rtsp.RTSPMethod) raw_ret;
			GLib.Marshaller.Free (native_method);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_generate_digest_auth_response(IntPtr algorithm, IntPtr method, IntPtr realm, IntPtr username, IntPtr password, IntPtr uri, IntPtr nonce);

		public static string RtspGenerateDigestAuthResponse(string algorithm, string method, string realm, string username, string password, string uri, string nonce) {
			IntPtr native_algorithm = GLib.Marshaller.StringToPtrGStrdup (algorithm);
			IntPtr native_method = GLib.Marshaller.StringToPtrGStrdup (method);
			IntPtr native_realm = GLib.Marshaller.StringToPtrGStrdup (realm);
			IntPtr native_username = GLib.Marshaller.StringToPtrGStrdup (username);
			IntPtr native_password = GLib.Marshaller.StringToPtrGStrdup (password);
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			IntPtr native_nonce = GLib.Marshaller.StringToPtrGStrdup (nonce);
			IntPtr raw_ret = gst_rtsp_generate_digest_auth_response(native_algorithm, native_method, native_realm, native_username, native_password, native_uri, native_nonce);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			GLib.Marshaller.Free (native_algorithm);
			GLib.Marshaller.Free (native_method);
			GLib.Marshaller.Free (native_realm);
			GLib.Marshaller.Free (native_username);
			GLib.Marshaller.Free (native_password);
			GLib.Marshaller.Free (native_uri);
			GLib.Marshaller.Free (native_nonce);
			return ret;
		}

		public static string RtspGenerateDigestAuthResponse(string method, string realm, string username, string password, string uri, string nonce) {
			return RtspGenerateDigestAuthResponse (null, method, realm, username, password, uri, nonce);
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtsp_header_allow_multiple(int field);

		public static bool RtspHeaderAllowMultiple(Gst.Rtsp.RTSPHeaderField field) {
			bool raw_ret = gst_rtsp_header_allow_multiple((int) field);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_header_as_text(int field);

		public static string RtspHeaderAsText(Gst.Rtsp.RTSPHeaderField field) {
			IntPtr raw_ret = gst_rtsp_header_as_text((int) field);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_message_new(IntPtr msg);

		public static Gst.Rtsp.RTSPResult RtspMessageNew(out Gst.Rtsp.RTSPMessage msg) {
			IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage)));
			int raw_ret = gst_rtsp_message_new(native_msg);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			msg = Gst.Rtsp.RTSPMessage.New (native_msg);
			Marshal.FreeHGlobal (native_msg);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_message_new_data(IntPtr msg, byte channel);

		public static Gst.Rtsp.RTSPResult RtspMessageNewData(out Gst.Rtsp.RTSPMessage msg, byte channel) {
			IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage)));
			int raw_ret = gst_rtsp_message_new_data(native_msg, channel);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			msg = Gst.Rtsp.RTSPMessage.New (native_msg);
			Marshal.FreeHGlobal (native_msg);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_message_new_request(IntPtr msg, int method, IntPtr uri);

		public static Gst.Rtsp.RTSPResult RtspMessageNewRequest(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPMethod method, string uri) {
			IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage)));
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			int raw_ret = gst_rtsp_message_new_request(native_msg, (int) method, native_uri);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			msg = Gst.Rtsp.RTSPMessage.New (native_msg);
			Marshal.FreeHGlobal (native_msg);
			GLib.Marshaller.Free (native_uri);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_message_new_response(IntPtr msg, int code, IntPtr reason, IntPtr request);

		public static Gst.Rtsp.RTSPResult RtspMessageNewResponse(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPStatusCode code, string reason, Gst.Rtsp.RTSPMessage request) {
			IntPtr native_msg = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPMessage)));
			IntPtr native_reason = GLib.Marshaller.StringToPtrGStrdup (reason);
			IntPtr native_request = GLib.Marshaller.StructureToPtrAlloc (request);
			int raw_ret = gst_rtsp_message_new_response(native_msg, (int) code, native_reason, native_request);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			msg = Gst.Rtsp.RTSPMessage.New (native_msg);
			Marshal.FreeHGlobal (native_msg);
			GLib.Marshaller.Free (native_reason);
			Marshal.FreeHGlobal (native_request);
			return ret;
		}

		public static Gst.Rtsp.RTSPResult RtspMessageNewResponse(out Gst.Rtsp.RTSPMessage msg, Gst.Rtsp.RTSPStatusCode code) {
			return RtspMessageNewResponse (out msg, code, null, Gst.Rtsp.RTSPMessage.Zero);
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_method_as_text(int method);

		public static string RtspMethodAsText(Gst.Rtsp.RTSPMethod method) {
			IntPtr raw_ret = gst_rtsp_method_as_text((int) method);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_options_as_text(int options);

		public static string RtspOptionsAsText(Gst.Rtsp.RTSPMethod options) {
			IntPtr raw_ret = gst_rtsp_options_as_text((int) options);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_options_from_text(IntPtr options);

		public static Gst.Rtsp.RTSPMethod RtspOptionsFromText(string options) {
			IntPtr native_options = GLib.Marshaller.StringToPtrGStrdup (options);
			int raw_ret = gst_rtsp_options_from_text(native_options);
			Gst.Rtsp.RTSPMethod ret = (Gst.Rtsp.RTSPMethod) raw_ret;
			GLib.Marshaller.Free (native_options);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtsp_range_convert_units(IntPtr range, int unit);

		public static bool RtspRangeConvertUnits(Gst.Rtsp.RTSPTimeRange range, Gst.Rtsp.RTSPRangeUnit unit) {
			IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
			bool raw_ret = gst_rtsp_range_convert_units(native_range, (int) unit);
			bool ret = raw_ret;
			Marshal.FreeHGlobal (native_range);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_rtsp_range_free(IntPtr range);

		public static void RtspRangeFree(Gst.Rtsp.RTSPTimeRange range) {
			IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
			gst_rtsp_range_free(native_range);
			Marshal.FreeHGlobal (native_range);
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtsp_range_get_times(IntPtr range, out ulong min, out ulong max);

		public static bool RtspRangeGetTimes(Gst.Rtsp.RTSPTimeRange range, out ulong min, out ulong max) {
			IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
			bool raw_ret = gst_rtsp_range_get_times(native_range, out min, out max);
			bool ret = raw_ret;
			Marshal.FreeHGlobal (native_range);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_range_parse(IntPtr rangestr, IntPtr range);

		public static Gst.Rtsp.RTSPResult RtspRangeParse(string rangestr, out Gst.Rtsp.RTSPTimeRange range) {
			IntPtr native_rangestr = GLib.Marshaller.StringToPtrGStrdup (rangestr);
			IntPtr native_range = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPTimeRange)));
			int raw_ret = gst_rtsp_range_parse(native_rangestr, native_range);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			GLib.Marshaller.Free (native_rangestr);
			range = Gst.Rtsp.RTSPTimeRange.New (native_range);
			Marshal.FreeHGlobal (native_range);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_range_to_string(IntPtr range);

		public static string RtspRangeToString(Gst.Rtsp.RTSPTimeRange range) {
			IntPtr native_range = GLib.Marshaller.StructureToPtrAlloc (range);
			IntPtr raw_ret = gst_rtsp_range_to_string(native_range);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			Marshal.FreeHGlobal (native_range);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_status_as_text(int code);

		public static string RtspStatusAsText(Gst.Rtsp.RTSPStatusCode code) {
			IntPtr raw_ret = gst_rtsp_status_as_text((int) code);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_strresult(int _result);

		public static string RtspStrresult(Gst.Rtsp.RTSPResult _result) {
			IntPtr raw_ret = gst_rtsp_strresult((int) _result);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_transport_get_manager(int trans, out IntPtr manager, uint option);

		public static Gst.Rtsp.RTSPResult RtspTransportGetManager(Gst.Rtsp.RTSPTransMode trans, out string manager, uint option) {
			IntPtr native_manager;
			int raw_ret = gst_rtsp_transport_get_manager((int) trans, out native_manager, option);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			manager = GLib.Marshaller.Utf8PtrToString (native_manager);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_transport_get_mime(int trans, IntPtr mime);

		[Obsolete]
		public static Gst.Rtsp.RTSPResult RtspTransportGetMime(Gst.Rtsp.RTSPTransMode trans, string mime) {
			IntPtr native_mime = GLib.Marshaller.StringToPtrGStrdup (mime);
			int raw_ret = gst_rtsp_transport_get_mime((int) trans, native_mime);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			GLib.Marshaller.Free (native_mime);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_transport_new(IntPtr transport);

		public static Gst.Rtsp.RTSPResult RtspTransportNew(Gst.Rtsp.RTSPTransport transport) {
			IntPtr native_transport = GLib.Marshaller.StructureToPtrAlloc (transport);
			int raw_ret = gst_rtsp_transport_new(native_transport);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			Marshal.FreeHGlobal (native_transport);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_transport_parse(IntPtr str, IntPtr transport);

		public static Gst.Rtsp.RTSPResult RtspTransportParse(string str, Gst.Rtsp.RTSPTransport transport) {
			IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str);
			IntPtr native_transport = GLib.Marshaller.StructureToPtrAlloc (transport);
			int raw_ret = gst_rtsp_transport_parse(native_str, native_transport);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			GLib.Marshaller.Free (native_str);
			Marshal.FreeHGlobal (native_transport);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtsp_url_parse(IntPtr urlstr, IntPtr url);

		public static Gst.Rtsp.RTSPResult RtspUrlParse(string urlstr, out Gst.Rtsp.RTSPUrl url) {
			IntPtr native_urlstr = GLib.Marshaller.StringToPtrGStrdup (urlstr);
			IntPtr native_url = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Rtsp.RTSPUrl)));
			int raw_ret = gst_rtsp_url_parse(native_urlstr, native_url);
			Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
			GLib.Marshaller.Free (native_urlstr);
			url = Gst.Rtsp.RTSPUrl.New (native_url);
			Marshal.FreeHGlobal (native_url);
			return ret;
		}

		[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtsp_version_as_text(int version);

		public static string RtspVersionAsText(Gst.Rtsp.RTSPVersion version) {
			IntPtr raw_ret = gst_rtsp_version_as_text((int) version);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

#endregion
	}
}