static gboolean complete_set_secret (GkmTransaction *transaction, GObject *obj, gpointer user_data) { if (!gkm_transaction_get_failed (transaction)) { gkm_object_notify_attribute (GKM_OBJECT (obj), CKA_VALUE); } return TRUE; }
void gkm_secret_item_set_schema (GkmSecretItem *self, const gchar *schema) { g_return_if_fail (GKM_IS_SECRET_ITEM (self)); if (schema != self->schema) { g_free (self->schema); self->schema = g_strdup (schema); g_object_notify (G_OBJECT (self), "schema"); gkm_object_notify_attribute (GKM_OBJECT (self), CKA_G_SCHEMA); } }
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 void data_file_entry_changed (GkmMate2File *store, const gchar *identifier, CK_ATTRIBUTE_TYPE type, GkmMate2Storage *self) { GkmObject *object; g_return_if_fail (GKM_IS_MATE2_STORAGE (self)); g_return_if_fail (identifier); object = g_hash_table_lookup (self->identifier_to_object, identifier); if (object != NULL) gkm_object_notify_attribute (object, type); }
void gkm_secret_item_set_fields (GkmSecretItem *self, GHashTable *fields) { g_return_if_fail (GKM_IS_SECRET_ITEM (self)); if (fields) g_hash_table_ref (fields); if (self->fields) g_hash_table_unref (self->fields); self->fields = fields; g_object_notify (G_OBJECT (self), "fields"); gkm_object_notify_attribute (GKM_OBJECT (self), CKA_G_FIELDS); }
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"); g_free (old_schema); } 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_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"); if (old_fields) g_hash_table_unref (old_fields); } return TRUE; }