// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace Nautilus { using System; using System.Collections; using System.Runtime.InteropServices; #region Autogenerated code public class BurnDrive : GLib.Opaque { [DllImport("libnautilus-burn")] static extern int nautilus_burn_drive_get_media_type(IntPtr raw); public Nautilus.BurnMediaType MediaType { get { int raw_ret = nautilus_burn_drive_get_media_type(Handle); Nautilus.BurnMediaType ret = (Nautilus.BurnMediaType) raw_ret; return ret; } } [DllImport("libnautilus-burn")] static extern bool nautilus_burn_drive_lock(IntPtr raw, IntPtr reason, IntPtr reason_for_failure); public bool Lock(string reason, string reason_for_failure) { IntPtr reason_as_native = GLib.Marshaller.StringToPtrGStrdup (reason); bool raw_ret = nautilus_burn_drive_lock(Handle, reason_as_native, GLib.Marshaller.StringToPtrGStrdup(reason_for_failure)); bool ret = raw_ret; GLib.Marshaller.Free (reason_as_native); return ret; } [DllImport("libnautilus-burn")] static extern int nautilus_burn_drive_get_media_type_from_path(IntPtr device_path); public static Nautilus.BurnMediaType GetMediaTypeFromPath(string device_path) { IntPtr device_path_as_native = GLib.Marshaller.StringToPtrGStrdup (device_path); int raw_ret = nautilus_burn_drive_get_media_type_from_path(device_path_as_native); Nautilus.BurnMediaType ret = (Nautilus.BurnMediaType) raw_ret; GLib.Marshaller.Free (device_path_as_native); return ret; } [DllImport("libnautilus-burn")] static extern IntPtr nautilus_burn_drive_get_file_image(); public static Nautilus.BurnDrive FileImage { get { IntPtr raw_ret = nautilus_burn_drive_get_file_image(); Nautilus.BurnDrive ret = raw_ret == IntPtr.Zero ? null : new Nautilus.BurnDrive(raw_ret); return ret; } } [DllImport("libnautilus-burn")] static extern bool nautilus_burn_drive_eject(IntPtr raw); public bool Eject() { bool raw_ret = nautilus_burn_drive_eject(Handle); bool ret = raw_ret; return ret; } [DllImport("libnautilus-burn")] static extern int nautilus_burn_drive_get_media_type_full(IntPtr raw, out bool is_rewritable, out bool is_blank, out bool has_data, out bool has_audio); public Nautilus.BurnMediaType GetMediaTypeFull(out bool is_rewritable, out bool is_blank, out bool has_data, out bool has_audio) { int raw_ret = nautilus_burn_drive_get_media_type_full(Handle, out is_rewritable, out is_blank, out has_data, out has_audio); Nautilus.BurnMediaType ret = (Nautilus.BurnMediaType) raw_ret; return ret; } [DllImport("libnautilus-burn")] static extern long nautilus_burn_drive_get_media_size_from_path(IntPtr device_path); public static long GetMediaSizeFromPath(string device_path) { IntPtr device_path_as_native = GLib.Marshaller.StringToPtrGStrdup (device_path); long raw_ret = nautilus_burn_drive_get_media_size_from_path(device_path_as_native); long ret = raw_ret; GLib.Marshaller.Free (device_path_as_native); return ret; } [DllImport("libnautilus-burn")] static extern bool nautilus_burn_drive_unmount(IntPtr raw); public bool Unmount() { bool raw_ret = nautilus_burn_drive_unmount(Handle); bool ret = raw_ret; return ret; } [DllImport("libnautilus-burn")] static extern void nautilus_burn_drive_free(IntPtr raw); public void Free() { nautilus_burn_drive_free(Handle); } [DllImport("libnautilus-burn")] static extern long nautilus_burn_drive_get_media_size(IntPtr raw); public long MediaSize { get { long raw_ret = nautilus_burn_drive_get_media_size(Handle); long ret = raw_ret; return ret; } } [DllImport("libnautilus-burn")] static extern bool nautilus_burn_drive_door_is_open(IntPtr raw); public bool DoorIsOpen() { bool raw_ret = nautilus_burn_drive_door_is_open(Handle); bool ret = raw_ret; return ret; } [DllImport("libnautilus-burn")] static extern IntPtr nautilus_burn_drive_media_type_get_string(int type); public static string MediaTypeGetString(Nautilus.BurnMediaType type) { IntPtr raw_ret = nautilus_burn_drive_media_type_get_string((int) type); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } [DllImport("libnautilus-burn")] static extern bool nautilus_burn_drive_unlock(IntPtr raw); public bool Unlock() { bool raw_ret = nautilus_burn_drive_unlock(Handle); bool ret = raw_ret; return ret; } [DllImport("libnautilus-burn")] static extern IntPtr nautilus_burn_drive_copy(IntPtr raw); public Nautilus.BurnDrive Copy() { IntPtr raw_ret = nautilus_burn_drive_copy(Handle); Nautilus.BurnDrive ret = raw_ret == IntPtr.Zero ? null : new Nautilus.BurnDrive(raw_ret); return ret; } public BurnDrive(IntPtr raw) : base(raw) {} [DllImport("libnautilus-burn")] static extern IntPtr nautilus_burn_drive_new(); public BurnDrive () { Raw = nautilus_burn_drive_new(); } [DllImport("libnautilus-burn")] static extern IntPtr nautilus_burn_drive_new_from_path(IntPtr device_path); public BurnDrive (string device_path) { IntPtr device_path_as_native = GLib.Marshaller.StringToPtrGStrdup (device_path); Raw = nautilus_burn_drive_new_from_path(device_path_as_native); GLib.Marshaller.Free (device_path_as_native); } #endregion #region Customized extensions #line 1 "BurnDrive.custom" [DllImport("libnautilus-burn")] static extern IntPtr nautilus_burn_drive_get_list(bool recorder_only, bool add_image); public static GLib.List GetList(bool recorder_only, bool add_image) { IntPtr raw_ret = nautilus_burn_drive_get_list(recorder_only, add_image); GLib.List ret = new GLib.List(raw_ret, typeof (Nautilus.BurnDrive)); return ret; } [DllImport("libnautilus-burn")] static extern bool nautilus_burn_drive_equal(IntPtr raw, ref Nautilus.BurnDrive b); public override bool Equals (object o) { if (o is Nautilus.BurnDrive) { Nautilus.BurnDrive drive = (Nautilus.BurnDrive) o; return nautilus_burn_drive_equal(Raw, ref drive); } else { return false; } } public override int GetHashCode () { return this.CdRecordId.GetHashCode (); } [DllImport ("libnautilusburnglue")] private static extern string nautilus_burn_glue_drive_get_id (IntPtr drive); public string CdRecordId { get { return nautilus_burn_glue_drive_get_id (Raw); } } [DllImport ("libnautilusburnglue")] private static extern string nautilus_burn_glue_drive_get_display_name (IntPtr drive); public string DisplayName { get { return nautilus_burn_glue_drive_get_display_name (Raw); } } [DllImport ("libnautilusburnglue")] private static extern int nautilus_burn_glue_drive_get_max_read_speed (IntPtr drive); public int MaxReadSpeed { get { return nautilus_burn_glue_drive_get_max_read_speed (Raw); } } [DllImport ("libnautilusburnglue")] private static extern int nautilus_burn_glue_drive_get_max_write_speed (IntPtr drive); public int MaxWriteSpeed { get { return nautilus_burn_glue_drive_get_max_write_speed (Raw); } } [DllImport ("libnautilusburnglue")] private static extern string nautilus_burn_glue_drive_get_device (IntPtr drive); public string Device { get { return nautilus_burn_glue_drive_get_device (Raw); } } #endregion } }