[virt-tools-list] [libosinfo v2 1/2] Add a private header

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Tue Oct 30 12:50:15 UTC 2012


From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>

This is meant for including headers needed by many .c files.
---
 osinfo/Makefile.am                   |  1 +
 osinfo/osinfo_db.c                   |  4 +---
 osinfo/osinfo_deployment.c           |  4 +---
 osinfo/osinfo_deploymentlist.c       |  4 +---
 osinfo/osinfo_device.c               |  4 +---
 osinfo/osinfo_devicelink.c           |  4 +---
 osinfo/osinfo_devicelinkfilter.c     |  4 +---
 osinfo/osinfo_devicelinklist.c       |  4 +---
 osinfo/osinfo_devicelist.c           |  4 +---
 osinfo/osinfo_entity.c               |  4 +---
 osinfo/osinfo_filter.c               |  4 +---
 osinfo/osinfo_install_config.c       |  4 +---
 osinfo/osinfo_install_config_param.c |  4 +---
 osinfo/osinfo_install_script.c       |  4 +---
 osinfo/osinfo_install_scriptlist.c   |  4 +---
 osinfo/osinfo_list.c                 |  4 +---
 osinfo/osinfo_loader.c               |  4 +---
 osinfo/osinfo_media.c                |  4 +---
 osinfo/osinfo_medialist.c            |  4 +---
 osinfo/osinfo_os.c                   |  4 +---
 osinfo/osinfo_oslist.c               |  4 +---
 osinfo/osinfo_platform.c             |  4 +---
 osinfo/osinfo_platformlist.c         |  4 +---
 osinfo/osinfo_priv.h                 | 38 ++++++++++++++++++++++++++++++++++++
 osinfo/osinfo_product.c              |  4 +---
 osinfo/osinfo_productfilter.c        |  4 +---
 osinfo/osinfo_productlist.c          |  4 +---
 osinfo/osinfo_resources.c            |  4 +---
 osinfo/osinfo_resourceslist.c        |  4 +---
 osinfo/osinfo_tree.c                 |  4 +---
 osinfo/osinfo_treelist.c             |  4 +---
 31 files changed, 68 insertions(+), 87 deletions(-)
 create mode 100644 osinfo/osinfo_priv.h

diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index 6ddb956..6461f1f 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -111,6 +111,7 @@ libosinfo_1_0_la_SOURCES =	\
   osinfo_treelist.c		\
   osinfo_db.c			\
   osinfo_loader.c		\
+  osinfo_priv.h			\
   $(NULL)
 
 if WITH_GOBJECT_INTROSPECTION
diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c
index d2f0fa2..a2fc12d 100644
--- a/osinfo/osinfo_db.c
+++ b/osinfo/osinfo_db.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 #include <gio/gio.h>
 #include <string.h>
 
diff --git a/osinfo/osinfo_deployment.c b/osinfo/osinfo_deployment.c
index 709c8c6..5f70e0d 100644
--- a/osinfo/osinfo_deployment.c
+++ b/osinfo/osinfo_deployment.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDeployment, osinfo_deployment, OSINFO_TYPE_ENTITY);
 
diff --git a/osinfo/osinfo_deploymentlist.c b/osinfo/osinfo_deploymentlist.c
index b976611..eaab1d0 100644
--- a/osinfo/osinfo_deploymentlist.c
+++ b/osinfo/osinfo_deploymentlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDeploymentList, osinfo_deploymentlist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_device.c b/osinfo/osinfo_device.c
index 57b4529..ce3e84a 100644
--- a/osinfo/osinfo_device.c
+++ b/osinfo/osinfo_device.c
@@ -23,9 +23,7 @@
  *   Michal Privoznik <mprivozn at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDevice, osinfo_device, OSINFO_TYPE_ENTITY);
 
diff --git a/osinfo/osinfo_devicelink.c b/osinfo/osinfo_devicelink.c
index 67e0037..d96c6a4 100644
--- a/osinfo/osinfo_devicelink.c
+++ b/osinfo/osinfo_devicelink.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDeviceLink, osinfo_devicelink, OSINFO_TYPE_ENTITY);
 
