// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace Gst.Sdp { using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; #region Autogenerated code public partial class SDPMessage : GLib.Opaque { [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_version(IntPtr raw); public string Version { get { IntPtr raw_ret = gst_sdp_message_get_version(Handle); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("version")); *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_origin(IntPtr raw); public Gst.Sdp.SDPOrigin Origin { get { IntPtr raw_ret = gst_sdp_message_get_origin(Handle); Gst.Sdp.SDPOrigin ret = Gst.Sdp.SDPOrigin.New (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("origin")); *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_session_name(IntPtr raw); public string SessionName { get { IntPtr raw_ret = gst_sdp_message_get_session_name(Handle); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("session_name")); *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_information(IntPtr raw); public string Information { get { IntPtr raw_ret = gst_sdp_message_get_information(Handle); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("information")); *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_uri(IntPtr raw); public string Uri { get { IntPtr raw_ret = gst_sdp_message_get_uri(Handle); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("uri")); *raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_connection(IntPtr raw); public Gst.Sdp.SDPConnection Connection { get { IntPtr raw_ret = gst_sdp_message_get_connection(Handle); Gst.Sdp.SDPConnection ret = Gst.Sdp.SDPConnection.New (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("connection")); *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_key(IntPtr raw); public Gst.Sdp.SDPKey Key { get { IntPtr raw_ret = gst_sdp_message_get_key(Handle); Gst.Sdp.SDPKey ret = Gst.Sdp.SDPKey.New (raw_ret); return ret; } set { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("key")); *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value); } } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_type(); public static GLib.GType GType { get { IntPtr raw_ret = gst_sdp_message_get_type(); GLib.GType ret = new GLib.GType(raw_ret); return ret; } } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_attribute(IntPtr raw, IntPtr key, IntPtr value); public Gst.Sdp.SDPResult AddAttribute(string key, string value) { IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); int raw_ret = gst_sdp_message_add_attribute(Handle, native_key, native_value); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_key); GLib.Marshaller.Free (native_value); return ret; } public Gst.Sdp.SDPResult AddAttribute(string key) { return AddAttribute (key, null); } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_bandwidth(IntPtr raw, IntPtr bwtype, uint bandwidth); public Gst.Sdp.SDPResult AddBandwidth(string bwtype, uint bandwidth) { IntPtr native_bwtype = GLib.Marshaller.StringToPtrGStrdup (bwtype); int raw_ret = gst_sdp_message_add_bandwidth(Handle, native_bwtype, bandwidth); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_bwtype); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_email(IntPtr raw, IntPtr email); public Gst.Sdp.SDPResult AddEmail(string email) { IntPtr native_email = GLib.Marshaller.StringToPtrGStrdup (email); int raw_ret = gst_sdp_message_add_email(Handle, native_email); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_email); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_media(IntPtr raw, IntPtr media); public Gst.Sdp.SDPResult AddMedia(Gst.Sdp.SDPMedia media) { IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc (media); int raw_ret = gst_sdp_message_add_media(Handle, native_media); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_media); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_phone(IntPtr raw, IntPtr phone); public Gst.Sdp.SDPResult AddPhone(string phone) { IntPtr native_phone = GLib.Marshaller.StringToPtrGStrdup (phone); int raw_ret = gst_sdp_message_add_phone(Handle, native_phone); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_phone); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_time(IntPtr raw, IntPtr start, IntPtr stop, IntPtr repeat); public Gst.Sdp.SDPResult AddTime(string start, string stop, string[] repeat) { IntPtr native_start = GLib.Marshaller.StringToPtrGStrdup (start); IntPtr native_stop = GLib.Marshaller.StringToPtrGStrdup (stop); IntPtr native_repeat = GLib.Marshaller.StringArrayToStrvPtr(repeat, true); int raw_ret = gst_sdp_message_add_time(Handle, native_start, native_stop, native_repeat); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_start); GLib.Marshaller.Free (native_stop); GLib.Marshaller.StrFreeV (native_repeat); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_add_zone(IntPtr raw, IntPtr adj_time, IntPtr typed_time); public Gst.Sdp.SDPResult AddZone(string adj_time, string typed_time) { IntPtr native_adj_time = GLib.Marshaller.StringToPtrGStrdup (adj_time); IntPtr native_typed_time = GLib.Marshaller.StringToPtrGStrdup (typed_time); int raw_ret = gst_sdp_message_add_zone(Handle, native_adj_time, native_typed_time); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_adj_time); GLib.Marshaller.Free (native_typed_time); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_as_text(IntPtr raw); public string AsText() { IntPtr raw_ret = gst_sdp_message_as_text(Handle); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_attributes_len(IntPtr raw); public uint AttributesLen() { uint raw_ret = gst_sdp_message_attributes_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_attributes_to_caps(IntPtr raw, IntPtr caps); public Gst.Sdp.SDPResult AttributesToCaps(Gst.Caps caps) { int raw_ret = gst_sdp_message_attributes_to_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_bandwidths_len(IntPtr raw); public uint BandwidthsLen() { uint raw_ret = gst_sdp_message_bandwidths_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_copy(IntPtr raw, out IntPtr copy); public Gst.Sdp.SDPResult Copy(out Gst.Sdp.SDPMessage copy) { IntPtr native_copy; int raw_ret = gst_sdp_message_copy(Handle, out native_copy); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; copy = native_copy == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_copy, typeof (Gst.Sdp.SDPMessage), true); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_dump(IntPtr raw); public Gst.Sdp.SDPResult Dump() { int raw_ret = gst_sdp_message_dump(Handle); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_emails_len(IntPtr raw); public uint EmailsLen() { uint raw_ret = gst_sdp_message_emails_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_free(IntPtr raw); public Gst.Sdp.SDPResult Free() { int raw_ret = gst_sdp_message_free(Handle); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_attribute(IntPtr raw, uint idx); public Gst.Sdp.SDPAttribute GetAttribute(uint idx) { IntPtr raw_ret = gst_sdp_message_get_attribute(Handle, idx); Gst.Sdp.SDPAttribute ret = Gst.Sdp.SDPAttribute.New (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_attribute_val(IntPtr raw, IntPtr key); public string GetAttributeVal(string key) { IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); IntPtr raw_ret = gst_sdp_message_get_attribute_val(Handle, native_key); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); GLib.Marshaller.Free (native_key); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_attribute_val_n(IntPtr raw, IntPtr key, uint nth); public string GetAttributeValN(string key, uint nth) { IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup (key); IntPtr raw_ret = gst_sdp_message_get_attribute_val_n(Handle, native_key, nth); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); GLib.Marshaller.Free (native_key); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_bandwidth(IntPtr raw, uint idx); public Gst.Sdp.SDPBandwidth GetBandwidth(uint idx) { IntPtr raw_ret = gst_sdp_message_get_bandwidth(Handle, idx); Gst.Sdp.SDPBandwidth ret = Gst.Sdp.SDPBandwidth.New (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_email(IntPtr raw, uint idx); public string GetEmail(uint idx) { IntPtr raw_ret = gst_sdp_message_get_email(Handle, idx); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_media(IntPtr raw, uint idx); public Gst.Sdp.SDPMedia GetMedia(uint idx) { IntPtr raw_ret = gst_sdp_message_get_media(Handle, idx); Gst.Sdp.SDPMedia ret = Gst.Sdp.SDPMedia.New (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_phone(IntPtr raw, uint idx); public string GetPhone(uint idx) { IntPtr raw_ret = gst_sdp_message_get_phone(Handle, idx); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_time(IntPtr raw, uint idx); public Gst.Sdp.SDPTime GetTime(uint idx) { IntPtr raw_ret = gst_sdp_message_get_time(Handle, idx); Gst.Sdp.SDPTime ret = Gst.Sdp.SDPTime.New (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_get_zone(IntPtr raw, uint idx); public Gst.Sdp.SDPZone GetZone(uint idx) { IntPtr raw_ret = gst_sdp_message_get_zone(Handle, idx); Gst.Sdp.SDPZone ret = Gst.Sdp.SDPZone.New (raw_ret); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_insert_attribute(IntPtr raw, int idx, IntPtr attr); public Gst.Sdp.SDPResult InsertAttribute(int idx, Gst.Sdp.SDPAttribute attr) { IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); int raw_ret = gst_sdp_message_insert_attribute(Handle, idx, native_attr); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_attr); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_insert_bandwidth(IntPtr raw, int idx, IntPtr bw); public Gst.Sdp.SDPResult InsertBandwidth(int idx, Gst.Sdp.SDPBandwidth bw) { IntPtr native_bw = GLib.Marshaller.StructureToPtrAlloc (bw); int raw_ret = gst_sdp_message_insert_bandwidth(Handle, idx, native_bw); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_bw); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_insert_email(IntPtr raw, int idx, IntPtr email); public Gst.Sdp.SDPResult InsertEmail(int idx, string email) { IntPtr native_email = GLib.Marshaller.StringToPtrGStrdup (email); int raw_ret = gst_sdp_message_insert_email(Handle, idx, native_email); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_email); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_insert_phone(IntPtr raw, int idx, IntPtr phone); public Gst.Sdp.SDPResult InsertPhone(int idx, string phone) { IntPtr native_phone = GLib.Marshaller.StringToPtrGStrdup (phone); int raw_ret = gst_sdp_message_insert_phone(Handle, idx, native_phone); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_phone); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_insert_time(IntPtr raw, int idx, IntPtr t); public Gst.Sdp.SDPResult InsertTime(int idx, Gst.Sdp.SDPTime t) { IntPtr native_t = GLib.Marshaller.StructureToPtrAlloc (t); int raw_ret = gst_sdp_message_insert_time(Handle, idx, native_t); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_t); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_insert_zone(IntPtr raw, int idx, IntPtr zone); public Gst.Sdp.SDPResult InsertZone(int idx, Gst.Sdp.SDPZone zone) { IntPtr native_zone = GLib.Marshaller.StructureToPtrAlloc (zone); int raw_ret = gst_sdp_message_insert_zone(Handle, idx, native_zone); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_zone); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_medias_len(IntPtr raw); public uint MediasLen() { uint raw_ret = gst_sdp_message_medias_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_parse_keymgmt(IntPtr raw, out IntPtr mikey); public Gst.Sdp.SDPResult ParseKeymgmt(out Gst.Sdp.MIKEYMessage mikey) { IntPtr native_mikey; int raw_ret = gst_sdp_message_parse_keymgmt(Handle, out native_mikey); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; mikey = native_mikey == IntPtr.Zero ? null : (Gst.Sdp.MIKEYMessage) GLib.Opaque.GetOpaque (native_mikey, typeof (Gst.Sdp.MIKEYMessage), true); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_phones_len(IntPtr raw); public uint PhonesLen() { uint raw_ret = gst_sdp_message_phones_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_attribute(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemoveAttribute(uint idx) { int raw_ret = gst_sdp_message_remove_attribute(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_bandwidth(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemoveBandwidth(uint idx) { int raw_ret = gst_sdp_message_remove_bandwidth(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_email(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemoveEmail(uint idx) { int raw_ret = gst_sdp_message_remove_email(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_media(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemoveMedia(uint idx) { int raw_ret = gst_sdp_message_remove_media(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_phone(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemovePhone(uint idx) { int raw_ret = gst_sdp_message_remove_phone(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_time(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemoveTime(uint idx) { int raw_ret = gst_sdp_message_remove_time(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_remove_zone(IntPtr raw, uint idx); public Gst.Sdp.SDPResult RemoveZone(uint idx) { int raw_ret = gst_sdp_message_remove_zone(Handle, idx); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_replace_attribute(IntPtr raw, uint idx, IntPtr attr); public Gst.Sdp.SDPResult ReplaceAttribute(uint idx, Gst.Sdp.SDPAttribute attr) { IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); int raw_ret = gst_sdp_message_replace_attribute(Handle, idx, native_attr); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_attr); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_replace_bandwidth(IntPtr raw, uint idx, IntPtr bw); public Gst.Sdp.SDPResult ReplaceBandwidth(uint idx, Gst.Sdp.SDPBandwidth bw) { IntPtr native_bw = GLib.Marshaller.StructureToPtrAlloc (bw); int raw_ret = gst_sdp_message_replace_bandwidth(Handle, idx, native_bw); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_bw); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_replace_email(IntPtr raw, uint idx, IntPtr email); public Gst.Sdp.SDPResult ReplaceEmail(uint idx, string email) { IntPtr native_email = GLib.Marshaller.StringToPtrGStrdup (email); int raw_ret = gst_sdp_message_replace_email(Handle, idx, native_email); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_email); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_replace_phone(IntPtr raw, uint idx, IntPtr phone); public Gst.Sdp.SDPResult ReplacePhone(uint idx, string phone) { IntPtr native_phone = GLib.Marshaller.StringToPtrGStrdup (phone); int raw_ret = gst_sdp_message_replace_phone(Handle, idx, native_phone); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_phone); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_replace_time(IntPtr raw, uint idx, IntPtr t); public Gst.Sdp.SDPResult ReplaceTime(uint idx, Gst.Sdp.SDPTime t) { IntPtr native_t = GLib.Marshaller.StructureToPtrAlloc (t); int raw_ret = gst_sdp_message_replace_time(Handle, idx, native_t); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_t); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_replace_zone(IntPtr raw, uint idx, IntPtr zone); public Gst.Sdp.SDPResult ReplaceZone(uint idx, Gst.Sdp.SDPZone zone) { IntPtr native_zone = GLib.Marshaller.StructureToPtrAlloc (zone); int raw_ret = gst_sdp_message_replace_zone(Handle, idx, native_zone); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_zone); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_connection(IntPtr raw, IntPtr nettype, IntPtr addrtype, IntPtr address, uint ttl, uint addr_number); public Gst.Sdp.SDPResult SetConnection(string nettype, string addrtype, string address, uint ttl, uint addr_number) { IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); IntPtr native_address = GLib.Marshaller.StringToPtrGStrdup (address); int raw_ret = gst_sdp_message_set_connection(Handle, native_nettype, native_addrtype, native_address, ttl, addr_number); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_nettype); GLib.Marshaller.Free (native_addrtype); GLib.Marshaller.Free (native_address); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_information(IntPtr raw, IntPtr information); public Gst.Sdp.SDPResult SetInformation(string information) { IntPtr native_information = GLib.Marshaller.StringToPtrGStrdup (information); int raw_ret = gst_sdp_message_set_information(Handle, native_information); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_information); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_key(IntPtr raw, IntPtr type, IntPtr data); public Gst.Sdp.SDPResult SetKey(string type, string data) { IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type); IntPtr native_data = GLib.Marshaller.StringToPtrGStrdup (data); int raw_ret = gst_sdp_message_set_key(Handle, native_type, native_data); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_type); GLib.Marshaller.Free (native_data); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_origin(IntPtr raw, IntPtr username, IntPtr sess_id, IntPtr sess_version, IntPtr nettype, IntPtr addrtype, IntPtr addr); public Gst.Sdp.SDPResult SetOrigin(string username, string sess_id, string sess_version, string nettype, string addrtype, string addr) { IntPtr native_username = GLib.Marshaller.StringToPtrGStrdup (username); IntPtr native_sess_id = GLib.Marshaller.StringToPtrGStrdup (sess_id); IntPtr native_sess_version = GLib.Marshaller.StringToPtrGStrdup (sess_version); IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype); IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype); IntPtr native_addr = GLib.Marshaller.StringToPtrGStrdup (addr); int raw_ret = gst_sdp_message_set_origin(Handle, native_username, native_sess_id, native_sess_version, native_nettype, native_addrtype, native_addr); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_username); GLib.Marshaller.Free (native_sess_id); GLib.Marshaller.Free (native_sess_version); GLib.Marshaller.Free (native_nettype); GLib.Marshaller.Free (native_addrtype); GLib.Marshaller.Free (native_addr); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_session_name(IntPtr raw, IntPtr session_name); public Gst.Sdp.SDPResult SetSessionName(string session_name) { IntPtr native_session_name = GLib.Marshaller.StringToPtrGStrdup (session_name); int raw_ret = gst_sdp_message_set_session_name(Handle, native_session_name); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_session_name); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_uri(IntPtr raw, IntPtr uri); public Gst.Sdp.SDPResult SetUri(string uri) { IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); int raw_ret = gst_sdp_message_set_uri(Handle, native_uri); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_uri); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_set_version(IntPtr raw, IntPtr version); public Gst.Sdp.SDPResult SetVersion(string version) { IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version); int raw_ret = gst_sdp_message_set_version(Handle, native_version); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_version); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_times_len(IntPtr raw); public uint TimesLen() { uint raw_ret = gst_sdp_message_times_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_uninit(IntPtr raw); public Gst.Sdp.SDPResult Uninit() { int raw_ret = gst_sdp_message_uninit(Handle); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gst_sdp_message_zones_len(IntPtr raw); public uint ZonesLen() { uint raw_ret = gst_sdp_message_zones_len(Handle); uint ret = raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_sdp_message_as_uri(IntPtr scheme, IntPtr msg); public static string AsUri(string scheme, Gst.Sdp.SDPMessage msg) { IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme); IntPtr raw_ret = gst_sdp_message_as_uri(native_scheme, msg == null ? IntPtr.Zero : msg.Handle); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); GLib.Marshaller.Free (native_scheme); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_init(out IntPtr msg); public static Gst.Sdp.SDPResult Init(out Gst.Sdp.SDPMessage msg) { IntPtr native_msg; int raw_ret = gst_sdp_message_init(out native_msg); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), false); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_new(out IntPtr msg); public static Gst.Sdp.SDPResult New(out Gst.Sdp.SDPMessage msg) { IntPtr native_msg; int raw_ret = gst_sdp_message_new(out native_msg); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_new_from_text(IntPtr text, out IntPtr msg); public static Gst.Sdp.SDPResult NewFromText(string text, out Gst.Sdp.SDPMessage msg) { IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text); IntPtr native_msg; int raw_ret = gst_sdp_message_new_from_text(native_text, out native_msg); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_text); msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true); return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_parse_buffer([MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)]byte[] data, uint size, IntPtr msg); public static Gst.Sdp.SDPResult ParseBuffer(byte[] data, Gst.Sdp.SDPMessage msg) { uint size = (uint)(data == null ? 0 : data.Length); int raw_ret = gst_sdp_message_parse_buffer(data, size, msg == null ? IntPtr.Zero : msg.Handle); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; return ret; } [DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_sdp_message_parse_uri(IntPtr uri, IntPtr msg); public static Gst.Sdp.SDPResult ParseUri(string uri, Gst.Sdp.SDPMessage msg) { IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri); int raw_ret = gst_sdp_message_parse_uri(native_uri, msg == null ? IntPtr.Zero : msg.Handle); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; GLib.Marshaller.Free (native_uri); return ret; } public SDPMessage(IntPtr raw) : base(raw) {} // 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{ new GLib.AbiField("version" , 0 , (uint) Marshal.SizeOf(typeof(IntPtr)) // version , null , "origin" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("origin" , -1 , (uint) Marshal.SizeOf(typeof(Gst.Sdp.SDPOrigin)) // origin , "version" , "session_name" , (long) Marshal.OffsetOf(typeof(GstSDPMessage_originAlign), "origin") , 0 ), new GLib.AbiField("session_name" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // session_name , "origin" , "information" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("information" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // information , "session_name" , "uri" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("uri" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // uri , "information" , "emails" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("emails" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // emails , "uri" , "phones" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("phones" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // phones , "emails" , "connection" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("connection" , -1 , (uint) Marshal.SizeOf(typeof(Gst.Sdp.SDPConnection)) // connection , "phones" , "bandwidths" , (long) Marshal.OffsetOf(typeof(GstSDPMessage_connectionAlign), "connection") , 0 ), new GLib.AbiField("bandwidths" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // bandwidths , "connection" , "times" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("times" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // times , "bandwidths" , "zones" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("zones" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // zones , "times" , "key" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("key" , -1 , (uint) Marshal.SizeOf(typeof(Gst.Sdp.SDPKey)) // key , "zones" , "attributes" , (long) Marshal.OffsetOf(typeof(GstSDPMessage_keyAlign), "key") , 0 ), new GLib.AbiField("attributes" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // attributes , "key" , "medias" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("medias" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // medias , "attributes" , null , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), }); return _abi_info; } } [StructLayout(LayoutKind.Sequential)] public struct GstSDPMessage_originAlign { sbyte f1; private Gst.Sdp.SDPOrigin origin; } [StructLayout(LayoutKind.Sequential)] public struct GstSDPMessage_connectionAlign { sbyte f1; private Gst.Sdp.SDPConnection connection; } [StructLayout(LayoutKind.Sequential)] public struct GstSDPMessage_keyAlign { sbyte f1; private Gst.Sdp.SDPKey key; } // End of the ABI representation. #endregion } }