[PATCH 5/6] Revert "Add OsinfoInstallConfig:config-params property"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

This reverts commit 36e5364c1a3e67f8656bfd2db570717b5d2e6e15.
---
 osinfo/Makefile.am                     |  1 -
 osinfo/libosinfo.syms                  |  2 -
 osinfo/osinfo_install_config.c         | 96 +---------------------------------
 osinfo/osinfo_install_config.h         |  5 --
 osinfo/osinfo_install_config_private.h | 39 --------------
 5 files changed, 1 insertion(+), 142 deletions(-)
 delete mode 100644 osinfo/osinfo_install_config_private.h

diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index 9f3c20d..9d03a34 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -116,7 +116,6 @@ libosinfo_1_0_la_SOURCES =		\
   osinfo_install_config.c		\
   osinfo_install_config_param.c		\
   osinfo_install_config_paramlist.c	\
-  osinfo_install_config_private.h	\
   osinfo_install_script.c		\
   osinfo_install_script_private.h	\
   osinfo_install_scriptlist.c		\
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index a32a8b7..4615829 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -388,8 +388,6 @@ LIBOSINFO_0.2.3 {
 	osinfo_db_get_datamap_list;
 	osinfo_db_identify_media;
 
-	osinfo_install_config_get_config_params;
-
 	osinfo_install_config_paramlist_get_type;
 	osinfo_install_config_paramlist_new;
 
diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index d395ee9..93dc039 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -24,7 +24,6 @@
 #include <config.h>
 
 #include <osinfo/osinfo.h>
-#include "osinfo/osinfo_install_config_private.h"
 #include <glib/gi18n-lib.h>
 
 G_DEFINE_TYPE (OsinfoInstallConfig, osinfo_install_config, OSINFO_TYPE_ENTITY);
@@ -43,91 +42,14 @@ G_DEFINE_TYPE (OsinfoInstallConfig, osinfo_install_config, OSINFO_TYPE_ENTITY);
 
 struct _OsinfoInstallConfigPrivate
 {
-    OsinfoInstallConfigParamList *config_params;
+    gboolean unused;
 };
 
-enum {
-    PROP_0,
-
-    PROP_CONFIG_PARAMS,
-};
-
-static void
-osinfo_install_config_set_property(GObject    *object,
-                                   guint       property_id,
-                                   const GValue     *value,
-                                   GParamSpec *pspec)
-{
-    OsinfoInstallConfig *config = OSINFO_INSTALL_CONFIG(object);
-
-    switch (property_id) {
-    case PROP_CONFIG_PARAMS:
-        osinfo_install_config_set_config_params(config, g_value_get_object(value));
-        break;
-
-    default:
-        /* We don't have any other property... */
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-        break;
-    }
-}
-
-static void
-osinfo_install_config_get_property(GObject    *object,
-                                   guint       property_id,
-                                   GValue     *value,
-                                   GParamSpec *pspec)
-{
-    OsinfoInstallConfig *config = OSINFO_INSTALL_CONFIG(object);
-
-    switch (property_id) {
-    case PROP_CONFIG_PARAMS:
-        g_value_set_object(value, osinfo_install_config_get_config_params(config));
-        break;
-
-    default:
-        /* We don't have any other property... */
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-        break;
-    }
-}
-
-
-static void
-osinfo_install_config_finalize (GObject *object)
-{
-    OsinfoInstallConfig *config = OSINFO_INSTALL_CONFIG (object);
-
-    if (config->priv->config_params)
-        g_object_unref(config->priv->config_params);
-
-    /* Chain up to the parent class */
-    G_OBJECT_CLASS (osinfo_install_config_parent_class)->finalize (object);
-}
-
 
 /* Init functions */
 static void
 osinfo_install_config_class_init (OsinfoInstallConfigClass *klass)
 {
-    GObjectClass *g_klass = G_OBJECT_CLASS (klass);
-    GParamSpec *pspec;
-
-    g_klass->get_property = osinfo_install_config_get_property;
-    g_klass->set_property = osinfo_install_config_set_property;
-    g_klass->finalize = osinfo_install_config_finalize;
-
-    pspec = g_param_spec_object("config-params",
-                                "Config Parameters",
-                                _("Valid configuration parameters"),
-                                OSINFO_TYPE_INSTALL_CONFIG_PARAMLIST,
-                                G_PARAM_READWRITE |
-                                G_PARAM_CONSTRUCT_ONLY |
-                                G_PARAM_STATIC_STRINGS);
-    g_object_class_install_property(g_klass,
-                                    PROP_CONFIG_PARAMS,
-                                    pspec);
-
     g_type_class_add_private (klass, sizeof (OsinfoInstallConfigPrivate));
 }
 
@@ -720,22 +642,6 @@ const gchar *osinfo_install_config_get_post_install_drivers_location(OsinfoInsta
              OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION);
 }
 
