ThunarDevice: Thunar Internal Functions Reference Manual

## ThunarDevice ThunarDevice |

## Functions

void | (*ThunarDeviceCallback) ()
const gchar * | thunar_device_get_eject_label ()
gchar * | thunar_device_get_name ()
GIcon * | thunar_device_get_icon ()
ThunarDeviceKind | thunar_device_get_kind ()
gchar * | thunar_device_get_identifier ()
gchar * | thunar_device_get_identifier_unix ()
gboolean | thunar_device_get_hidden ()
gboolean | thunar_device_can_eject ()
gboolean | thunar_device_can_mount ()
gboolean | thunar_device_can_unmount ()
gboolean | thunar_device_is_mounted ()
GFile * | thunar_device_get_root ()
gint | thunar_device_compare_by_name ()
void | thunar_device_mount ()
void | thunar_device_unmount ()
void | thunar_device_eject ()
void | thunar_device_reload_file ()

## Properties

GObject * | device | Read / Write / Construct Only
gboolean | hidden | Read / Write
guint | kind | Read / Write / Construct Only

## Object Hierarchy

        GObject
        ╰── ThunarDevice

## Description

## Functions

### ThunarDeviceCallback ()

    void
    (*ThunarDeviceCallback) (ThunarDevice *device,
                             const GError *error,
                             gpointer user_data);

### thunar_device_get_eject_label ()

    const gchar *
    thunar_device_get_eject_label (const ThunarDevice *device);

Obtains the recommended name for the eject action, specific to GIO's drive type.

#### Parameters

device | a ThunarDevice |

#### Returns

The recommended name of the eject action. The returned string must not be freed.

### thunar_device_get_name ()

    gchar *
    thunar_device_get_name (const ThunarDevice *device);

Returns the name of the `device` if the `device` is mounted.

The caller is responsible to free the returned string using `g_free()` when no longer needed.

#### Parameters

device | a ThunarDevice instance. |

#### Returns

the name of `device` if `device` is mounted

### thunar_device_get_icon ()

    GIcon *
    thunar_device_get_icon (const ThunarDevice *device);

### thunar_device_get_kind ()

    ThunarDeviceKind
    thunar_device_get_kind (const ThunarDevice *device);

### thunar_device_get_identifier ()

    gchar *
    thunar_device_get_identifier (const ThunarDevice *device);

### thunar_device_get_identifier_unix ()

    gchar *
    thunar_device_get_identifier_unix (const ThunarDevice *device);

### thunar_device_get_hidden ()

    gboolean
    thunar_device_get_hidden (const ThunarDevice *device);

### thunar_device_can_eject ()

    gboolean
    thunar_device_can_eject (const ThunarDevice *device);

If the user should see the option to eject this device.

### thunar_device_can_mount ()

    gboolean
    thunar_device_can_mount (const ThunarDevice *device);

If the user should see the option to mount this device.

### thunar_device_can_unmount ()

    gboolean
    thunar_device_can_unmount (const ThunarDevice *device);

If the user should see the option to unmount this device.

### thunar_device_is_mounted ()

    gboolean
    thunar_device_is_mounted (const ThunarDevice *device);

### thunar_device_get_root ()

    GFile *
    thunar_device_get_root (const ThunarDevice *device);

### thunar_device_compare_by_name ()

    gint
    thunar_device_compare_by_name (const ThunarDevice *device1,
                                   const ThunarDevice *device2);

### thunar_device_mount ()

    void
    thunar_device_mount (ThunarDevice *device,
                         GMountOperation *mount_operation,
                         GCancellable *cancellable,
                         ThunarDeviceCallback callback,
                         gpointer user_data);

### thunar_device_unmount ()

    void
    thunar_device_unmount (ThunarDevice *device,
                           GMountOperation *mount_operation,
                           GCancellable *cancellable,
                           ThunarDeviceCallback callback,
                           gpointer user_data);

Try to eject a ThunarDevice, fall-back to unmounting

### thunar_device_eject ()

    void
    thunar_device_eject (ThunarDevice *device,
                         GMountOperation *mount_operation,
                         GCancellable *cancellable,
                         ThunarDeviceCallback callback,
                         gpointer user_data);

### thunar_device_reload_file ()

    void
    thunar_device_reload_file (ThunarDevice *device);

Reload the related ThunarFile of the ThunarDevice

## Property Details

### The `“device”` property

      “device”                   GObject *

device.

Owner: ThunarDevice

Flags: Read / Write / Construct Only

### The `“hidden”` property

      “hidden”                   gboolean

hidden.

Owner: ThunarDevice

Flags: Read / Write

Default value: FALSE

### The `“kind”` property

      “kind”                     guint

kind.

Owner: ThunarDevice

Flags: Read / Write / Construct Only

Allowed values: <= 2

Default value: 0