[gnome-color-manager: 63/80] trivial: move GcmDmi to libcolor-glib



commit b6d2d7836daafe79297eb8cb6163b7b74bfad507
Author: Richard Hughes <richard hughsie com>
Date:   Sun Jul 18 12:46:22 2010 +0100

    trivial: move GcmDmi to libcolor-glib

 libcolor-glib/Makefile.am        |    3 +++
 {src => libcolor-glib}/gcm-dmi.c |    0
 {src => libcolor-glib}/gcm-dmi.h |    4 ++++
 libcolor-glib/gcm-self-test.c    |   14 ++++++++++++++
 libcolor-glib/libcolor-glib.h    |    1 +
 src/Makefile.am                  |    2 --
 src/gcm-self-test.c              |   15 ---------------
 7 files changed, 22 insertions(+), 17 deletions(-)
---
diff --git a/libcolor-glib/Makefile.am b/libcolor-glib/Makefile.am
index 3cb4437..95b10df 100644
--- a/libcolor-glib/Makefile.am
+++ b/libcolor-glib/Makefile.am
@@ -40,6 +40,7 @@ libcolor_glib_include_HEADERS =					\
 	gcm-edid.h						\
 	gcm-enum.h						\
 	gcm-profile.h						\
+	gcm-dmi.h						\
 	gcm-version.h						\
 	$(NULL)
 
@@ -59,6 +60,8 @@ libcolor_glib_la_SOURCES =					\
 	gcm-tables.h						\
 	gcm-edid.c						\
 	gcm-edid.h						\
+	gcm-dmi.c						\
+	gcm-dmi.h						\
 	gcm-profile.c						\
 	gcm-profile.h						\
 	gcm-clut.c						\
diff --git a/src/gcm-dmi.c b/libcolor-glib/gcm-dmi.c
similarity index 100%
rename from src/gcm-dmi.c
rename to libcolor-glib/gcm-dmi.c
diff --git a/src/gcm-dmi.h b/libcolor-glib/gcm-dmi.h
similarity index 93%
rename from src/gcm-dmi.h
rename to libcolor-glib/gcm-dmi.h
index 7c5f284..74764e7 100644
--- a/src/gcm-dmi.h
+++ b/libcolor-glib/gcm-dmi.h
@@ -19,6 +19,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#if !defined (__LIBCOLOR_GLIB_H_INSIDE__) && !defined (LIBCOLOR_GLIB_COMPILATION)
+#error "Only <libcolor-glib.h> can be included directly."
+#endif
+
 #ifndef __GCM_DMI_H
 #define __GCM_DMI_H
 
diff --git a/libcolor-glib/gcm-self-test.c b/libcolor-glib/gcm-self-test.c
index 9eda46c..f3b1f34 100644
--- a/libcolor-glib/gcm-self-test.c
+++ b/libcolor-glib/gcm-self-test.c
@@ -33,6 +33,7 @@
 #include "gcm-profile.h"
 #include "gcm-clut.h"
 #include "gcm-xyz.h"
+#include "gcm-dmi.h"
 
 static void
 gcm_test_common_func (void)
@@ -449,6 +450,18 @@ gcm_test_clut_func (void)
 	g_object_unref (clut);
 }
 
+static void
+gcm_test_dmi_func (void)
+{
+	GcmDmi *dmi;
+
+	dmi = gcm_dmi_new ();
+	g_assert (dmi != NULL);
+	g_assert (gcm_dmi_get_name (dmi) != NULL);
+	g_assert (gcm_dmi_get_version (dmi) != NULL);
+	g_assert (gcm_dmi_get_vendor (dmi) != NULL);
+	g_object_unref (dmi);
+}
 
 static void
 gcm_test_xyz_func (void)
@@ -499,6 +512,7 @@ main (int argc, char **argv)
 	g_test_add_func ("/libcolor-glib/profile", gcm_test_profile_func);
 	g_test_add_func ("/libcolor-glib/clut", gcm_test_clut_func);
 	g_test_add_func ("/libcolor-glib/xyz", gcm_test_xyz_func);
+	g_test_add_func ("/libcolor-glib/dmi", gcm_test_dmi_func);
 
 	return g_test_run ();
 }
diff --git a/libcolor-glib/libcolor-glib.h b/libcolor-glib/libcolor-glib.h
index 06f49b5..72805aa 100644
--- a/libcolor-glib/libcolor-glib.h
+++ b/libcolor-glib/libcolor-glib.h
@@ -40,6 +40,7 @@
 #include <gcm-profile.h>
 #include <gcm-enum.h>
 #include <gcm-clut.h>
+#include <gcm-dmi.h>
 
 #undef __LIBCOLOR_GLIB_H_INSIDE__
 
diff --git a/src/Makefile.am b/src/Makefile.am
index c9e027b..0d14c56 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -50,8 +50,6 @@ libgcmshared_a_SOURCES =				\
 	gcm-print.h					\
 	gcm-utils.c					\
 	gcm-utils.h					\
-	gcm-dmi.c					\
-	gcm-dmi.h					\
 	gcm-xserver.c					\
 	gcm-xserver.h					\
 	gcm-client.c					\
diff --git a/src/gcm-self-test.c b/src/gcm-self-test.c
index e9dab4e..c7b6750 100644
--- a/src/gcm-self-test.c
+++ b/src/gcm-self-test.c
@@ -32,7 +32,6 @@
 #include "gcm-device.h"
 #include "gcm-device-udev.h"
 #include "gcm-device-xrandr.h"
-#include "gcm-dmi.h"
 #include "gcm-exif.h"
 #include "gcm-gamma-widget.h"
 #include "gcm-image.h"
@@ -411,19 +410,6 @@ gcm_test_device_func (void)
 }
 
 static void
-gcm_test_dmi_func (void)
-{
-	GcmDmi *dmi;
-
-	dmi = gcm_dmi_new ();
-	g_assert (dmi != NULL);
-	g_assert (gcm_dmi_get_name (dmi) != NULL);
-	g_assert (gcm_dmi_get_version (dmi) != NULL);
-	g_assert (gcm_dmi_get_vendor (dmi) != NULL);
-	g_object_unref (dmi);
-}
-
-static void
 gcm_test_exif_func (void)
 {
 	GcmExif *exif;
@@ -854,7 +840,6 @@ main (int argc, char **argv)
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/color/client", gcm_test_client_func);
-	g_test_add_func ("/color/dmi", gcm_test_dmi_func);
 	g_test_add_func ("/color/calibrate", gcm_test_calibrate_func);
 	g_test_add_func ("/color/exif", gcm_test_exif_func);
 	g_test_add_func ("/color/utils", gcm_test_utils_func);



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