-void osinfo_install_config_set_config_params(OsinfoInstallConfig *config,
-                                             OsinfoInstallConfigParamList *config_params)
-{
-    if (config->priv->config_params != NULL)
-        g_object_unref(config->priv->config_params);
-    if (config_params != NULL)
-        config->priv->config_params = g_object_ref(G_OBJECT(config_params));
-    else
-        config->priv->config_params = NULL;
-}
-
-OsinfoInstallConfigParamList *osinfo_install_config_get_config_params(OsinfoInstallConfig *config)
-{
-    return config->priv->config_params;
-}
-
 /*
  * Local variables:
  *  indent-tabs-mode: nil
diff --git a/osinfo/osinfo_install_config.h b/osinfo/osinfo_install_config.h
index caf5518..d650a0a 100644
--- a/osinfo/osinfo_install_config.h
+++ b/osinfo/osinfo_install_config.h
@@ -22,7 +22,6 @@
  */
 
 #include <glib-object.h>
-#include <osinfo/osinfo_install_config_paramlist.h>
 
 #ifndef __OSINFO_INSTALL_CONFIG_H__
 #define __OSINFO_INSTALL_CONFIG_H__
@@ -183,7 +182,6 @@ const gchar *osinfo_install_config_get_avatar_disk(OsinfoInstallConfig *config);
 void osinfo_install_config_set_pre_install_drivers_disk(OsinfoInstallConfig *config,
                                                         const gchar *disk);
 const gchar *osinfo_install_config_get_pre_install_drivers_disk(OsinfoInstallConfig *config);
-
 void osinfo_install_config_set_pre_install_drivers_location(OsinfoInstallConfig *config,
                                                             const gchar *location);
 const gchar *osinfo_install_config_get_pre_install_drivers_location(OsinfoInstallConfig *config);
@@ -191,13 +189,10 @@ const gchar *osinfo_install_config_get_pre_install_drivers_location(OsinfoInstal
 void osinfo_install_config_set_post_install_drivers_disk(OsinfoInstallConfig *config,
                                                          const gchar *disk);
 const gchar *osinfo_install_config_get_post_install_drivers_disk(OsinfoInstallConfig *config);
-
 void osinfo_install_config_set_post_install_drivers_location(OsinfoInstallConfig *config,
                                                              const gchar *location);
 const gchar *osinfo_install_config_get_post_install_drivers_location(OsinfoInstallConfig *config);
 
-OsinfoInstallConfigParamList *osinfo_install_config_get_config_params(OsinfoInstallConfig *config);
-
 #endif /* __OSINFO_INSTALL_CONFIG_H__ */
 /*
  * Local variables:
diff --git a/osinfo/osinfo_install_config_private.h b/osinfo/osinfo_install_config_private.h
deleted file mode 100644
index 5a1edd3..0000000
--- a/osinfo/osinfo_install_config_private.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * libosinfo: OS installation config
- *
- * Copyright (C) 2012 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors:
- *   Christophe Fergeau <cfergeau@xxxxxxxxxx>
- */
-
-#include <osinfo/osinfo_install_config.h>
-
-#ifndef __OSINFO_INSTALL_CONFIG_PRIVATE_H__
-#define __OSINFO_INSTALL_CONFIG_PRIVATE_H__
-
-void osinfo_install_config_set_config_params(OsinfoInstallConfig *config,
-                                             OsinfoInstallConfigParamList *config_params);
-
-#endif /* __OSINFO_INSTALL_CONFIG_PRIVATE_H__ */
-/*
- * Local variables:
- *  indent-tabs-mode: nil
- *  c-indent-level: 4
- *  c-basic-offset: 4
- * End:
- */
-- 
1.8.1

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux