/* When the operation is finished, @callback will be called. You can then call g_drive_poll_for_media_finish() to obtain the result of the operation.  */
void g_drive_poll_for_media(GDrive *drive, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
/* When the operation is finished, @callback will be called. You can then call g_drive_poll_for_media_finish() to obtain the result of the operation.  */
void g_drive_poll_for_media(GDrive *drive, 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->poll_for_media == NULL)
    {
      g_task_report_new_error (drive, callback, user_data,
                               g_drive_poll_for_media,
                               G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
                               _("drive doesn't implement polling for media"));
      return;
    }
  (* iface->poll_for_media) (drive, cancellable, callback, user_data);
}