// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst.WebRTC {

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

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct WebRTCICECandidate : IEquatable<WebRTCICECandidate> {

		public string Candidate;
		public int Component;
		public string SdpMid;
		public int SdpMlineIndex;
		private IntPtr _stats;

		public Gst.WebRTC.WebRTCICECandidateStats stats {
			get { return Gst.WebRTC.WebRTCICECandidateStats.New (_stats); }
		}
		[MarshalAs (UnmanagedType.ByValArray, SizeConst=20)]
		public IntPtr[] _gstGstReserved;

		public static Gst.WebRTC.WebRTCICECandidate Zero = new Gst.WebRTC.WebRTCICECandidate ();

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

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

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

		public bool Equals (WebRTCICECandidate other)
		{
			return true && Candidate.Equals (other.Candidate) && Component.Equals (other.Component) && SdpMid.Equals (other.SdpMid) && SdpMlineIndex.Equals (other.SdpMlineIndex) && stats.Equals (other.stats);
		}

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

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ Candidate.GetHashCode () ^ Component.GetHashCode () ^ SdpMid.GetHashCode () ^ SdpMlineIndex.GetHashCode () ^ stats.GetHashCode ();
		}

		public static explicit operator GLib.Value (Gst.WebRTC.WebRTCICECandidate boxed)
		{
			GLib.Value val = GLib.Value.Empty;
			val.Init (Gst.WebRTC.WebRTCICECandidate.GType);
			val.Val = boxed;
			return val;
		}

		public static explicit operator Gst.WebRTC.WebRTCICECandidate (GLib.Value val)
		{
			return (Gst.WebRTC.WebRTCICECandidate) val.Val;
		}
#endregion
	}
}
