identityinfo: remove unused function and remove edit flags in GetInfo
authorJussi Laako <jussi.laako@linux.intel.com>
Thu, 15 Aug 2013 15:16:47 +0000 (18:16 +0300)
committerAmarnath Valluri <amarnath.valluri@linux.intel.com>
Thu, 5 Sep 2013 11:11:59 +0000 (14:11 +0300)
src/common/gsignond-identity-info.c
src/common/gsignond-identity-info.h
src/daemon/gsignond-identity.c

index dd7c7ee..befe540 100644 (file)
@@ -352,41 +352,6 @@ gsignond_identity_info_new_from_variant (GVariant *variant_map)
 }
 
 /**
- * gsignond_identity_info_to_variant:
- * info: instance of #GSignondIdentityInfo
- *
- * Converts the GSignondIdentityInfo instance to variant
- *
- * Returns: (transfer full) #GVariant object if successful,
- * NULL otherwise.
- */
-GVariant *
-gsignond_identity_info_to_variant (GSignondIdentityInfo *info)
-{
-    g_assert (info);
-    GVariant *var_flags = NULL;
-    GVariant *reply = NULL;
-
-    if ((var_flags = gsignond_dictionary_get (info, 
-                GSIGNOND_IDENTITY_INFO_EDIT_FLAGS))) {
-        g_variant_ref (var_flags);
-        gsignond_dictionary_remove (info,
-                GSIGNOND_IDENTITY_INFO_EDIT_FLAGS);
-    }
-
-    reply = gsignond_dictionary_to_variant (info);
-
-
-    if (var_flags) {
-        gsignond_dictionary_set (info, 
-            GSIGNOND_IDENTITY_INFO_EDIT_FLAGS, var_flags);
-        g_variant_unref (var_flags);
-    }
-
-    return reply;
-}
-
-/**
  * gsignond_identity_info_copy:
  * @info: instance of #GSignondIdentityInfo
  *
@@ -1371,6 +1336,19 @@ gsignond_identity_info_compare (
     return TRUE;
 }
 
+/**
+ * gsignond_identity_info_remove_edit_flags:
+ *
+ * Remove edit flags from the #GSignondIdentityInfo instance.
+ */
+void
+gsignond_identity_info_remove_edit_flags (GSignondIdentityInfo *info)
+{
+    g_assert (info != NULL);
+
+    gsignond_dictionary_remove (info, GSIGNOND_IDENTITY_INFO_EDIT_FLAGS);
+}
+
 void
 gsignond_identity_info_list_free (GSignondIdentityInfoList *list)
 {
index 805d4fb..23131a5 100644 (file)
@@ -186,6 +186,9 @@ gsignond_identity_info_compare (
         GSignondIdentityInfo *other);
 
 void
+gsignond_identity_info_remove_edit_flags (GSignondIdentityInfo *info);
+
+void
 gsignond_identity_info_list_free (GSignondIdentityInfoList *list);
 
 G_END_DECLS
index 3ae327a..a83a088 100644 (file)
@@ -310,6 +310,9 @@ gsignond_identity_get_info (GSignondIdentity *identity, const GSignondSecurityCo
     if (gsignond_identity_info_get_is_username_secret (info))
         gsignond_identity_info_remove_username (info);
 
+    /* remove edit flags */
+    gsignond_identity_info_remove_edit_flags (info);
+
     /* prepare identity info, excluding password and username if secret */
     vinfo = gsignond_dictionary_to_variant (identity->priv->info);
     gsignond_identity_info_unref (info);