static void impl_finalize (GObject *object) { RhythmDBImportJob *job = RHYTHMDB_IMPORT_JOB (object); g_hash_table_destroy (job->priv->outstanding); rb_slist_deep_free (job->priv->uri_list); G_OBJECT_CLASS (rhythmdb_import_job_parent_class)->finalize (object); }
static void impl_finalize (GObject *object) { RhythmDBImportJob *job = RHYTHMDB_IMPORT_JOB (object); g_queue_free_full (job->priv->outstanding, g_free); g_queue_free_full (job->priv->processing, g_free); rb_slist_deep_free (job->priv->uri_list); g_free (job->priv->task_label); G_OBJECT_CLASS (rhythmdb_import_job_parent_class)->finalize (object); }
static void missing_plugins_retry_cb (gpointer instance, gboolean installed, RhythmDBImportJob *job) { GSList *retry = NULL; GSList *i; g_mutex_lock (&job->priv->lock); g_assert (job->priv->retried == FALSE); if (installed == FALSE) { rb_debug ("plugin installation was not successful; job complete"); g_signal_emit (job, signals[COMPLETE], 0, job->priv->total); } else { job->priv->retried = TRUE; /* reset the job state to just show the retry information */ job->priv->total = g_slist_length (job->priv->retry_entries); rb_debug ("plugin installation was successful, retrying %d entries", job->priv->total); job->priv->imported = 0; /* remove the import error entries and build the list of URIs to retry */ for (i = job->priv->retry_entries; i != NULL; i = i->next) { RhythmDBEntry *entry = (RhythmDBEntry *)i->data; char *uri; uri = rhythmdb_entry_dup_string (entry, RHYTHMDB_PROP_LOCATION); rhythmdb_entry_delete (job->priv->db, entry); g_hash_table_insert (job->priv->outstanding, g_strdup (uri), GINT_TO_POINTER (1)); retry = g_slist_prepend (retry, uri); } rhythmdb_commit (job->priv->db); retry = g_slist_reverse (retry); } g_mutex_unlock (&job->priv->lock); for (i = retry; i != NULL; i = i->next) { char *uri = (char *)i->data; rhythmdb_add_uri_with_types (job->priv->db, uri, job->priv->entry_type, job->priv->ignore_type, job->priv->error_type); } rb_slist_deep_free (retry); }