diff --git a/osinfo/osinfo_devicelinkfilter.c b/osinfo/osinfo_devicelinkfilter.c
index 690394e..7a33a63 100644
--- a/osinfo/osinfo_devicelinkfilter.c
+++ b/osinfo/osinfo_devicelinkfilter.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDeviceLinkFilter, osinfo_devicelinkfilter, OSINFO_TYPE_FILTER);
 
diff --git a/osinfo/osinfo_devicelinklist.c b/osinfo/osinfo_devicelinklist.c
index 082a830..f7c975c 100644
--- a/osinfo/osinfo_devicelinklist.c
+++ b/osinfo/osinfo_devicelinklist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDeviceLinkList, osinfo_devicelinklist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_devicelist.c b/osinfo/osinfo_devicelist.c
index 6d656ba..2042eae 100644
--- a/osinfo/osinfo_devicelist.c
+++ b/osinfo/osinfo_devicelist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoDeviceList, osinfo_devicelist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_entity.c b/osinfo/osinfo_entity.c
index fcfec6a..30d03d3 100644
--- a/osinfo/osinfo_entity.c
+++ b/osinfo/osinfo_entity.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_ABSTRACT_TYPE (OsinfoEntity, osinfo_entity, G_TYPE_OBJECT);
 
diff --git a/osinfo/osinfo_filter.c b/osinfo/osinfo_filter.c
index 10d7d78..41f1b88 100644
--- a/osinfo/osinfo_filter.c
+++ b/osinfo/osinfo_filter.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoFilter, osinfo_filter, G_TYPE_OBJECT);
 
diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index eb50680..32f669b 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -21,9 +21,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoInstallConfig, osinfo_install_config, OSINFO_TYPE_ENTITY);
 
diff --git a/osinfo/osinfo_install_config_param.c b/osinfo/osinfo_install_config_param.c
index 7e1e3fc..e06b53d 100644
--- a/osinfo/osinfo_install_config_param.c
+++ b/osinfo/osinfo_install_config_param.c
@@ -21,9 +21,7 @@
  *   Fabiano Fidêncio <fabiano at fidencio.org>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoInstallConfigParam, osinfo_install_config_param, OSINFO_TYPE_ENTITY);
 
diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
index cc75153..7b9365b 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -21,9 +21,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 #include <string.h>
 #include <libxml/tree.h>
 #include <libxslt/transform.h>
diff --git a/osinfo/osinfo_install_scriptlist.c b/osinfo/osinfo_install_scriptlist.c
index e5309b5..7cde90b 100644
--- a/osinfo/osinfo_install_scriptlist.c
+++ b/osinfo/osinfo_install_scriptlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoInstallScriptList, osinfo_install_scriptlist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_list.c b/osinfo/osinfo_list.c
index ba3f117..9b415a1 100644
--- a/osinfo/osinfo_list.c
+++ b/osinfo/osinfo_list.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_ABSTRACT_TYPE (OsinfoList, osinfo_list, G_TYPE_OBJECT);
 
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index ae90637..ef935c5 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -22,11 +22,9 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
+#include <osinfo/osinfo_priv.h>
 #include <glib/gi18n-lib.h>
 
-#include <osinfo/osinfo.h>
-
 #include <gio/gio.h>
 
 #include <string.h>
diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index 10eeffb..31e1794 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -23,9 +23,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 #include <gio/gio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/osinfo/osinfo_medialist.c b/osinfo/osinfo_medialist.c
index 689009a..090fceb 100644
--- a/osinfo/osinfo_medialist.c
+++ b/osinfo/osinfo_medialist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoMediaList, osinfo_medialist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_os.c b/osinfo/osinfo_os.c
index 3dd65c7..1e341ee 100644
--- a/osinfo/osinfo_os.c
+++ b/osinfo/osinfo_os.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoOs, osinfo_os, OSINFO_TYPE_PRODUCT);
 
