]> saetta.ns0.it Git - zakconfi/libzakconfi/commitdiff
Added function ZakConfi::get_confi_config.
authorAndrea Zagli <azagli@libero.it>
Sun, 9 Oct 2016 09:13:58 +0000 (11:13 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 9 Oct 2016 09:13:58 +0000 (11:13 +0200)
src/confi.c
src/libzakconfi.h

index 07213c079851970961daff242f77bf0b5fc94828..da051b902d682d1a3a66676218eef863ff89bf63 100644 (file)
@@ -274,6 +274,26 @@ GList
        return lst;
 }
 
+/**
+ * zak_confi_get_confi_confi:
+ * @confi:
+ *
+ * Returns: a #ZakConfiConfi struct.
+ */
+ZakConfiConfi
+*zak_confi_get_confi_confi (ZakConfi *confi)
+{
+       ZakConfiConfi *cc;
+
+       ZakConfiPrivate *priv = ZAK_CONFI_GET_PRIVATE (confi);
+
+       cc = g_new0 (ZakConfiConfi, 1);
+       cc->name = g_strdup (priv->name);
+       cc->description = g_strdup (priv->description);
+
+       return cc;
+}
+
 /**
  * zak_confi_add_config:
  * @cnc_string:
index 96ec605d10b828ed983fab17551ddbbb83099cd7..7a2b943102c887bd8113417c4e7b57811821045a 100644 (file)
@@ -60,6 +60,8 @@ PeasPluginInfo *zak_confi_get_plugin_info (ZakConfi *confi);
 GList *zak_confi_get_configs_list (const gchar *cnc_string,
                                                                   const gchar *filter);
 
+ZakConfiConfi *zak_confi_get_confi_confi (ZakConfi *confi);
+
 ZakConfiConfi *zak_confi_add_config (const gchar *cnc_string,
                                                                         const gchar *name,
                                                                         const gchar *description);