nautilus-burn-drive

nautilus-burn-drive

Synopsis

enum                NautilusBurnMediaType;
#define             NAUTILUS_BURN_MEDIA_SIZE_UNKNOWN
#define             NAUTILUS_BURN_MEDIA_SIZE_NA
#define             NAUTILUS_BURN_MEDIA_SIZE_BUSY
enum                NautilusBurnDriveType;
typedef             NautilusBurnDrive;
typedef             NautilusBurnDriveClass;
typedef             NautilusBurnDrivePrivate;
void                media_added                         (NautilusBurnDrive *drive);
void                media_removed                       (NautilusBurnDrive *drive);
void                disconnected                        (NautilusBurnDrive *drive);
#define             NAUTILUS_BURN_DRIVE_SIZE_TO_TIME    (size)
#define             NAUTILUS_BURN_DRIVE_CD_SPEED        (speed)
#define             NAUTILUS_BURN_DRIVE_DVD_SPEED       (speed)
#define             NAUTILUS_BURN_DRIVE_MEDIA_TYPE_IS_DVD(media_type)
NautilusBurnDrive*  nautilus_burn_drive_ref             (NautilusBurnDrive *drive);
void                nautilus_burn_drive_unref           (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_equal           (NautilusBurnDrive *a,
                                                         NautilusBurnDrive *b);
gboolean            nautilus_burn_drive_lock            (NautilusBurnDrive *drive,
                                                         const char *reason,
                                                         char **reason_for_failure);
gboolean            nautilus_burn_drive_unlock          (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_unmount         (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_is_mounted      (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_eject           (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_door_is_open    (NautilusBurnDrive *drive);
int                 nautilus_burn_drive_get_drive_type  (NautilusBurnDrive *drive);
char*               nautilus_burn_drive_get_name_for_display
                                                        (NautilusBurnDrive *drive);
const char*         nautilus_burn_drive_get_device      (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_can_write       (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_can_rewrite     (NautilusBurnDrive *drive);
int                 nautilus_burn_drive_get_max_speed_write
                                                        (NautilusBurnDrive *drive);
int                 nautilus_burn_drive_get_max_speed_read
                                                        (NautilusBurnDrive *drive);
const int*          nautilus_burn_drive_get_write_speeds
                                                        (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_can_eject       (NautilusBurnDrive *drive);
NautilusBurnMediaType nautilus_burn_drive_get_media_type
                                                        (NautilusBurnDrive *drive);
NautilusBurnMediaType nautilus_burn_drive_get_media_type_full
                                                        (NautilusBurnDrive *drive,
                                                         gboolean *is_rewritable,
                                                         gboolean *is_blank,
                                                         gboolean *has_data,
                                                         gboolean *has_audio);
gint64              nautilus_burn_drive_get_media_capacity
                                                        (NautilusBurnDrive *drive);
gint64              nautilus_burn_drive_get_media_size  (NautilusBurnDrive *drive);
char*               nautilus_burn_drive_get_media_label (NautilusBurnDrive *drive);
gboolean            nautilus_burn_drive_media_is_appendable
                                                        (NautilusBurnDrive *drive);
const char*         nautilus_burn_drive_media_type_get_string
                                                        (NautilusBurnMediaType type);
char*               nautilus_burn_drive_get_supported_media_string
                                                        (NautilusBurnDrive *drive,
                                                         gboolean writable_only);
char*               nautilus_burn_drive_get_supported_media_string_for_size
                                                        (NautilusBurnDrive *drive,
                                                         guint64 size);
gboolean            nautilus_burn_drive_media_type_is_writable
                                                        (NautilusBurnMediaType type,
                                                         gboolean is_blank);

Object Hierarchy

  GObject
   +----NautilusBurnDrive

Properties

  "enable-monitor"           gboolean              : Read / Write

Signals

  "disconnected"                                   : Run Last
  "media-added"                                    : Run Last
  "media-removed"                                  : Run Last

Description

Details

enum NautilusBurnMediaType

typedef enum {
        NAUTILUS_BURN_MEDIA_TYPE_BUSY,
        NAUTILUS_BURN_MEDIA_TYPE_ERROR,
        NAUTILUS_BURN_MEDIA_TYPE_UNKNOWN,
        NAUTILUS_BURN_MEDIA_TYPE_CD,
        NAUTILUS_BURN_MEDIA_TYPE_CDR,
        NAUTILUS_BURN_MEDIA_TYPE_CDRW,
        NAUTILUS_BURN_MEDIA_TYPE_DVD,
        NAUTILUS_BURN_MEDIA_TYPE_DVDR,
        NAUTILUS_BURN_MEDIA_TYPE_DVDRW,
        NAUTILUS_BURN_MEDIA_TYPE_DVD_RAM,
        NAUTILUS_BURN_MEDIA_TYPE_DVD_PLUS_R,
        NAUTILUS_BURN_MEDIA_TYPE_DVD_PLUS_RW,
        NAUTILUS_BURN_MEDIA_TYPE_DVD_PLUS_R_DL,
} NautilusBurnMediaType;


NAUTILUS_BURN_MEDIA_SIZE_UNKNOWN

#define NAUTILUS_BURN_MEDIA_SIZE_UNKNOWN -1


NAUTILUS_BURN_MEDIA_SIZE_NA

#define NAUTILUS_BURN_MEDIA_SIZE_NA      -2


NAUTILUS_BURN_MEDIA_SIZE_BUSY

#define NAUTILUS_BURN_MEDIA_SIZE_BUSY    -3


enum NautilusBurnDriveType

typedef enum {
        NAUTILUS_BURN_DRIVE_TYPE_FILE                   = 1 << 0,
        NAUTILUS_BURN_DRIVE_TYPE_CD_RECORDER            = 1 << 1,
        NAUTILUS_BURN_DRIVE_TYPE_CDRW_RECORDER          = 1 << 2,
        NAUTILUS_BURN_DRIVE_TYPE_DVD_RAM_RECORDER       = 1 << 3,
        /* Drives are usually DVD-R and DVD-RW */
        NAUTILUS_BURN_DRIVE_TYPE_DVD_RW_RECORDER        = 1 << 4,
        NAUTILUS_BURN_DRIVE_TYPE_DVD_PLUS_R_RECORDER    = 1 << 5,
        NAUTILUS_BURN_DRIVE_TYPE_DVD_PLUS_RW_RECORDER   = 1 << 6,
        NAUTILUS_BURN_DRIVE_TYPE_CD_DRIVE               = 1 << 7,
        NAUTILUS_BURN_DRIVE_TYPE_DVD_DRIVE              = 1 << 8,
        NAUTILUS_BURN_DRIVE_TYPE_DVD_PLUS_R_DL_RECORDER = 1 << 9,
} NautilusBurnDriveType;


NautilusBurnDrive

typedef struct NautilusBurnDrive                   NautilusBurnDrive;


NautilusBurnDriveClass

typedef struct NautilusBurnDriveClass              NautilusBurnDriveClass;


NautilusBurnDrivePrivate

typedef struct NautilusBurnDrivePrivate            NautilusBurnDrivePrivate;


media_added ()

void                media_added                         (NautilusBurnDrive *drive);

drive :


media_removed ()

void                media_removed                       (NautilusBurnDrive *drive);

drive :


disconnected ()

void                disconnected                        (NautilusBurnDrive *drive);

drive :


NAUTILUS_BURN_DRIVE_SIZE_TO_TIME()

#define NAUTILUS_BURN_DRIVE_SIZE_TO_TIME(size) (size > 1024 * 1024 ? (int) (((size / 1024 / 1024) - 1) * 48 / 7): 0)

size :


NAUTILUS_BURN_DRIVE_CD_SPEED()

#define NAUTILUS_BURN_DRIVE_CD_SPEED(speed) (floorf (((speed) * 1024 / 153600.0) * 10) / 10.0)

speed :


NAUTILUS_BURN_DRIVE_DVD_SPEED()

#define NAUTILUS_BURN_DRIVE_DVD_SPEED(speed) (floorf (((speed)  * 1024 / 1385000.0) * 10) / 10.0)

speed :


NAUTILUS_BURN_DRIVE_MEDIA_TYPE_IS_DVD()

#define             NAUTILUS_BURN_DRIVE_MEDIA_TYPE_IS_DVD(media_type)

media_type :


nautilus_burn_drive_ref ()

NautilusBurnDrive*  nautilus_burn_drive_ref             (NautilusBurnDrive *drive);

Increment the refcount of drive.

drive :

NautilusBurnDrive

Returns :

NautilusBurnDrive

Since 2.14


nautilus_burn_drive_unref ()

void                nautilus_burn_drive_unref           (NautilusBurnDrive *drive);

Decrement the refcount of drive.

Since 2.14


nautilus_burn_drive_equal ()

gboolean            nautilus_burn_drive_equal           (NautilusBurnDrive *a,
                                                         NautilusBurnDrive *b);

Compare the two cd drives, return TRUE if they match exactly the same drive.

a :

First NautilusBurnDrive struct to compare

b :

Second NautilusBurnDrive struct to compare

Returns :

TRUE if the two NautilusBurnDrives are equal, otherwise return FALSE.

Since 2.8


nautilus_burn_drive_lock ()

gboolean            nautilus_burn_drive_lock            (NautilusBurnDrive *drive,
                                                         const char *reason,
                                                         char **reason_for_failure);

Lock a NautilusBurnDrive

drive :

Pointer to a NautilusBurnDrive

reason :

reason_for_failure :

Returns :

TRUE if the drive was sucessfully locked, FALSE otherwise.

Since 2.8


nautilus_burn_drive_unlock ()

gboolean            nautilus_burn_drive_unlock          (NautilusBurnDrive *drive);

Unlock a NautilusBurnDrive

drive :

Pointer to a NautilusBurnDrive

Returns :

TRUE if the drive was sucessfully unlocked, FALSE otherwise.

Since 2.8


nautilus_burn_drive_unmount ()

gboolean            nautilus_burn_drive_unmount         (NautilusBurnDrive *drive);

Unmount the media in a NautilusBurnDrive.

drive :

NautilusBurnDrive

Returns :

TRUE if the media was sucessfully unmounted, FALSE otherwise.

Since 2.10


nautilus_burn_drive_is_mounted ()

gboolean            nautilus_burn_drive_is_mounted      (NautilusBurnDrive *drive);

Determine if media in the specified drive is mounted.

drive :

NautilusBurnDrive

Returns :

TRUE if the media is mounted, FALSE otherwise.

Since 2.14


nautilus_burn_drive_eject ()

gboolean            nautilus_burn_drive_eject           (NautilusBurnDrive *drive);

Eject media from a NautilusBurnDrive.

drive :

NautilusBurnDrive

Returns :

TRUE if the media was sucessfully ejected, FALSE otherwise.

Since 2.12


nautilus_burn_drive_door_is_open ()

gboolean            nautilus_burn_drive_door_is_open    (NautilusBurnDrive *drive);

Report the whether the drive door or tray is open.

drive :

NautilusBurnDrive

Returns :

TRUE if the drive door is open, otherwise return FALSE.

Since 2.12


nautilus_burn_drive_get_drive_type ()

int                 nautilus_burn_drive_get_drive_type  (NautilusBurnDrive *drive);

Get the type of the drive.

drive :

NautilusBurnDrive

Returns :

type of drive

Since 2.16


nautilus_burn_drive_get_name_for_display ()

char*               nautilus_burn_drive_get_name_for_display
                                                        (NautilusBurnDrive *drive);

Get the name of the drive for use in a user interface

drive :

NautilusBurnDrive

Returns :

name of the drive. Must be freed with g_free().

Since 2.14


nautilus_burn_drive_get_device ()

const char*         nautilus_burn_drive_get_device      (NautilusBurnDrive *drive);

Get the name of the device associated with the drive.

drive :

NautilusBurnDrive

Returns :

device name. Must be not be freed.

Since 2.16


nautilus_burn_drive_can_write ()

gboolean            nautilus_burn_drive_can_write       (NautilusBurnDrive *drive);

Report the whether the drive is capable of recording

drive :

NautilusBurnDrive

Returns :

TRUE if the drive is a recorder, otherwise return FALSE.

Since 2.14


nautilus_burn_drive_can_rewrite ()

gboolean            nautilus_burn_drive_can_rewrite     (NautilusBurnDrive *drive);

Report the whether the drive is capable of re-recording

drive :

NautilusBurnDrive

Returns :

TRUE if the drive can rewrite, otherwise return FALSE.

Since 2.14


nautilus_burn_drive_get_max_speed_write ()

int                 nautilus_burn_drive_get_max_speed_write
                                                        (NautilusBurnDrive *drive);

Get the maximum write speed that the drive is capable of

drive :

NautilusBurnDrive

Returns :

The speed of the drive, in device units.

Since 2.14


nautilus_burn_drive_get_max_speed_read ()

int                 nautilus_burn_drive_get_max_speed_read
                                                        (NautilusBurnDrive *drive);

Get the maximum read speed that the drive is capable of

drive :

NautilusBurnDrive

Returns :

The speed of the drive, in device units.

Since 2.14


nautilus_burn_drive_get_write_speeds ()

const int*          nautilus_burn_drive_get_write_speeds
                                                        (NautilusBurnDrive *drive);

drive :

Returns :


nautilus_burn_drive_can_eject ()

gboolean            nautilus_burn_drive_can_eject       (NautilusBurnDrive *drive);

Report the whether the drive support ejections or not.

drive :

NautilusBurnDrive

Returns :

TRUE if the drive support ejections, otherwise return FALSE.

nautilus_burn_drive_get_media_type ()

NautilusBurnMediaType nautilus_burn_drive_get_media_type
                                                        (NautilusBurnDrive *drive);

Determine the type of the media in the drive drive.

drive :

NautilusBurnDrive

Returns :

The NautilusBurnMediaType of the media in the drive or the following special values: NAUTILUS_BURN_MEDIA_TYPE_ERROR if the type can not be determined NAUTILUS_BURN_MEDIA_TYPE_UNKNOWN if the type can not be determined NAUTILUS_BURN_MEDIA_TYPE_BUSY if the device is busy

nautilus_burn_drive_get_media_type_full ()

NautilusBurnMediaType nautilus_burn_drive_get_media_type_full
                                                        (NautilusBurnDrive *drive,
                                                         gboolean *is_rewritable,
                                                         gboolean *is_blank,
                                                         gboolean *has_data,
                                                         gboolean *has_audio);

Determine the type of the media in the drive drive

drive :

NautilusBurnDrive

is_rewritable :

set to TRUE if media is rewritable

is_blank :

set to TRUE if media is blank

has_data :

set to TRUE if media has data

has_audio :

set to TRUE if media has audio

Returns :

See nautilus_burn_drive_get_media_type() for details.

nautilus_burn_drive_get_media_capacity ()

gint64              nautilus_burn_drive_get_media_capacity
                                                        (NautilusBurnDrive *drive);

Determine the capacity of the media (i.e. amount of data that the disc can hold) in the specified drive.

drive :

NautilusBurnDrive

Returns :

The capacity of the media in bytes or the following special values: NAUTILUS_BURN_MEDIA_SIZE_UNKNOWN if the type can not be determined NAUTILUS_BURN_MEDIA_SIZE_NA if the device type is not recognized NAUTILUS_BURN_MEDIA_SIZE_BUSY if the device is busy

nautilus_burn_drive_get_media_size ()

gint64              nautilus_burn_drive_get_media_size  (NautilusBurnDrive *drive);

Determine the size of the media (i.e. amount of data that the disc contains) in the specified drive.

drive :

NautilusBurnDrive

Returns :

The size of the media in bytes or the following special values: NAUTILUS_BURN_MEDIA_SIZE_UNKNOWN if the type can not be determined 0 if the disc is blank

nautilus_burn_drive_get_media_label ()

char*               nautilus_burn_drive_get_media_label (NautilusBurnDrive *drive);

Determine the label of the media in the specified drive.

drive :

NautilusBurnDrive

Returns :

The label of the media.

Since 2.14


nautilus_burn_drive_media_is_appendable ()

gboolean            nautilus_burn_drive_media_is_appendable
                                                        (NautilusBurnDrive *drive);

Determine if the media in the specified drive is appendable

drive :

NautilusBurnDrive

Returns :

TRUE if there is a media and it can be appended, otherwise returns FALSE.

Since 2.16


nautilus_burn_drive_media_type_get_string ()

const char*         nautilus_burn_drive_media_type_get_string
                                                        (NautilusBurnMediaType type);

Get a string description of the specified media type.

type :

A NautilusBurnMediaType

Returns :

a string description for the media type.

Since 2.12


nautilus_burn_drive_get_supported_media_string ()

char*               nautilus_burn_drive_get_supported_media_string
                                                        (NautilusBurnDrive *drive,
                                                         gboolean writable_only);

Get a string description of the supported media types. The returned string should be freed when no longer needed.

drive :

A NautilusBurnDrive

writable_only :

Set to TRUE if only writable media should be displayed

Returns :

a string description of the supported media types

Since 2.14


nautilus_burn_drive_get_supported_media_string_for_size ()

char*               nautilus_burn_drive_get_supported_media_string_for_size
                                                        (NautilusBurnDrive *drive,
                                                         guint64 size);

Get a string description of the suiting media types for the given data size. The returned string should be freed when no longer needed.

drive :

A NautilusBurnDrive

size :

Data size

Returns :

a string description of the supported media types

Since 2.16


nautilus_burn_drive_media_type_is_writable ()

gboolean            nautilus_burn_drive_media_type_is_writable
                                                        (NautilusBurnMediaType type,
                                                         gboolean is_blank);

Determine if a media type is writable

type :

A NautilusBurnMediaType

is_blank :

if the media type is blank or not

Returns :

TRUE if the media type can be written to, otherwise return FALSE.

Since 2.14

Property Details

The "enable-monitor" property

  "enable-monitor"           gboolean              : Read / Write

Default value: FALSE

Signal Details

The "disconnected" signal

void                user_function                      (NautilusBurnDrive *nautilusburndrive,
                                                        gpointer           user_data)              : Run Last

nautilusburndrive :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "media-added" signal

void                user_function                      (NautilusBurnDrive *nautilusburndrive,
                                                        gpointer           user_data)              : Run Last

nautilusburndrive :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "media-removed" signal

void                user_function                      (NautilusBurnDrive *nautilusburndrive,
                                                        gpointer           user_data)              : Run Last

nautilusburndrive :

the object which received the signal.

user_data :

user data set when the signal handler was connected.