![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
GDrive; GDriveIface; char* g_drive_get_name (GDrive *drive); GIcon* g_drive_get_icon (GDrive *drive); gboolean g_drive_has_volumes (GDrive *drive); GList* g_drive_get_volumes (GDrive *drive); gboolean g_drive_is_automounted (GDrive *drive); gboolean g_drive_can_mount (GDrive *drive); gboolean g_drive_can_eject (GDrive *drive); void g_drive_mount (GDrive *drive, GMountOperation *mount_operation, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean g_drive_mount_finish (GDrive *drive, GAsyncResult *result, GError **error); void g_drive_eject (GDrive *drive, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean g_drive_eject_finish (GDrive *drive, GAsyncResult *result, GError **error);
typedef struct { GTypeInterface g_iface; /* signals */ void (*changed) (GVolume *volume); /* Virtual Table */ char * (*get_name) (GDrive *drive); GIcon * (*get_icon) (GDrive *drive); gboolean (*has_volumes) (GDrive *drive); GList * (*get_volumes) (GDrive *drive); gboolean (*is_automounted)(GDrive *drive); gboolean (*can_mount) (GDrive *drive); gboolean (*can_eject) (GDrive *drive); void (*mount) (GDrive *drive, GMountOperation *mount_operation, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*mount_finish)(GDrive *drive, GAsyncResult *result, GError **error); void (*eject) (GDrive *drive, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*eject_finish)(GDrive *drive, GAsyncResult *result, GError **error); } GDriveIface;
char* g_drive_get_name (GDrive *drive);
|
a GDrive. |
Returns : |
string containing drive 's name.
The returned string should be freed when no longer needed
|
gboolean g_drive_has_volumes (GDrive *drive);
|
a GDrive. |
Returns : |
TRUE if drive contains volumes, FALSE otherwise.
|
gboolean g_drive_is_automounted (GDrive *drive);
|
a GDrive. |
Returns : |
TRUE if the drive was automounted. FALSE otherwise.
|
gboolean g_drive_can_mount (GDrive *drive);
|
a GDrive. |
Returns : |
TRUE if the drive can be mounted. FALSE otherwise.
|
gboolean g_drive_can_eject (GDrive *drive);
|
pointer to a GDrive. |
Returns : |
TRUE if the drive can be ejected. FALSE otherwise.
|
void g_drive_mount (GDrive *drive, GMountOperation *mount_operation, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
|
a GDrive. |
|
a GMountOperation. |
|
|
|
a GAsyncReadyCallback. |
|
a gpointer. |
gboolean g_drive_mount_finish (GDrive *drive, GAsyncResult *result, GError **error);
|
pointer to a GDrive. |
|
a GAsyncResult. |
|
a GError. |
Returns : |
TRUE , FALSE if operation failed.
|
void g_drive_eject (GDrive *drive, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
|
a GDrive. |
|
|
|
a GAsyncReadyCallback. |
|
a gpointer. |
gboolean g_drive_eject_finish (GDrive *drive, GAsyncResult *result, GError **error);
|
a GDrive. |
|
a GAsyncResult. |
|
a GError. |
Returns : |
TRUE if the drive has been ejected successfully,
FALSE otherwise.
|
"changed"
signalvoid user_function (GDrive *gdrive, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |