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

namespace Gst.RtspServer {

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

#region Autogenerated code
	public partial class RTSPToken : Gst.MiniObject {

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

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

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

		public string GetString(string field) {
			IntPtr native_field = GLib.Marshaller.StringToPtrGStrdup (field);
			IntPtr raw_ret = gst_rtsp_token_get_string(Handle, native_field);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			GLib.Marshaller.Free (native_field);
			return ret;
		}

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

		public Gst.Structure Structure { 
			get {
				IntPtr raw_ret = gst_rtsp_token_get_structure(Handle);
				Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
				return ret;
			}
		}

		[DllImport("gstrtspserver-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtsp_token_is_allowed(IntPtr raw, IntPtr field);

		public bool IsAllowed(string field) {
			IntPtr native_field = GLib.Marshaller.StringToPtrGStrdup (field);
			bool raw_ret = gst_rtsp_token_is_allowed(Handle, native_field);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field);
			return ret;
		}

		[DllImport("gstrtspserver-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_rtsp_token_set_bool(IntPtr raw, IntPtr field, bool bool_value);

		public void SetBool(string field, bool bool_value) {
			IntPtr native_field = GLib.Marshaller.StringToPtrGStrdup (field);
			gst_rtsp_token_set_bool(Handle, native_field, bool_value);
			GLib.Marshaller.Free (native_field);
		}

		[DllImport("gstrtspserver-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_rtsp_token_set_string(IntPtr raw, IntPtr field, IntPtr string_value);

		public void SetString(string field, string string_value) {
			IntPtr native_field = GLib.Marshaller.StringToPtrGStrdup (field);
			IntPtr native_string_value = GLib.Marshaller.StringToPtrGStrdup (string_value);
			gst_rtsp_token_set_string(Handle, native_field, native_string_value);
			GLib.Marshaller.Free (native_field);
			GLib.Marshaller.Free (native_string_value);
		}

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

		public Gst.Structure WritableStructure() {
			IntPtr raw_ret = gst_rtsp_token_writable_structure(Handle);
			Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
			return ret;
		}

		public RTSPToken(IntPtr raw) : base(raw) {}

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

		public RTSPToken () : base (IntPtr.Zero)
		{
			Raw = gst_rtsp_token_new_empty();
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields);

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
