![]() |
![]() |
![]() |
libnautilus-burn Reference Manual | ![]() |
---|---|---|---|---|
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);
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;
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;
#define NAUTILUS_BURN_DRIVE_SIZE_TO_TIME(size) (size > 1024 * 1024 ? (int) (((size / 1024 / 1024) - 1) * 48 / 7): 0)
|
#define NAUTILUS_BURN_DRIVE_CD_SPEED(speed) (floorf (((speed) * 1024 / 153600.0) * 10) / 10.0)
|
#define NAUTILUS_BURN_DRIVE_DVD_SPEED(speed) (floorf (((speed) * 1024 / 1385000.0) * 10) / 10.0)
|
#define NAUTILUS_BURN_DRIVE_MEDIA_TYPE_IS_DVD(media_type)
|
NautilusBurnDrive* nautilus_burn_drive_ref (NautilusBurnDrive *drive);
Increment the refcount of drive
.
|
NautilusBurnDrive |
Returns : |
NautilusBurnDrive |
Since 2.14
void nautilus_burn_drive_unref (NautilusBurnDrive *drive);
Decrement the refcount of drive
.
|
NautilusBurnDrive |
Since 2.14
gboolean nautilus_burn_drive_equal (NautilusBurnDrive *a, NautilusBurnDrive *b);
Compare the two cd drives, return TRUE
if they match exactly
the same drive.
|
First NautilusBurnDrive struct to compare |
|
Second NautilusBurnDrive struct to compare |
Returns : |
TRUE if the two NautilusBurnDrives are equal, otherwise return FALSE .
|
Since 2.8
gboolean nautilus_burn_drive_lock (NautilusBurnDrive *drive, const char *reason, char **reason_for_failure);
Lock a NautilusBurnDrive
|
Pointer to a NautilusBurnDrive |
|
|
|
|
Returns : |
TRUE if the drive was sucessfully locked, FALSE otherwise.
|
Since 2.8
gboolean nautilus_burn_drive_unlock (NautilusBurnDrive *drive);
Unlock a NautilusBurnDrive
|
Pointer to a NautilusBurnDrive |
Returns : |
TRUE if the drive was sucessfully unlocked, FALSE otherwise.
|
Since 2.8
gboolean nautilus_burn_drive_unmount (NautilusBurnDrive *drive);
Unmount the media in a NautilusBurnDrive.
|
NautilusBurnDrive |
Returns : |
TRUE if the media was sucessfully unmounted, FALSE otherwise.
|
Since 2.10
gboolean nautilus_burn_drive_is_mounted (NautilusBurnDrive *drive);
Determine if media in the specified drive is mounted.
|
NautilusBurnDrive |
Returns : |
TRUE if the media is mounted, FALSE otherwise.
|
Since 2.14
gboolean nautilus_burn_drive_eject (NautilusBurnDrive *drive);
Eject media from a NautilusBurnDrive.
|
NautilusBurnDrive |
Returns : |
TRUE if the media was sucessfully ejected, FALSE otherwise.
|
Since 2.12
gboolean nautilus_burn_drive_door_is_open (NautilusBurnDrive *drive);
Report the whether the drive door or tray is open.
|
NautilusBurnDrive |
Returns : |
TRUE if the drive door is open, otherwise return FALSE .
|
Since 2.12
int nautilus_burn_drive_get_drive_type (NautilusBurnDrive *drive);
Get the type of the drive.
|
NautilusBurnDrive |
Returns : |
type of drive |
Since 2.16
char* nautilus_burn_drive_get_name_for_display (NautilusBurnDrive *drive);
Get the name of the drive for use in a user interface
|
NautilusBurnDrive |
Returns : |
name of the drive. Must be freed with g_free() .
|
Since 2.14
const char* nautilus_burn_drive_get_device (NautilusBurnDrive *drive);
Get the name of the device associated with the drive.
|
NautilusBurnDrive |
Returns : |
device name. Must be not be freed. |
Since 2.16
gboolean nautilus_burn_drive_can_write (NautilusBurnDrive *drive);
Report the whether the drive is capable of recording
|
NautilusBurnDrive |
Returns : |
TRUE if the drive is a recorder, otherwise return FALSE .
|
Since 2.14
gboolean nautilus_burn_drive_can_rewrite (NautilusBurnDrive *drive);
Report the whether the drive is capable of re-recording
|
NautilusBurnDrive |
Returns : |
TRUE if the drive can rewrite, otherwise return FALSE .
|
Since 2.14
int nautilus_burn_drive_get_max_speed_write (NautilusBurnDrive *drive);
Get the maximum write speed that the drive is capable of
|
NautilusBurnDrive |
Returns : |
The speed of the drive, in device units. |
Since 2.14
int nautilus_burn_drive_get_max_speed_read (NautilusBurnDrive *drive);
Get the maximum read speed that the drive is capable of
|
NautilusBurnDrive |
Returns : |
The speed of the drive, in device units. |
Since 2.14
const int* nautilus_burn_drive_get_write_speeds (NautilusBurnDrive *drive);
|
|
Returns : |
gboolean nautilus_burn_drive_can_eject (NautilusBurnDrive *drive);
Report the whether the drive support ejections or not.
|
NautilusBurnDrive |
Returns : |
TRUE if the drive support ejections, otherwise return FALSE .
|
NautilusBurnMediaType nautilus_burn_drive_get_media_type (NautilusBurnDrive *drive);
Determine the type of the media in the 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
|
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
|
NautilusBurnDrive |
|
set to TRUE if media is rewritable |
|
set to TRUE if media is blank |
|
set to TRUE if media has data |
|
set to TRUE if media has audio |
Returns : |
See nautilus_burn_drive_get_media_type() for details.
|
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.
|
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
|
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.
|
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
|
char* nautilus_burn_drive_get_media_label (NautilusBurnDrive *drive);
Determine the label of the media in the specified drive.
|
NautilusBurnDrive |
Returns : |
The label of the media. |
Since 2.14
gboolean nautilus_burn_drive_media_is_appendable (NautilusBurnDrive *drive);
Determine if the media in the specified drive is appendable
|
NautilusBurnDrive |
Returns : |
TRUE if there is a media and it can be appended, otherwise returns FALSE .
|
Since 2.16
const char* nautilus_burn_drive_media_type_get_string (NautilusBurnMediaType type);
Get a string description of the specified media type.
|
A NautilusBurnMediaType |
Returns : |
a string description for the media type. |
Since 2.12
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.
|
A NautilusBurnDrive |
|
Set to TRUE if only writable media should be displayed
|
Returns : |
a string description of the supported media types |
Since 2.14
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.
|
A NautilusBurnDrive |
|
Data size |
Returns : |
a string description of the supported media types |
Since 2.16
gboolean nautilus_burn_drive_media_type_is_writable (NautilusBurnMediaType type, gboolean is_blank);
Determine if a media type is writable
|
A NautilusBurnMediaType |
|
if the media type is blank or not |
Returns : |
TRUE if the media type can be written to, otherwise return FALSE .
|
Since 2.14
"disconnected"
signalvoid user_function (NautilusBurnDrive *nautilusburndrive, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"media-added"
signalvoid user_function (NautilusBurnDrive *nautilusburndrive, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"media-removed"
signalvoid user_function (NautilusBurnDrive *nautilusburndrive, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |