// 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
	[StructLayout(LayoutKind.Sequential)]
	public partial struct PadProbeInfo : IEquatable<PadProbeInfo> {

		public Gst.PadProbeType Type;
		private UIntPtr id;
		public ulong Id {
			get {
				return (ulong) id;
			}
			set {
				id = new UIntPtr (value);
			}
		}
		private IntPtr _data;
		public ulong Offset;
		public uint Size;

		public static Gst.PadProbeInfo Zero = new Gst.PadProbeInfo ();

		public static Gst.PadProbeInfo New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return Gst.PadProbeInfo.Zero;
			return (Gst.PadProbeInfo) Marshal.PtrToStructure (raw, typeof (Gst.PadProbeInfo));
		}

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

		public Gst.Buffer Buffer { 
			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);
				IntPtr raw_ret = gst_pad_probe_info_get_buffer(this_as_native);
				Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), false);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

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

		public Gst.BufferList BufferList { 
			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);
				IntPtr raw_ret = gst_pad_probe_info_get_buffer_list(this_as_native);
				Gst.BufferList ret = raw_ret == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.BufferList), false);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

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

		public Gst.Event Event { 
			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);
				IntPtr raw_ret = gst_pad_probe_info_get_event(this_as_native);
				Gst.Event ret = raw_ret == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Event), false);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

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

		public Gst.Query Query { 
			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);
				IntPtr raw_ret = gst_pad_probe_info_get_query(this_as_native);
				Gst.Query ret = raw_ret == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Query), false);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

		static void ReadNative (IntPtr native, ref Gst.PadProbeInfo target)
		{
			target = New (native);
		}

		public bool Equals (PadProbeInfo other)
		{
			return true && Type.Equals (other.Type) && Id.Equals (other.Id) && _data.Equals (other._data) && Offset.Equals (other.Offset) && Size.Equals (other.Size);
		}

		public override bool Equals (object other)
		{
			return other is PadProbeInfo && Equals ((PadProbeInfo) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ Type.GetHashCode () ^ Id.GetHashCode () ^ _data.GetHashCode () ^ Offset.GetHashCode () ^ Size.GetHashCode ();
		}

		private static GLib.GType GType {
			get { return GLib.GType.Pointer; }
		}
#endregion
	}
}
