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

[virt-tools-list] [libosinfo v4 1/3] Add private headers



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

These are meant for including headers needed by all/many .c files.
---
 cfg.mk                               |  2 ++
 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 +---
 test/Makefile.am                     |  2 ++
 test/osinfo_priv.h                   | 41 ++++++++++++++++++++++++++++++++++++
 test/test-db.c                       |  6 +-----
 test/test-device.c                   |  8 +------
 test/test-devicelist.c               |  7 +-----
 test/test-entity.c                   |  6 +-----
 test/test-filter.c                   |  8 +------
 test/test-install-script.c           |  7 +-----
 test/test-isodetect.c                |  6 +-----
 test/test-list.c                     |  6 +-----
 test/test-loader.c                   |  6 +-----
 test/test-mediauris.c                |  6 +-----
 test/test-os.c                       |  8 +------
 test/test-oslist.c                   |  7 +-----
 test/test-platform.c                 |  8 +------
 test/test-platformlist.c             |  7 +-----
 test/test-product.c                  |  6 +-----
 test/test-productfilter.c            |  6 +-----
 test/test-treeuris.c                 |  6 +-----
 tools/Makefile.am                    |  2 ++
 tools/osinfo-db-validate.c           |  4 +---
 tools/osinfo-detect.c                |  7 +-----
 tools/osinfo-install-script.c        |  7 +-----
 tools/osinfo-query.c                 |  8 +------
 tools/osinfo_priv.h                  | 41 ++++++++++++++++++++++++++++++++++++
 57 files changed, 177 insertions(+), 206 deletions(-)
 create mode 100644 osinfo/osinfo_priv.h
 create mode 100644 test/osinfo_priv.h
 create mode 100644 tools/osinfo_priv.h

diff --git a/cfg.mk b/cfg.mk
index 6aaa394..979835e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -113,6 +113,8 @@ sc_copyright_format:
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
 
+config_h_header = "osinfo_priv.h"
+
 # Give credit where due:
 # Ensure that each commit author email address (possibly mapped via
 # git log's .mailmap) appears in our AUTHORS file.
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..32ca10d 100644
--- a/osinfo/osinfo_db.c
+++ b/osinfo/osinfo_db.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "osinfo_priv.h"
 #include <gio/gio.h>
 #include <string.h>
 
diff --git a/osinfo/osinfo_deployment.c b/osinfo/osinfo_deployment.c
index 709c8c6..04f6596 100644
--- a/osinfo/osinfo_deployment.c
+++ b/osinfo/osinfo_deployment.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..b87da2a 100644
--- a/osinfo/osinfo_deploymentlist.c
+++ b/osinfo/osinfo_deploymentlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..73dff12 100644
--- a/osinfo/osinfo_device.c
+++ b/osinfo/osinfo_device.c
@@ -23,9 +23,7 @@
  *   Michal Privoznik <mprivozn redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..985be6c 100644
--- a/osinfo/osinfo_devicelink.c
+++ b/osinfo/osinfo_devicelink.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..420586b 100644
--- a/osinfo/osinfo_devicelinkfilter.c
+++ b/osinfo/osinfo_devicelinkfilter.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..2ec3161 100644
--- a/osinfo/osinfo_devicelinklist.c
+++ b/osinfo/osinfo_devicelinklist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..8a2df7d 100644
--- a/osinfo/osinfo_devicelist.c
+++ b/osinfo/osinfo_devicelist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..c7b821b 100644
--- a/osinfo/osinfo_entity.c
+++ b/osinfo/osinfo_entity.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..7b3cfcf 100644
--- a/osinfo/osinfo_filter.c
+++ b/osinfo/osinfo_filter.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..adfd758 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -21,9 +21,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..640f7d6 100644
--- a/osinfo/osinfo_install_config_param.c
+++ b/osinfo/osinfo_install_config_param.c
@@ -21,9 +21,7 @@
  *   Fabiano Fid??ncio <fabiano fidencio org>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..c8bf47a 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -21,9 +21,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..0dffbdd 100644
--- a/osinfo/osinfo_install_scriptlist.c
+++ b/osinfo/osinfo_install_scriptlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..53e148b 100644
--- a/osinfo/osinfo_list.c
+++ b/osinfo/osinfo_list.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..6b03b91 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -22,11 +22,9 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
+#include "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..89043a8 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -23,9 +23,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..b8b42c1 100644
--- a/osinfo/osinfo_medialist.c
+++ b/osinfo/osinfo_medialist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..b56ac51 100644
--- a/osinfo/osinfo_os.c
+++ b/osinfo/osinfo_os.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..2fb4e87 100644
--- a/osinfo/osinfo_oslist.c
+++ b/osinfo/osinfo_oslist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..bf9a901 100644
--- a/osinfo/osinfo_platform.c
+++ b/osinfo/osinfo_platform.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..31ab623 100644
--- a/osinfo/osinfo_platformlist.c
+++ b/osinfo/osinfo_platformlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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 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..0413047 100644
--- a/osinfo/osinfo_product.c
+++ b/osinfo/osinfo_product.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "osinfo_priv.h"
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/osinfo/osinfo_productfilter.c b/osinfo/osinfo_productfilter.c
index 5bba0be..dc08fbe 100644
--- a/osinfo/osinfo_productfilter.c
+++ b/osinfo/osinfo_productfilter.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..5cf4018 100644
--- a/osinfo/osinfo_productlist.c
+++ b/osinfo/osinfo_productlist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..1240784 100644
--- a/osinfo/osinfo_resources.c
+++ b/osinfo/osinfo_resources.c
@@ -23,9 +23,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..1c0c983 100644
--- a/osinfo/osinfo_resourceslist.c
+++ b/osinfo/osinfo_resourceslist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..8d14c1b 100644
--- a/osinfo/osinfo_tree.c
+++ b/osinfo/osinfo_tree.c
@@ -23,9 +23,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "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..e790663 100644
--- a/osinfo/osinfo_treelist.c
+++ b/osinfo/osinfo_treelist.c
@@ -22,9 +22,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
+#include "osinfo_priv.h"
 
 G_DEFINE_TYPE (OsinfoTreeList, osinfo_treelist, OSINFO_TYPE_LIST);
 
