gstreamer/sources/generated/Gst.Rtsp/RTSPMessage.cs
Thibault Saunier 2d00f898fb Move generated files to dedicated folders named by namespace
Making it cleaner and simpler to navigate and removing previous
ugly and now useless hack where we were renaming files ourself
to make meson happy.
2018-03-11 21:47:35 -03:00

401 lines
20 KiB
C#

// 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
[StructLayout(LayoutKind.Sequential)]
public partial struct RTSPMessage : IEquatable<RTSPMessage> {
public Gst.Rtsp.RTSPMsgType Type;
private IntPtr HdrFieldsPtr;
private IntPtr _body;
private uint body_size;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=4)]
private IntPtr[] _gstGstReserved;
public static Gst.Rtsp.RTSPMessage Zero = new Gst.Rtsp.RTSPMessage ();
public static Gst.Rtsp.RTSPMessage New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.Rtsp.RTSPMessage.Zero;
return (Gst.Rtsp.RTSPMessage) Marshal.PtrToStructure (raw, typeof (Gst.Rtsp.RTSPMessage));
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_rtsp_msg_get_type();
public static GLib.GType GType {
get {
IntPtr raw_ret = gst_rtsp_msg_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_add_header(IntPtr raw, int field, IntPtr value);
public Gst.Rtsp.RTSPResult AddHeader(Gst.Rtsp.RTSPHeaderField field, string value) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
int raw_ret = gst_rtsp_message_add_header(this_as_native, (int) field, native_value);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_value);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_add_header_by_name(IntPtr raw, IntPtr header, IntPtr value);
public Gst.Rtsp.RTSPResult AddHeaderByName(string header, string value) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header);
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
int raw_ret = gst_rtsp_message_add_header_by_name(this_as_native, native_header, native_value);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_header);
GLib.Marshaller.Free (native_value);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_append_headers(IntPtr raw, IntPtr str);
public Gst.Rtsp.RTSPResult AppendHeaders(string str) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_append_headers(this_as_native, new GLib.GString (str).Handle);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_dump(IntPtr raw);
public Gst.Rtsp.RTSPResult Dump() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_dump(this_as_native);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_get_header(IntPtr raw, int field, out IntPtr value, int indx);
public Gst.Rtsp.RTSPResult GetHeader(Gst.Rtsp.RTSPHeaderField field, out string value, int indx) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_value;
int raw_ret = gst_rtsp_message_get_header(this_as_native, (int) field, out native_value, indx);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
value = GLib.Marshaller.Utf8PtrToString (native_value);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_get_header_by_name(IntPtr raw, IntPtr header, out IntPtr value, int index);
public Gst.Rtsp.RTSPResult GetHeaderByName(string header, out string value, int index) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header);
IntPtr native_value;
int raw_ret = gst_rtsp_message_get_header_by_name(this_as_native, native_header, out native_value, index);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_header);
value = GLib.Marshaller.Utf8PtrToString (native_value);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_get_type(IntPtr raw);
public Gst.Rtsp.RTSPMsgType MessageType {
get {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_get_type(this_as_native);
Gst.Rtsp.RTSPMsgType ret = (Gst.Rtsp.RTSPMsgType) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_init(IntPtr raw);
public Gst.Rtsp.RTSPResult Init() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_init(this_as_native);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_init_data(IntPtr raw, byte channel);
public Gst.Rtsp.RTSPResult InitData(byte channel) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_init_data(this_as_native, channel);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_init_request(IntPtr raw, int method, IntPtr uri);
public Gst.Rtsp.RTSPResult InitRequest(Gst.Rtsp.RTSPMethod method, string uri) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
int raw_ret = gst_rtsp_message_init_request(this_as_native, (int) method, native_uri);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_uri);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_init_response(IntPtr raw, int code, IntPtr reason, IntPtr request);
public Gst.Rtsp.RTSPResult InitResponse(Gst.Rtsp.RTSPStatusCode code, string reason, Gst.Rtsp.RTSPMessage request) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_reason = GLib.Marshaller.StringToPtrGStrdup (reason);
IntPtr native_request = GLib.Marshaller.StructureToPtrAlloc (request);
int raw_ret = gst_rtsp_message_init_response(this_as_native, (int) code, native_reason, native_request);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_reason);
Marshal.FreeHGlobal (native_request);
return ret;
}
public Gst.Rtsp.RTSPResult InitResponse(Gst.Rtsp.RTSPStatusCode code) {
return InitResponse (code, null, Gst.Rtsp.RTSPMessage.Zero);
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_rtsp_message_parse_auth_credentials(IntPtr raw, int field);
public Gst.Rtsp.RTSPAuthCredential ParseAuthCredentials(Gst.Rtsp.RTSPHeaderField field) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr raw_ret = gst_rtsp_message_parse_auth_credentials(this_as_native, (int) field);
Gst.Rtsp.RTSPAuthCredential ret = Gst.Rtsp.RTSPAuthCredential.New (raw_ret);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_parse_data(IntPtr raw, out byte channel);
public Gst.Rtsp.RTSPResult ParseData(out byte channel) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_parse_data(this_as_native, out channel);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_parse_request(IntPtr raw, out int method, out IntPtr uri, out int version);
public Gst.Rtsp.RTSPResult ParseRequest(out Gst.Rtsp.RTSPMethod method, out string uri, out Gst.Rtsp.RTSPVersion version) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int native_method;
IntPtr native_uri;
int native_version;
int raw_ret = gst_rtsp_message_parse_request(this_as_native, out native_method, out native_uri, out native_version);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
method = (Gst.Rtsp.RTSPMethod) native_method;
uri = GLib.Marshaller.PtrToStringGFree(native_uri);
version = (Gst.Rtsp.RTSPVersion) native_version;
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_parse_response(IntPtr raw, out int code, out IntPtr reason, out int version);
public Gst.Rtsp.RTSPResult ParseResponse(out Gst.Rtsp.RTSPStatusCode code, out string reason, out Gst.Rtsp.RTSPVersion version) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int native_code;
IntPtr native_reason;
int native_version;
int raw_ret = gst_rtsp_message_parse_response(this_as_native, out native_code, out native_reason, out native_version);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
code = (Gst.Rtsp.RTSPStatusCode) native_code;
reason = GLib.Marshaller.PtrToStringGFree(native_reason);
version = (Gst.Rtsp.RTSPVersion) native_version;
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_remove_header(IntPtr raw, int field, int indx);
public Gst.Rtsp.RTSPResult RemoveHeader(Gst.Rtsp.RTSPHeaderField field, int indx) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_remove_header(this_as_native, (int) field, indx);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_remove_header_by_name(IntPtr raw, IntPtr header, int index);
public Gst.Rtsp.RTSPResult RemoveHeaderByName(string header, int index) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header);
int raw_ret = gst_rtsp_message_remove_header_by_name(this_as_native, native_header, index);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_header);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_set_body(IntPtr raw, byte[] data, uint size);
public Gst.Rtsp.RTSPResult SetBody(byte[] data, uint size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_set_body(this_as_native, data, size);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_take_body(IntPtr raw, byte[] data, uint size);
public Gst.Rtsp.RTSPResult TakeBody(byte[] data, uint size) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_take_body(this_as_native, data, size);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_take_header(IntPtr raw, int field, IntPtr value);
public Gst.Rtsp.RTSPResult TakeHeader(Gst.Rtsp.RTSPHeaderField field, string value) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_take_header(this_as_native, (int) field, GLib.Marshaller.StringToPtrGStrdup(value));
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_take_header_by_name(IntPtr raw, IntPtr header, IntPtr value);
public Gst.Rtsp.RTSPResult TakeHeaderByName(string header, string value) {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
IntPtr native_header = GLib.Marshaller.StringToPtrGStrdup (header);
int raw_ret = gst_rtsp_message_take_header_by_name(this_as_native, native_header, GLib.Marshaller.StringToPtrGStrdup(value));
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_header);
return ret;
}
[DllImport("libgstrtsp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_rtsp_message_unset(IntPtr raw);
public Gst.Rtsp.RTSPResult Unset() {
IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
int raw_ret = gst_rtsp_message_unset(this_as_native);
Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult) raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.Rtsp.RTSPMessage target)
{
target = New (native);
}
public bool Equals (RTSPMessage other)
{
return true && Type.Equals (other.Type) && HdrFieldsPtr.Equals (other.HdrFieldsPtr) && _body.Equals (other._body) && body_size.Equals (other.body_size);
}
public override bool Equals (object other)
{
return other is RTSPMessage && Equals ((RTSPMessage) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ HdrFieldsPtr.GetHashCode () ^ _body.GetHashCode () ^ body_size.GetHashCode ();
}
public static explicit operator GLib.Value (Gst.Rtsp.RTSPMessage boxed)
{
GLib.Value val = GLib.Value.Empty;
val.Init (Gst.Rtsp.RTSPMessage.GType);
val.Val = boxed;
return val;
}
public static explicit operator Gst.Rtsp.RTSPMessage (GLib.Value val)
{
return (Gst.Rtsp.RTSPMessage) val.Val;
}
#endregion
}
}