static gboolean complete_set_secret (GkmTransaction *transaction, GObject *obj, gpointer user_data) { GkmSecretItem *self = GKM_SECRET_ITEM (obj); if (!gkm_transaction_get_failed (transaction)) { gkm_object_notify_attribute (GKM_OBJECT (obj), CKA_VALUE); gkm_secret_object_was_modified (GKM_SECRET_OBJECT (self)); } return TRUE; }
static gboolean complete_set_label (GkmTransaction *transaction, GObject *obj, gpointer user_data) { GkmSecretObject *self = GKM_SECRET_OBJECT (obj); gchar *old_label = user_data; if (gkm_transaction_get_failed (transaction)) { g_free (self->pv->label); self->pv->label = old_label; } else { gkm_object_notify_attribute (GKM_OBJECT (obj), CKA_LABEL); g_object_notify (G_OBJECT (obj), "label"); gkm_secret_object_was_modified (self); g_free (old_label); } return TRUE; }
static gboolean complete_set_schema (GkmTransaction *transaction, GObject *obj, gpointer user_data) { GkmSecretItem *self = GKM_SECRET_ITEM (obj); gchar *old_schema = user_data; if (gkm_transaction_get_failed (transaction)) { g_free (self->schema); self->schema = old_schema; } else { gkm_object_notify_attribute (GKM_OBJECT (obj), CKA_G_SCHEMA); g_object_notify (G_OBJECT (obj), "schema"); gkm_secret_object_was_modified (GKM_SECRET_OBJECT (self)); g_free (old_schema); } return TRUE; }
static gboolean complete_set_fields (GkmTransaction *transaction, GObject *obj, gpointer user_data) { GkmSecretItem *self = GKM_SECRET_ITEM (obj); GHashTable *old_fields = user_data; if (gkm_transaction_get_failed (transaction)) { if (self->fields) g_hash_table_unref (self->fields); self->fields = old_fields; } else { gkm_object_notify_attribute (GKM_OBJECT (obj), CKA_G_FIELDS); g_object_notify (G_OBJECT (obj), "fields"); gkm_secret_object_was_modified (GKM_SECRET_OBJECT (self)); if (old_fields) g_hash_table_unref (old_fields); } return TRUE; }