UDisksLinuxDriveAta

## UDisksLinuxDriveAta UDisksLinuxDriveAta — Linux implementation of UDisksDriveAta |

## Synopsis

                        UDisksLinuxDriveAta;
    UDisksDriveAta *    udisks_linux_drive_ata_new          (void);
    void                udisks_linux_drive_ata_update       (UDisksLinuxDriveAta *drive,
                                                             UDisksLinuxDriveObject *object);
    gboolean            udisks_linux_drive_ata_refresh_smart_sync
                                                            (UDisksLinuxDriveAta *drive,
                                                             gboolean nowakeup,
                                                             const gchar *simulate_path,
                                                             GCancellable *cancellable,
                                                             GError **error);
    gboolean            udisks_linux_drive_ata_smart_selftest_sync
                                                            (UDisksLinuxDriveAta *drive,
                                                             const gchar *type,
                                                             GCancellable *cancellable,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----GDBusInterfaceSkeleton
             +----UDisksDriveAtaSkeleton
                   +----UDisksLinuxDriveAta

## Implemented Interfaces

UDisksLinuxDriveAta implements GDBusInterface and UDisksDriveAta.

## Description

This type provides an implementation of the UDisksDriveAta interface on Linux.

## Details

### UDisksLinuxDriveAta

    typedef struct _UDisksLinuxDriveAta UDisksLinuxDriveAta;

The UDisksLinuxDriveAta structure contains only private data and should only be accessed using the provided API.

### udisks_linux_drive_ata_new ()

    UDisksDriveAta *    udisks_linux_drive_ata_new          (void);

Creates a new UDisksLinuxDriveAta instance.

Returns : | A new UDisksLinuxDriveAta. Free with `g_object_unref()`.

### udisks_linux_drive_ata_update ()

    void                udisks_linux_drive_ata_update       (UDisksLinuxDriveAta *drive,
                                                             UDisksLinuxDriveObject *object);

Updates the interface.

`drive` : | A UDisksLinuxDriveAta.
`object` : | The enclosing UDisksLinuxDriveObject instance.

### udisks_linux_drive_ata_refresh_smart_sync ()

    gboolean            udisks_linux_drive_ata_refresh_smart_sync
                                                            (UDisksLinuxDriveAta *drive,
                                                             gboolean nowakeup,
                                                             const gchar *simulate_path,
                                                             GCancellable *cancellable,
                                                             GError **error);

Synchronously refreshes ATA S.M.A.R.T. data on `drive` using one of the physical drives associated with it. The calling thread is blocked until the data has been obtained.

If `nowake` is `TRUE` and the disk is in a sleep state this fails with `UDISKS_ERROR_WOULD_WAKEUP`.

This may only be called if `drive` has been associated with a UDisksLinuxDriveObject instance.

This method may be called from any thread.

`drive` : | The UDisksLinuxDriveAta to refresh.
`nowakeup` : | If `TRUE`, will not wake up the disk if asleep.
`simulate_path` : | If not `NULL`, the path of a file with a libatasmart blob to use.
`cancellable` : | A GCancellable or `NULL`.
`error` : | Return location for error.
Returns : | `TRUE` if the operation succeeded, `FALSE` if `error` is set.

### udisks_linux_drive_ata_smart_selftest_sync ()

    gboolean            udisks_linux_drive_ata_smart_selftest_sync
                                                            (UDisksLinuxDriveAta *drive,
                                                             const gchar *type,
                                                             GCancellable *cancellable,
                                                             GError **error);

Starts (or aborts) a SMART self-test on `drive`. Valid values for `type` includes 'short', 'extended', 'conveyance' and 'abort'.

The calling thread is blocked while sending the command to the drive but will return immediately after the drive acknowledges the command.

`drive` : | A UDisksLinuxDriveAta.
`type` : | The type of selftest to run.
`cancellable` : | A GCancellable that can be used to cancel the operation or `NULL`. [allow-none]
`error` : | Return location for error or `NULL`.
Returns : | `TRUE` if the operation succeed, `FALSE` if `error` is set.