diff --git a/test/Makefile.am b/test/Makefile.am
index 2ceb7b1..c9d190c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -21,6 +21,8 @@ check_PROGRAMS = \
 	test-install-script \
         $(NULL)
 
+noinst_HEADERS = osinfo_priv.h
+
 COMMON_LDADD = \
 	$(COVERAGE_LDFLAGS) \
 	$(GOBJECT_LIBS) \
diff --git a/test/osinfo_priv.h b/test/osinfo_priv.h
new file mode 100644
index 0000000..f21a41e
--- /dev/null
+++ b/test/osinfo_priv.h
@@ -0,0 +1,41 @@
+/*
+ * 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 gnome org>
+ */
+
+#ifndef __OSINFO_PRIV_H__
+#define __OSINFO_PRIV_H__
+
+#include <config.h>
+
+#include <osinfo/osinfo.h>
+#include <stdlib.h>
+#include <check.h>
+#include <glib/gi18n.h>
+
+#endif
+/*
+ * Local variables:
+ *  indent-tabs-mode: nil
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ */
diff --git a/test/test-db.c b/test/test-db.c
index 50e29fe..31eac83 100644
--- a/test/test-db.c
+++ b/test/test-db.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 START_TEST(test_basic)
 {
diff --git a/test/test-device.c b/test/test-device.c
index 4612d27..a86dd49 100644
--- a/test/test-device.c
+++ b/test/test-device.c
@@ -19,13 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
-
+#include "osinfo_priv.h"
 
 START_TEST(test_basic)
 {
diff --git a/test/test-devicelist.c b/test/test-devicelist.c
index 31059df..1525c38 100644
--- a/test/test-devicelist.c
+++ b/test/test-devicelist.c
@@ -19,12 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
+#include "osinfo_priv.h"
 
 START_TEST(test_union)
 {
diff --git a/test/test-entity.c b/test/test-entity.c
index aff2a59..639bd98 100644
--- a/test/test-entity.c
+++ b/test/test-entity.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 /* OsinfoEntity is abstract, so we need to trivially subclass it to test it */
 typedef struct _OsinfoDummy        OsinfoDummy;
diff --git a/test/test-filter.c b/test/test-filter.c
index c6fbf4b..68a6c3e 100644
--- a/test/test-filter.c
+++ b/test/test-filter.c
@@ -19,13 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
-
+#include "osinfo_priv.h"
 
 START_TEST(test_basic)
 {
diff --git a/test/test-install-script.c b/test/test-install-script.c
index 6abeeb3..9741760 100644
--- a/test/test-install-script.c
+++ b/test/test-install-script.c
@@ -19,12 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <config.h>
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 static GError *error = NULL;
 static gchar *actualData = NULL;
diff --git a/test/test-isodetect.c b/test/test-isodetect.c
index acc3103..6bf9ba3 100644
--- a/test/test-isodetect.c
+++ b/test/test-isodetect.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 struct ISOInfo {
     gchar *shortid;
diff --git a/test/test-list.c b/test/test-list.c
index 0656799..63507ae 100644
--- a/test/test-list.c
+++ b/test/test-list.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 /* OsinfoEntity is abstract, so we need to trivially subclass it to test it */
 typedef struct _OsinfoDummy        OsinfoDummy;
diff --git a/test/test-loader.c b/test/test-loader.c
index 7755600..e2424a7 100644
--- a/test/test-loader.c
+++ b/test/test-loader.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 START_TEST(test_basic)
 {
diff --git a/test/test-mediauris.c b/test/test-mediauris.c
index 85a2239..3abf977 100644
--- a/test/test-mediauris.c
+++ b/test/test-mediauris.c
@@ -19,12 +19,8 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
+#include "osinfo_priv.h"
 
-#include <config.h>
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
 #include <libsoup/soup.h>
 #define HAVE_LIBSOUP_GNOME
 #include <libsoup/soup-gnome.h>
diff --git a/test/test-os.c b/test/test-os.c
index ecec8f5..b1d38cd 100644
--- a/test/test-os.c
+++ b/test/test-os.c
@@ -19,13 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
-
+#include "osinfo_priv.h"
 
 START_TEST(test_basic)
 {
diff --git a/test/test-oslist.c b/test/test-oslist.c
index d63bb91..6385757 100644
--- a/test/test-oslist.c
+++ b/test/test-oslist.c
@@ -19,12 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
+#include "osinfo_priv.h"
 
 START_TEST(test_union)
 {
diff --git a/test/test-platform.c b/test/test-platform.c
index 97c4c8b..ec9600d 100644
--- a/test/test-platform.c
+++ b/test/test-platform.c
@@ -19,13 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
-
+#include "osinfo_priv.h"
 
 START_TEST(test_basic)
 {
diff --git a/test/test-platformlist.c b/test/test-platformlist.c
index e6b6ce3..bd684a2 100644
--- a/test/test-platformlist.c
+++ b/test/test-platformlist.c
@@ -19,12 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
-
+#include "osinfo_priv.h"
 
 START_TEST(test_union)
 {
diff --git a/test/test-product.c b/test/test-product.c
index 5d64795..60c3aee 100644
--- a/test/test-product.c
+++ b/test/test-product.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 /* OsinfoProduct is abstract, so we need to trivially subclass it to test it */
 typedef struct _OsinfoDummy        OsinfoDummy;
diff --git a/test/test-productfilter.c b/test/test-productfilter.c
index 7c9ce47..40e5b74 100644
--- a/test/test-productfilter.c
+++ b/test/test-productfilter.c
@@ -19,11 +19,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
+#include "osinfo_priv.h"
 
 /* OsinfoProduct is abstract, so we need to trivially subclass it to test it */
 typedef struct _OsinfoDummy        OsinfoDummy;
diff --git a/test/test-treeuris.c b/test/test-treeuris.c
index 584cda8..f1dbe2c 100644
--- a/test/test-treeuris.c
+++ b/test/test-treeuris.c
@@ -19,12 +19,8 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
+#include "osinfo_priv.h"
 
-#include <config.h>
-#include <stdlib.h>
-#include <osinfo/osinfo.h>
-#include <check.h>
 #include <libsoup/soup.h>
 #define HAVE_LIBSOUP_GNOME
 #include <libsoup/soup-gnome.h>
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 8494439..1db9ff6 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -18,6 +18,8 @@ POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
 %.1: %.c Makefile
 	$(AM_V_GEN)$(POD2MAN) $< $@
 
+noinst_HEADERS = osinfo_priv.h
+
 osinfo_detect_SOURCES = osinfo-detect.c
 osinfo_detect_LDADD = $(GOBJECT_LIBS) 	     \
 		      $(GIO_LIBS)     	     \
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index 5b7274b..f5855d1 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -21,13 +21,11 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
+#include "osinfo_priv.h"
 
 #include <glib.h>
 #include <gio/gio.h>
 #include <libxml/relaxng.h>
-#include <locale.h>
-#include <glib/gi18n.h>
 
 #define SCHEMA PKGDATADIR "/schemas/libosinfo.rng"
 
diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c
index 1b94e36..1ceda52 100644
--- a/tools/osinfo-detect.c
+++ b/tools/osinfo-detect.c
@@ -22,12 +22,7 @@
  *   Zeeshan Ali <zeenix redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
-#include <string.h>
-#include <locale.h>
-#include <glib/gi18n.h>
+#include "osinfo_priv.h"
 
 #define FORMAT_STR_PLAIN "plain"
 #define FORMAT_STR_ENV "env"
diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index 66116e1..73c5672 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -21,12 +21,7 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
-
-#include <osinfo/osinfo.h>
-#include <string.h>
-#include <locale.h>
-#include <glib/gi18n.h>
+#include "osinfo_priv.h"
 
 static const gchar *profile;
 static const gchar *output_dir;
diff --git a/tools/osinfo-query.c b/tools/osinfo-query.c
index 006f86d..e68be90 100644
--- a/tools/osinfo-query.c
+++ b/tools/osinfo-query.c
@@ -21,18 +21,12 @@
  *   Daniel P. Berrange <berrange redhat com>
  */
 
-#include <config.h>
+#include "osinfo_priv.h"
 
 #include <glib.h>
 #include <gio/gio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <stdio.h>
-#include <locale.h>
-#include <glib/gi18n.h>
-
-#include <osinfo/osinfo.h>
-
 
 struct OsinfoLabel {
     const gchar *prop;
diff --git a/tools/osinfo_priv.h b/tools/osinfo_priv.h
new file mode 100644
index 0000000..bf90c8e
--- /dev/null
+++ b/tools/osinfo_priv.h
@@ -0,0 +1,41 @@
+/*
+ * 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 gnome org>
+ */
+
+#ifndef __OSINFO_PRIV_H__
+#define __OSINFO_PRIV_H__
+
+#include <config.h>
+
+#include <osinfo/osinfo.h>
+#include <string.h>
+#include <locale.h>
+#include <glib/gi18n.h>
+
+#endif
+/*
+ * Local variables:
+ *  indent-tabs-mode: nil
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ */
-- 
1.7.12.1


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