+ return (* iface->enumerate_identifiers) (drive);
+}
+
+/**
+ * g_drive_get_start_stop_type:
+ * @drive: a #GDrive.
+ *
+ * Gets a hint about how a drive can be started/stopped.
+ *
+ * Returns: A value from the #GDriveStartStopType enumeration.
+ *
+ * Since: 2.22
+ */
+GDriveStartStopType
+g_drive_get_start_stop_type (GDrive *drive)
+{
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), FALSE);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ if (iface->get_start_stop_type == NULL)
+ return G_DRIVE_START_STOP_TYPE_UNKNOWN;
+
+ return (* iface->get_start_stop_type) (drive);
+}
+
+
+/**
+ * g_drive_can_start:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be started.
+ *
+ * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
+ *
+ * Since: 2.22
+ */
+gboolean
+g_drive_can_start (GDrive *drive)
+{
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), FALSE);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ if (iface->can_start == NULL)
+ return FALSE;
+
+ return (* iface->can_start) (drive);
+}
+
+/**
+ * g_drive_can_start_degraded:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be started degraded.
+ *
+ * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
+ *
+ * Since: 2.22
+ */
+gboolean
+g_drive_can_start_degraded (GDrive *drive)
+{
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), FALSE);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ if (iface->can_start_degraded == NULL)
+ return FALSE;
+
+ return (* iface->can_start_degraded) (drive);
+}
+
+/**
+ * g_drive_start:
+ * @drive: a #GDrive.
+ * @flags: flags affecting the start operation.
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid
+ * user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data to pass to @callback
+ *
+ * Asynchronously starts a drive.
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_drive_start_finish() to obtain the
+ * result of the operation.
+ *
+ * Since: 2.22
+ */
+void
+g_drive_start (GDrive *drive,
+ GDriveStartFlags flags,
+ GMountOperation *mount_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GDriveIface *iface;
+
+ g_return_if_fail (G_IS_DRIVE (drive));
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ if (iface->start == NULL)
+ {
+ g_task_report_new_error (drive, callback, user_data,
+ g_drive_start,
+ G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ _("drive doesn't implement start"));
+ return;
+ }
+
+ (* iface->start) (drive, flags, mount_operation, cancellable, callback, user_data);
+}
+
+/**
+ * g_drive_start_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes starting a drive.
+ *
+ * Returns: %TRUE if the drive has been started successfully,
+ * %FALSE otherwise.
+ *
+ * Since: 2.22
+ */
+gboolean
+g_drive_start_finish (GDrive *drive,
+ GAsyncResult *result,
+ GError **error)
+{
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+
+ if (g_async_result_legacy_propagate_error (result, error))
+ return FALSE;
+ else if (g_async_result_is_tagged (result, g_drive_start))
+ return g_task_propagate_boolean (G_TASK (result), error);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ return (* iface->start_finish) (drive, result, error);
+}
+
+/**
+ * g_drive_can_stop:
+ * @drive: a #GDrive.
+ *
+ * Checks if a drive can be stopped.
+ *
+ * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
+ *
+ * Since: 2.22
+ */
+gboolean
+g_drive_can_stop (GDrive *drive)
+{
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), FALSE);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ if (iface->can_stop == NULL)
+ return FALSE;
+
+ return (* iface->can_stop) (drive);
+}
+
+/**
+ * g_drive_stop:
+ * @drive: a #GDrive.
+ * @flags: flags affecting the unmount if required for stopping.
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid
+ * user interaction.
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
+ * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
+ * @user_data: user data to pass to @callback
+ *
+ * Asynchronously stops a drive.
+ *
+ * When the operation is finished, @callback will be called.
+ * You can then call g_drive_stop_finish() to obtain the
+ * result of the operation.
+ *
+ * Since: 2.22
+ */
+void
+g_drive_stop (GDrive *drive,
+ GMountUnmountFlags flags,
+ GMountOperation *mount_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GDriveIface *iface;
+
+ g_return_if_fail (G_IS_DRIVE (drive));
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ if (iface->stop == NULL)
+ {
+ g_task_report_new_error (drive, callback, user_data,
+ g_drive_start,
+ G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ _("drive doesn't implement stop"));
+ return;
+ }
+
+ (* iface->stop) (drive, flags, mount_operation, cancellable, callback, user_data);
+}
+
+/**
+ * g_drive_stop_finish:
+ * @drive: a #GDrive.
+ * @result: a #GAsyncResult.
+ * @error: a #GError, or %NULL
+ *
+ * Finishes stopping a drive.
+ *
+ * Returns: %TRUE if the drive has been stopped successfully,
+ * %FALSE otherwise.
+ *
+ * Since: 2.22
+ */
+gboolean
+g_drive_stop_finish (GDrive *drive,
+ GAsyncResult *result,
+ GError **error)
+{
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+
+ if (g_async_result_legacy_propagate_error (result, error))
+ return FALSE;
+ else if (g_async_result_is_tagged (result, g_drive_start))
+ return g_task_propagate_boolean (G_TASK (result), error);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+
+ return (* iface->stop_finish) (drive, result, error);
+}
+
+/**
+ * g_drive_get_sort_key:
+ * @drive: A #GDrive.
+ *
+ * Gets the sort key for @drive, if any.
+ *
+ * Returns: Sorting key for @drive or %NULL if no such key is available.
+ *
+ * Since: 2.32
+ */
+const gchar *
+g_drive_get_sort_key (GDrive *drive)
+{
+ const gchar *ret = NULL;
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), NULL);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+ if (iface->get_sort_key != NULL)
+ ret = iface->get_sort_key (drive);
+
+ return ret;