diff --git a/osinfo/osinfo_oslist.c b/osinfo/osinfo_oslist.c
index 4d97ba8..29e0767 100644
--- a/osinfo/osinfo_oslist.c
+++ b/osinfo/osinfo_oslist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoOsList, osinfo_oslist, OSINFO_TYPE_PRODUCTLIST);
 
diff --git a/osinfo/osinfo_platform.c b/osinfo/osinfo_platform.c
index 6f29c60..c64f22f 100644
--- a/osinfo/osinfo_platform.c
+++ b/osinfo/osinfo_platform.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoPlatform, osinfo_platform, OSINFO_TYPE_PRODUCT);
 
diff --git a/osinfo/osinfo_platformlist.c b/osinfo/osinfo_platformlist.c
index 7aa17d9..ee7de03 100644
--- a/osinfo/osinfo_platformlist.c
+++ b/osinfo/osinfo_platformlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoPlatformList, osinfo_platformlist, OSINFO_TYPE_PRODUCTLIST);
 
diff --git a/osinfo/osinfo_priv.h b/osinfo/osinfo_priv.h
new file mode 100644
index 0000000..e9d20b0
--- /dev/null
+++ b/osinfo/osinfo_priv.h
@@ -0,0 +1,38 @@
+/*
+ * libosinfo:
+ *
+ * Copyright (C) 2009-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:
+ *   Zeeshan Ali (Khattak) <zeeshanak at gnome.org>
+ */
+
+#ifndef __OSINFO_PRIV_H__
+#define __OSINFO_PRIV_H__
+
+#include <config.h>
+
+#include <osinfo/osinfo.h>
+
+#endif
+/*
+ * Local variables:
+ *  indent-tabs-mode: nil
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ */
diff --git a/osinfo/osinfo_product.c b/osinfo/osinfo_product.c
index f330209..57a5e07 100644
--- a/osinfo/osinfo_product.c
+++ b/osinfo/osinfo_product.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/osinfo/osinfo_productfilter.c b/osinfo/osinfo_productfilter.c
index 5bba0be..81ad3ac 100644
--- a/osinfo/osinfo_productfilter.c
+++ b/osinfo/osinfo_productfilter.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoProductFilter, osinfo_productfilter, OSINFO_TYPE_FILTER);
 
diff --git a/osinfo/osinfo_productlist.c b/osinfo/osinfo_productlist.c
index c468d38..266b6d7 100644
--- a/osinfo/osinfo_productlist.c
+++ b/osinfo/osinfo_productlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoProductList, osinfo_productlist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_resources.c b/osinfo/osinfo_resources.c
index 29f62bd..d1967b0 100644
--- a/osinfo/osinfo_resources.c
+++ b/osinfo/osinfo_resources.c
@@ -23,9 +23,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 #include <gio/gio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/osinfo/osinfo_resourceslist.c b/osinfo/osinfo_resourceslist.c
index 024aacb..2e26fd3 100644
--- a/osinfo/osinfo_resourceslist.c
+++ b/osinfo/osinfo_resourceslist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoResourcesList, osinfo_resourceslist, OSINFO_TYPE_LIST);
 
diff --git a/osinfo/osinfo_tree.c b/osinfo/osinfo_tree.c
index 9cc41dd..5b3b5ee 100644
--- a/osinfo/osinfo_tree.c
+++ b/osinfo/osinfo_tree.c
@@ -23,9 +23,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 #include <gio/gio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/osinfo/osinfo_treelist.c b/osinfo/osinfo_treelist.c
index 51136e5..3e7a04f 100644
--- a/osinfo/osinfo_treelist.c
+++ b/osinfo/osinfo_treelist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange at redhat.com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include <osinfo/osinfo_priv.h>
 
 G_DEFINE_TYPE (OsinfoTreeList, osinfo_treelist, OSINFO_TYPE_LIST);
 
-- 
1.7.12.1




More information about the virt-tools-list mailing list