[gnome-color-manager/colord: 15/72] Use some of the enums from libcolord



commit 71191969662b0a0924f71f6c57263a9dc4639328
Author: Richard Hughes <richard hughsie com>
Date:   Sun Jan 16 15:31:34 2011 +0000

    Use some of the enums from libcolord

 Makefile.am                          |    6 +-
 docs/huey/Makefile.am                |    6 +-
 src/Makefile.am                      |   13 ++---
 src/cc-color-panel.c                 |   88 +++++++++++++++++-----------------
 src/gcm-calibrate-argyll.c           |    8 ++--
 src/gcm-calibrate-native.c           |    2 +-
 src/gcm-calibrate.c                  |   14 +++---
 src/gcm-cell-renderer-profile-icon.c |    2 +-
 src/gcm-client.c                     |   12 ++--
 src/gcm-device-sane.c                |    2 +-
 src/gcm-device-xrandr.c              |   12 ++--
 src/gcm-device.c                     |   42 ++++++++--------
 src/gcm-device.h                     |    4 +-
 src/gcm-enum.c                       |   46 ------------------
 src/gcm-enum.h                       |   25 ----------
 src/gcm-exif.c                       |   28 +++++-----
 src/gcm-exif.h                       |    3 +-
 src/gcm-inspect.c                    |   12 ++--
 src/gcm-list-store-profiles.c        |    2 +-
 src/gcm-profile.c                    |   31 ++++++------
 src/gcm-profile.h                    |    5 +-
 src/gcm-self-test.c                  |   26 +++++-----
 src/gcm-session.c                    |   14 +++---
 src/gcm-utils.c                      |   22 ++++----
 src/gcm-utils.h                      |    2 +-
 src/gcm-viewer.c                     |   44 ++++++++--------
 tools/Makefile.am                    |    4 +-
 tools/gcm-dump-profile.c             |    3 +-
 28 files changed, 205 insertions(+), 273 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index bdd8037..6f9f013 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,12 +1,12 @@
-SUBDIRS = 						\
+SUBDIRS =						\
+	src						\
 	docs						\
 	data						\
 	help						\
 	man						\
 	po						\
 	rules						\
-	tools						\
-	src
+	tools
 
 snapshot:
 	$(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
diff --git a/docs/huey/Makefile.am b/docs/huey/Makefile.am
index a46f011..2ff759a 100644
--- a/docs/huey/Makefile.am
+++ b/docs/huey/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES =							\
 	$(GTK_CFLAGS)						\
 	$(GLIB_CFLAGS)
 
-COLOR_GLIB_LIBS =						\
+COLORD_LIBS =						\
 	$(top_builddir)/src/libgcmshared.a
 
 noinst_PROGRAMS =						\
@@ -15,7 +15,7 @@ gcm_parse_huey_SOURCES =					\
 	gcm-parse-huey.c
 
 gcm_parse_huey_LDADD =						\
-	$(COLOR_GLIB_LIBS)					\
+	$(COLORD_LIBS)					\
 	$(GLIB_LIBS)
 
 gcm_parse_huey_CFLAGS =						\
@@ -25,7 +25,7 @@ gcm_dump_to_values_SOURCES =					\
 	gcm-dump-to-values.c
 
 gcm_dump_to_values_LDADD =					\
-	$(COLOR_GLIB_LIBS)					\
+	$(COLORD_LIBS)					\
 	$(GLIB_LIBS)
 
 gcm_dump_to_values_CFLAGS =					\
diff --git a/src/Makefile.am b/src/Makefile.am
index 8a9f012..b0450e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -122,9 +122,6 @@ libgcmshared_a_SOURCES +=				\
 libgcmshared_a_CFLAGS =					\
 	$(WARNINGFLAGS_C)
 
-libgcmshared_a_LIBADD =					\
-	$(COLOR_GLIB_LIBS)
-
 bin_PROGRAMS =						\
 	gcm-inspect					\
 	gcm-viewer					\
@@ -151,7 +148,7 @@ gcm_inspect_LDADD =					\
 	$(GTK_LIBS)					\
 	$(LCMS_LIBS)					\
 	$(SANE_LIBS)					\
-	$(COLOR_GLIB_LIBS)				\
+	$(COLORD_LIBS)					\
 	-lm
 
 gcm_inspect_CFLAGS =					\
@@ -169,7 +166,7 @@ gcm_import_LDADD =					\
 	$(GTK_LIBS)					\
 	$(LCMS_LIBS)					\
 	$(SANE_LIBS)					\
-	$(COLOR_GLIB_LIBS)				\
+	$(COLORD_LIBS)					\
 	-lm
 
 gcm_import_CFLAGS =					\
@@ -192,7 +189,7 @@ gcm_viewer_LDADD =					\
 	$(TIFF_LIBS)					\
 	$(LCMS_LIBS)					\
 	$(EXIF_LIBS)					\
-	$(COLOR_GLIB_LIBS)				\
+	$(COLORD_LIBS)					\
 	-lm
 
 gcm_viewer_CFLAGS =					\
@@ -215,7 +212,7 @@ gcm_picker_LDADD =					\
 	$(LCMS_LIBS)					\
 	$(EXIF_LIBS)					\
 	$(CANBERRA_LIBS)				\
-	$(COLOR_GLIB_LIBS)				\
+	$(COLORD_LIBS)				\
 	-lm
 
 gcm_picker_CFLAGS =					\
@@ -268,7 +265,7 @@ libcolor_la_LIBADD =					\
 	$(NOTIFY_LIBS)					\
 	$(CANBERRA_LIBS)				\
 	$(CONTROL_CENTER_LIBS)				\
-	$(COLOR_GLIB_LIBS)
+	$(COLORD_LIBS)
 
 libcolor_la_LDFLAGS = -avoid-version -module
 libcolor_la_CFLAGS = $(WARNINGFLAGS_C)
diff --git a/src/cc-color-panel.c b/src/cc-color-panel.c
index bf4921c..ee2021d 100644
--- a/src/cc-color-panel.c
+++ b/src/cc-color-panel.c
@@ -170,7 +170,7 @@ cc_color_panel_default_cb (GtkWidget *widget, CcColorPanel *panel)
 {
 	GPtrArray *array = NULL;
 	GcmDevice *device;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	gboolean ret;
 	guint i;
 
@@ -181,7 +181,7 @@ cc_color_panel_default_cb (GtkWidget *widget, CcColorPanel *panel)
 
 		/* not a xrandr panel */
 		kind = gcm_device_get_kind (device);
-		if (kind != GCM_DEVICE_KIND_DISPLAY)
+		if (kind != CD_DEVICE_KIND_DISPLAY)
 			continue;
 
 		/* set for this device */
@@ -585,7 +585,7 @@ cc_color_panel_virtual_set_from_file (CcColorPanel *panel, GFile *file)
 
 	/* set type */
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_virtual_type"));
-	gtk_combo_box_set_active (GTK_COMBO_BOX(widget), GCM_DEVICE_KIND_CAMERA - 2);
+	gtk_combo_box_set_active (GTK_COMBO_BOX(widget), CD_DEVICE_KIND_CAMERA - 2);
 out:
 	g_object_unref (exif);
 	return ret;
@@ -706,7 +706,7 @@ static void
 cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 {
 	GcmCalibrate *calibrate = NULL;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	gboolean ret;
 	GError *error = NULL;
 	const gchar *filename;
@@ -729,14 +729,14 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 	/* choose the correct kind of calibration */
 	kind = gcm_device_get_kind (panel->priv->current_device);
 	switch (kind) {
-	case GCM_DEVICE_KIND_DISPLAY:
+	case CD_DEVICE_KIND_DISPLAY:
 		ret = cc_color_panel_calibrate_display (panel, calibrate);
 		break;
-	case GCM_DEVICE_KIND_SCANNER:
-	case GCM_DEVICE_KIND_CAMERA:
+	case CD_DEVICE_KIND_SCANNER:
+	case CD_DEVICE_KIND_CAMERA:
 		ret = cc_color_panel_calibrate_device (panel, calibrate);
 		break;
-	case GCM_DEVICE_KIND_PRINTER:
+	case CD_DEVICE_KIND_PRINTER:
 		ret = cc_color_panel_calibrate_printer (panel, calibrate);
 		break;
 	default:
@@ -841,12 +841,12 @@ cc_color_panel_device_add_cb (GtkWidget *widget, CcColorPanel *panel)
 static gboolean
 cc_color_panel_is_profile_suitable_for_device (GcmProfile *profile, GcmDevice *device)
 {
-	GcmProfileKind profile_kind_tmp;
-	GcmProfileKind profile_kind;
+	CdProfileKind profile_kind_tmp;
+	CdProfileKind profile_kind;
 	GcmColorspace profile_colorspace;
 	GcmColorspace device_colorspace;
 	gboolean ret = FALSE;
-	GcmDeviceKind device_kind;
+	CdDeviceKind device_kind;
 
 	/* not the right colorspace */
 	device_colorspace = gcm_device_get_colorspace (device);
@@ -959,7 +959,7 @@ cc_color_panel_profile_remove_cb (GtkWidget *widget, CcColorPanel *panel)
 	/* if this is an auto-added profile that the user has *manually*
 	 * removed, then assume there was something wrong with the profile
 	 * and don't do this again on next session start */
-	if (gcm_device_get_kind (panel->priv->current_device) == GCM_DEVICE_KIND_DISPLAY) {
+	if (gcm_device_get_kind (panel->priv->current_device) == CD_DEVICE_KIND_DISPLAY) {
 		device_md5 = gcm_device_xrandr_get_edid_md5 (GCM_DEVICE_XRANDR (panel->priv->current_device));
 		if (g_strstr_len (gcm_profile_get_filename (profile), -1, device_md5) != NULL) {
 			g_debug ("removed an auto-profile, so disabling add for device");
@@ -1071,7 +1071,7 @@ cc_color_panel_profile_make_default_cb (GtkWidget *widget, CcColorPanel *panel)
 static void
 cc_color_panel_button_virtual_add_cb (GtkWidget *widget, CcColorPanel *panel)
 {
-	GcmDeviceKind device_kind;
+	CdDeviceKind device_kind;
 	GcmDevice *device;
 	const gchar *model;
 	const gchar *manufacturer;
@@ -1304,7 +1304,7 @@ cc_color_panel_set_calibrate_button_sensitivity (CcColorPanel *panel)
 	gboolean ret = FALSE;
 	GtkWidget *widget;
 	const gchar *tooltip;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	gboolean has_vte = TRUE;
 
 	/* TRANSLATORS: this is when the button is sensitive */
@@ -1330,7 +1330,7 @@ cc_color_panel_set_calibrate_button_sensitivity (CcColorPanel *panel)
 
 	/* are we a display */
 	kind = gcm_device_get_kind (panel->priv->current_device);
-	if (kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (kind == CD_DEVICE_KIND_DISPLAY) {
 
 		/* are we disconnected */
 		ret = gcm_device_get_connected (panel->priv->current_device);
@@ -1355,13 +1355,13 @@ cc_color_panel_set_calibrate_button_sensitivity (CcColorPanel *panel)
 			tooltip = _("Cannot create profile: The measuring instrument is not plugged in");
 			goto out;
 		}
-	} else if (kind == GCM_DEVICE_KIND_SCANNER ||
-		   kind == GCM_DEVICE_KIND_CAMERA) {
+	} else if (kind == CD_DEVICE_KIND_SCANNER ||
+		   kind == CD_DEVICE_KIND_CAMERA) {
 
 		/* TODO: find out if we can scan using gnome-scan */
 		ret = TRUE;
 
-	} else if (kind == GCM_DEVICE_KIND_PRINTER) {
+	} else if (kind == CD_DEVICE_KIND_PRINTER) {
 
 		/* find whether we have hardware installed */
 		ret = gcm_sensor_client_get_present (panel->priv->sensor_client);
@@ -1403,7 +1403,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 	gboolean connected;
 	gchar *id = NULL;
 	gboolean ret;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	GtkTreeIter iter;
 
 	/* This will only work in single or browse selection mode! */
@@ -1431,7 +1431,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_problems"));
 	gtk_widget_hide (widget);
 	kind = gcm_device_get_kind (panel->priv->current_device);
-	if (kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (kind == CD_DEVICE_KIND_DISPLAY) {
 		ret = gcm_device_get_connected (panel->priv->current_device);
 		if (ret) {
 			ret = gcm_device_xrandr_get_xrandr13 (GCM_DEVICE_XRANDR (panel->priv->current_device));
@@ -1537,18 +1537,18 @@ cc_color_panel_profile_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 }
 
 /**
- * gcm_device_kind_to_string:
+ * cd_device_kind_to_string:
  **/
 static const gchar *
-cc_color_panel_device_kind_to_string (GcmDeviceKind kind)
+cc_color_panel_device_kind_to_string (CdDeviceKind kind)
 {
-	if (kind == GCM_DEVICE_KIND_DISPLAY)
+	if (kind == CD_DEVICE_KIND_DISPLAY)
 		return "1";
-	if (kind == GCM_DEVICE_KIND_SCANNER)
+	if (kind == CD_DEVICE_KIND_SCANNER)
 		return "2";
-	if (kind == GCM_DEVICE_KIND_CAMERA)
+	if (kind == CD_DEVICE_KIND_CAMERA)
 		return "3";
-	if (kind == GCM_DEVICE_KIND_PRINTER)
+	if (kind == CD_DEVICE_KIND_PRINTER)
 		return "4";
 	return "5";
 }
@@ -1599,7 +1599,7 @@ cc_color_panel_add_device_xrandr (CcColorPanel *panel, GcmDevice *device)
 
 	/* create sort order */
 	sort = g_strdup_printf ("%s%s",
-				cc_color_panel_device_kind_to_string (GCM_DEVICE_KIND_DISPLAY),
+				cc_color_panel_device_kind_to_string (CD_DEVICE_KIND_DISPLAY),
 				title);
 
 	/* add to list */
@@ -1771,15 +1771,15 @@ cc_color_panel_sensor_client_changed_cb (GcmSensorClient *sensor_client, CcColor
  * cc_color_panel_device_kind_to_icon_name:
  **/
 static const gchar *
-cc_color_panel_device_kind_to_icon_name (GcmDeviceKind kind)
+cc_color_panel_device_kind_to_icon_name (CdDeviceKind kind)
 {
-	if (kind == GCM_DEVICE_KIND_DISPLAY)
+	if (kind == CD_DEVICE_KIND_DISPLAY)
 		return "video-display";
-	if (kind == GCM_DEVICE_KIND_SCANNER)
+	if (kind == CD_DEVICE_KIND_SCANNER)
 		return "scanner";
-	if (kind == GCM_DEVICE_KIND_PRINTER)
+	if (kind == CD_DEVICE_KIND_PRINTER)
 		return "printer";
-	if (kind == GCM_DEVICE_KIND_CAMERA)
+	if (kind == CD_DEVICE_KIND_CAMERA)
 		return "camera-photo";
 	return "image-missing";
 }
@@ -1795,7 +1795,7 @@ cc_color_panel_add_device_kind (CcColorPanel *panel, GcmDevice *device)
 	GString *string;
 	const gchar *id;
 	gchar *sort = NULL;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	const gchar *icon_name;
 	gboolean connected;
 	gboolean virtual;
@@ -1876,7 +1876,7 @@ cc_color_panel_remove_device (CcColorPanel *panel, GcmDevice *gcm_device)
 static void
 cc_color_panel_added_cb (GcmClient *client, GcmDevice *device, CcColorPanel *panel)
 {
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	g_debug ("added: %s (connected: %i, saved: %i)",
 		   gcm_device_get_id (device),
 		   gcm_device_get_connected (device),
@@ -1887,7 +1887,7 @@ cc_color_panel_added_cb (GcmClient *client, GcmDevice *device, CcColorPanel *pan
 
 	/* add the device */
 	kind = gcm_device_get_kind (device);
-	if (kind == GCM_DEVICE_KIND_DISPLAY)
+	if (kind == CD_DEVICE_KIND_DISPLAY)
 		cc_color_panel_add_device_xrandr (panel, device);
 	else
 		cc_color_panel_add_device_kind (panel, device);
@@ -2315,24 +2315,24 @@ cc_color_panel_info_bar_response_cb (GtkDialog *dialog, GtkResponseType response
 }
 
 /**
- * gcm_device_kind_to_localised_string:
+ * cd_device_kind_to_localised_string:
  **/
 static const gchar *
-gcm_device_kind_to_localised_string (GcmDeviceKind device_kind)
+cd_device_kind_to_localised_string (CdDeviceKind device_kind)
 {
-	if (device_kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (device_kind == CD_DEVICE_KIND_DISPLAY) {
 		/* TRANSLATORS: device type */
 		return _("Display");
 	}
-	if (device_kind == GCM_DEVICE_KIND_SCANNER) {
+	if (device_kind == CD_DEVICE_KIND_SCANNER) {
 		/* TRANSLATORS: device type */
 		return _("Scanner");
 	}
-	if (device_kind == GCM_DEVICE_KIND_PRINTER) {
+	if (device_kind == CD_DEVICE_KIND_PRINTER) {
 		/* TRANSLATORS: device type */
 		return _("Printer");
 	}
-	if (device_kind == GCM_DEVICE_KIND_CAMERA) {
+	if (device_kind == CD_DEVICE_KIND_CAMERA) {
 		/* TRANSLATORS: device type */
 		return _("Camera");
 	}
@@ -2348,11 +2348,11 @@ cc_color_panel_setup_virtual_combobox (GtkWidget *widget)
 	guint i;
 	const gchar *text;
 
-	for (i=GCM_DEVICE_KIND_SCANNER; i<GCM_DEVICE_KIND_LAST; i++) {
-		text = gcm_device_kind_to_localised_string (i);
+	for (i=CD_DEVICE_KIND_SCANNER; i<CD_DEVICE_KIND_LAST; i++) {
+		text = cd_device_kind_to_localised_string (i);
 		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(widget), text);
 	}
-	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), GCM_DEVICE_KIND_PRINTER - 2);
+	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), CD_DEVICE_KIND_PRINTER - 2);
 }
 
 /**
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 14ce605..55ee25e 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -621,7 +621,7 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 	gchar *basename = NULL;
 	const gchar *title;
 	const gchar *message;
-	GcmDeviceKind device_kind;
+	CdDeviceKind device_kind;
 
 	/* get shared data */
 	g_object_get (calibrate_argyll,
@@ -654,7 +654,7 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 	g_ptr_array_add (array, g_strdup (command));
 #endif
 	g_ptr_array_add (array, g_strdup ("-v"));
-	if (device_kind == GCM_DEVICE_KIND_PRINTER) {
+	if (device_kind == CD_DEVICE_KIND_PRINTER) {
 		/* print RGB */
 		g_ptr_array_add (array, g_strdup ("-d2"));
 
@@ -666,9 +666,9 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
 	}
 
 	/* get number of patches */
-	if (device_kind == GCM_DEVICE_KIND_DISPLAY)
+	if (device_kind == CD_DEVICE_KIND_DISPLAY)
 		g_ptr_array_add (array, g_strdup_printf ("-f%i", gcm_calibrate_argyll_display_get_patches (calibrate_argyll)));
-	else if (device_kind == GCM_DEVICE_KIND_PRINTER)
+	else if (device_kind == CD_DEVICE_KIND_PRINTER)
 		g_ptr_array_add (array, g_strdup_printf ("-f%i", gcm_calibrate_argyll_printer_get_patches (calibrate_argyll)));
 
 	g_ptr_array_add (array, g_strdup (basename));
diff --git a/src/gcm-calibrate-native.c b/src/gcm-calibrate-native.c
index b567546..972c7a9 100644
--- a/src/gcm-calibrate-native.c
+++ b/src/gcm-calibrate-native.c
@@ -725,7 +725,7 @@ gcm_calibrate_native_display (GcmCalibrate *calibrate, GtkWindow *window, GError
 	/* create basic profile */
 	profile = gcm_profile_new ();
 	gcm_profile_set_colorspace (profile, GCM_COLORSPACE_RGB);
-	gcm_profile_set_kind (profile, GCM_PROFILE_KIND_DISPLAY_DEVICE);
+	gcm_profile_set_kind (profile, CD_PROFILE_KIND_DISPLAY_DEVICE);
 	gcm_profile_set_description (profile, description);
 	gcm_profile_set_copyright (profile, copyright);
 	gcm_profile_set_model (profile, model);
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index ea11e97..25d173b 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -60,7 +60,7 @@ struct _GcmCalibratePrivate
 	GcmCalibratePrecision		 precision;
 	GcmSensorKind			 sensor_kind;
 	GcmCalibrateDialog		*calibrate_dialog;
-	GcmDeviceKind			 device_kind;
+	CdDeviceKind			 device_kind;
 	GcmColorXYZ			*xyz;
 	gchar				*output_name;
 	gchar				*filename_source;
@@ -313,7 +313,7 @@ gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GErro
 	const gchar *model = NULL;
 	const gchar *description = NULL;
 	const gchar *serial = NULL;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	GcmCalibratePrivate *priv = calibrate->priv;
 
 	/* get the device */
@@ -324,7 +324,7 @@ gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GErro
 	manufacturer = gcm_device_get_manufacturer (device);
 
 	/* if we're a laptop, maybe use the dmi data instead */
-	if (kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (kind == CD_DEVICE_KIND_DISPLAY) {
 		native_device = gcm_device_xrandr_get_native_device (GCM_DEVICE_XRANDR (device));
 		lcd_internal = gcm_utils_output_is_lcd_internal (native_device);
 		if (lcd_internal) {
@@ -346,7 +346,7 @@ gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GErro
 	gcm_calibrate_set_basename (calibrate);
 
 	/* display specific properties */
-	if (kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (kind == CD_DEVICE_KIND_DISPLAY) {
 		native_device = gcm_device_xrandr_get_native_device (GCM_DEVICE_XRANDR (device));
 		if (native_device == NULL) {
 			g_set_error (error,
@@ -524,7 +524,7 @@ gcm_calibrate_get_precision (GcmCalibrate *calibrate, GError **error)
 	g_string_append_printf (string, "\n%s", _("For a typical workflow, a normal precision profile is sufficient."));
 
 	/* printer specific options */
-	if (priv->device_kind == GCM_DEVICE_KIND_PRINTER) {
+	if (priv->device_kind == CD_DEVICE_KIND_PRINTER) {
 		/* TRANSLATORS: dialog message, preface */
 		g_string_append_printf (string, "\n%s", _("The high precision profile also requires more paper and printer ink."));
 	}
@@ -1104,7 +1104,7 @@ gcm_calibrate_device (GcmCalibrate *calibrate, GtkWindow *window, GError **error
 	g_string_append_printf (string, "%s\n", _("Before profiling the device, you have to manually capture an image of a calibration target and save it as a TIFF image file."));
 
 	/* scanner specific options */
-	if (priv->device_kind == GCM_DEVICE_KIND_SCANNER) {
+	if (priv->device_kind == CD_DEVICE_KIND_SCANNER) {
 		/* TRANSLATORS: dialog message, preface */
 		g_string_append_printf (string, "%s\n", _("Ensure that the contrast and brightness are not changed and color correction profiles are not applied."));
 
@@ -1113,7 +1113,7 @@ gcm_calibrate_device (GcmCalibrate *calibrate, GtkWindow *window, GError **error
 	}
 
 	/* camera specific options */
-	if (priv->device_kind == GCM_DEVICE_KIND_CAMERA) {
+	if (priv->device_kind == CD_DEVICE_KIND_CAMERA) {
 		/* TRANSLATORS: dialog message, preface */
 		g_string_append_printf (string, "%s\n", _("Ensure that the white-balance has not been modified by the camera and that the lens is clean."));
 	}
diff --git a/src/gcm-cell-renderer-profile-icon.c b/src/gcm-cell-renderer-profile-icon.c
index 2dae625..80e21ea 100644
--- a/src/gcm-cell-renderer-profile-icon.c
+++ b/src/gcm-cell-renderer-profile-icon.c
@@ -58,7 +58,7 @@ gcm_cell_renderer_set_icon_name (GcmCellRendererProfileIcon *renderer)
 {
 	const gchar *icon_name = NULL;
 
-	if (gcm_profile_get_kind (renderer->profile) == GCM_PROFILE_KIND_DISPLAY_DEVICE &&
+	if (gcm_profile_get_kind (renderer->profile) == CD_PROFILE_KIND_DISPLAY_DEVICE &&
 	    !gcm_profile_get_has_vcgt (renderer->profile))
 		icon_name = "dialog-information";
 
diff --git a/src/gcm-client.c b/src/gcm-client.c
index 5310d50..ced2979 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -435,7 +435,7 @@ gcm_client_uevent_cb (GUdevClient *gudev_client, const gchar *action, GUdevDevic
 			/* set all scanners as disconnected */
 			for (i=0; i<priv->array->len; i++) {
 				device_tmp = g_ptr_array_index (priv->array, i);
-				if (gcm_device_get_kind (device_tmp) == GCM_DEVICE_KIND_SCANNER)
+				if (gcm_device_get_kind (device_tmp) == CD_DEVICE_KIND_SCANNER)
 					gcm_device_set_connected (device_tmp, FALSE);
 			}
 
@@ -767,7 +767,7 @@ gcm_client_add_unconnected_device (GcmClient *client, GKeyFile *keyfile, const g
 	gchar *kind_text = NULL;
 	gchar *colorspace_text = NULL;
 	GcmColorspace colorspace;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	GcmDevice *device = NULL;
 	gboolean ret;
 	gboolean virtual;
@@ -779,8 +779,8 @@ gcm_client_add_unconnected_device (GcmClient *client, GKeyFile *keyfile, const g
 		goto out;
 	virtual = g_key_file_get_boolean (keyfile, id, "virtual", NULL);
 	kind_text = g_key_file_get_string (keyfile, id, "type", NULL);
-	kind = gcm_device_kind_from_string (kind_text);
-	if (kind == GCM_DEVICE_KIND_UNKNOWN)
+	kind = cd_device_kind_from_string (kind_text);
+	if (kind == CD_DEVICE_KIND_UNKNOWN)
 		goto out;
 
 	/* get colorspace */
@@ -793,10 +793,10 @@ gcm_client_add_unconnected_device (GcmClient *client, GKeyFile *keyfile, const g
 	}
 
 	/* create device of specified type */
-	if (kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (kind == CD_DEVICE_KIND_DISPLAY) {
 		device = gcm_device_xrandr_new ();
 #ifdef HAVE_SANE
-	} else if (kind == GCM_DEVICE_KIND_SCANNER) {
+	} else if (kind == CD_DEVICE_KIND_SCANNER) {
 		device = gcm_device_sane_new ();
 #endif
 	} else {
diff --git a/src/gcm-device-sane.c b/src/gcm-device-sane.c
index 86466e1..09d88b5 100644
--- a/src/gcm-device-sane.c
+++ b/src/gcm-device-sane.c
@@ -77,7 +77,7 @@ gcm_device_sane_set_from_device (GcmDevice *device, const SANE_Device *sane_devi
 
 	/* set properties on device */
 	g_object_set (device,
-		      "kind", GCM_DEVICE_KIND_SCANNER,
+		      "kind", CD_DEVICE_KIND_SCANNER,
 		      "colorspace", GCM_COLORSPACE_RGB,
 		      "id", id,
 		      "connected", TRUE,
diff --git a/src/gcm-device-xrandr.c b/src/gcm-device-xrandr.c
index 07f3539..fd16edd 100644
--- a/src/gcm-device-xrandr.c
+++ b/src/gcm-device-xrandr.c
@@ -272,7 +272,7 @@ gcm_device_xrandr_set_from_output (GcmDevice *device, GcmX11Output *output, GErr
 	/* add new device */
 	title = gcm_device_xrandr_get_output_name (GCM_DEVICE_XRANDR(device), output);
 	g_object_set (device,
-		      "kind", GCM_DEVICE_KIND_DISPLAY,
+		      "kind", CD_DEVICE_KIND_DISPLAY,
 		      "colorspace", GCM_COLORSPACE_RGB,
 		      "id", id,
 		      "connected", TRUE,
@@ -404,7 +404,7 @@ gcm_device_xrandr_generate_profile (GcmDevice *device, GError **error)
 	profile = gcm_profile_new ();
 	gcm_profile_set_colorspace (profile, 0);
 	gcm_profile_set_copyright (profile, "No copyright");
-	gcm_profile_set_kind (profile, GCM_PROFILE_KIND_DISPLAY_DEVICE);
+	gcm_profile_set_kind (profile, CD_PROFILE_KIND_DISPLAY_DEVICE);
 
 	/* get manufacturer */
 	data = gcm_edid_get_vendor_name (priv->edid);
@@ -496,7 +496,7 @@ gcm_device_xrandr_reset (GcmDeviceXrandr *device_xrandr, GError **error)
 	const gchar *output_name;
 	gboolean ret = FALSE;
 	GcmClut *clut = NULL;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	GcmX11Output *output;
 	guint size;
 	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
@@ -504,7 +504,7 @@ gcm_device_xrandr_reset (GcmDeviceXrandr *device_xrandr, GError **error)
 	/* do no set the gamma for non-display types */
 	id = gcm_device_get_id (GCM_DEVICE (device_xrandr));
 	kind = gcm_device_get_kind (GCM_DEVICE (device_xrandr));
-	if (kind != GCM_DEVICE_KIND_DISPLAY) {
+	if (kind != CD_DEVICE_KIND_DISPLAY) {
 		g_set_error (error, 1, 0, "not a display: %s", id);
 		goto out;
 	}
@@ -562,14 +562,14 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
 	gboolean use_atom;
 	gboolean leftmost_screen = FALSE;
 	GFile *file = NULL;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	GcmDeviceXrandr *device_xrandr = GCM_DEVICE_XRANDR (device);
 	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
 
 	/* do no set the gamma for non-display types */
 	id = gcm_device_get_id (device);
 	kind = gcm_device_get_kind (device);
-	if (kind != GCM_DEVICE_KIND_DISPLAY) {
+	if (kind != CD_DEVICE_KIND_DISPLAY) {
 		g_set_error (error, 1, 0, "not a display: %s", id);
 		goto out;
 	}
diff --git a/src/gcm-device.c b/src/gcm-device.c
index cc2e585..122cc2d 100644
--- a/src/gcm-device.c
+++ b/src/gcm-device.c
@@ -52,7 +52,7 @@ struct _GcmDevicePrivate
 	gfloat			 gamma;
 	gfloat			 brightness;
 	gfloat			 contrast;
-	GcmDeviceKind		 kind;
+	CdDeviceKind		 kind;
 	gchar			*id;
 	gchar			*serial;
 	gchar			*manufacturer;
@@ -138,35 +138,35 @@ out:
 }
 
 /**
- * gcm_device_kind_from_string:
+ * cd_device_kind_from_string:
  **/
-GcmDeviceKind
-gcm_device_kind_from_string (const gchar *kind)
+CdDeviceKind
+cd_device_kind_from_string (const gchar *kind)
 {
 	if (g_strcmp0 (kind, "display") == 0)
-		return GCM_DEVICE_KIND_DISPLAY;
+		return CD_DEVICE_KIND_DISPLAY;
 	if (g_strcmp0 (kind, "scanner") == 0)
-		return GCM_DEVICE_KIND_SCANNER;
+		return CD_DEVICE_KIND_SCANNER;
 	if (g_strcmp0 (kind, "printer") == 0)
-		return GCM_DEVICE_KIND_PRINTER;
+		return CD_DEVICE_KIND_PRINTER;
 	if (g_strcmp0 (kind, "camera") == 0)
-		return GCM_DEVICE_KIND_CAMERA;
-	return GCM_DEVICE_KIND_UNKNOWN;
+		return CD_DEVICE_KIND_CAMERA;
+	return CD_DEVICE_KIND_UNKNOWN;
 }
 
 /**
- * gcm_device_kind_to_string:
+ * cd_device_kind_to_string:
  **/
 const gchar *
-gcm_device_kind_to_string (GcmDeviceKind kind)
+cd_device_kind_to_string (CdDeviceKind kind)
 {
-	if (kind == GCM_DEVICE_KIND_DISPLAY)
+	if (kind == CD_DEVICE_KIND_DISPLAY)
 		return "display";
-	if (kind == GCM_DEVICE_KIND_SCANNER)
+	if (kind == CD_DEVICE_KIND_SCANNER)
 		return "scanner";
-	if (kind == GCM_DEVICE_KIND_PRINTER)
+	if (kind == CD_DEVICE_KIND_PRINTER)
 		return "printer";
-	if (kind == GCM_DEVICE_KIND_CAMERA)
+	if (kind == CD_DEVICE_KIND_CAMERA)
 		return "camera";
 	return "unknown";
 }
@@ -203,10 +203,10 @@ out:
 /**
  * gcm_device_get_kind:
  **/
-GcmDeviceKind
+CdDeviceKind
 gcm_device_get_kind (GcmDevice *device)
 {
-	g_return_val_if_fail (GCM_IS_DEVICE (device), GCM_DEVICE_KIND_UNKNOWN);
+	g_return_val_if_fail (GCM_IS_DEVICE (device), CD_DEVICE_KIND_UNKNOWN);
 	return device->priv->kind;
 }
 
@@ -214,7 +214,7 @@ gcm_device_get_kind (GcmDevice *device)
  * gcm_device_set_kind:
  **/
 void
-gcm_device_set_kind (GcmDevice *device, GcmDeviceKind kind)
+gcm_device_set_kind (GcmDevice *device, CdDeviceKind kind)
 {
 	g_return_if_fail (GCM_IS_DEVICE (device));
 	if (device->priv->kind != kind) {
@@ -850,7 +850,7 @@ gcm_device_load (GcmDevice *device, GError **error)
 	if (error_local != NULL) {
 		/* if the key does not exist, and this is a display,
 		 * then enable it by default */
-		if (gcm_device_get_kind (device) == GCM_DEVICE_KIND_DISPLAY)
+		if (gcm_device_get_kind (device) == CD_DEVICE_KIND_DISPLAY)
 			priv->use_edid_profile = TRUE;
 		g_clear_error (&error_local);
 	}
@@ -1006,7 +1006,7 @@ gcm_device_save (GcmDevice *device, GError **error)
 	/* save other properties we'll need if we add this device offline */
 	if (priv->title != NULL)
 		g_key_file_set_string (keyfile, priv->id, "title", priv->title);
-	g_key_file_set_string (keyfile, priv->id, "type", gcm_device_kind_to_string (priv->kind));
+	g_key_file_set_string (keyfile, priv->id, "type", cd_device_kind_to_string (priv->kind));
 
 	/* add colorspace */
 	g_key_file_set_string (keyfile, priv->id, "colorspace", gcm_colorspace_to_string (priv->colorspace));
@@ -1016,7 +1016,7 @@ gcm_device_save (GcmDevice *device, GError **error)
 		g_key_file_set_boolean (keyfile, priv->id, "virtual", TRUE);
 
 	/* add use_edid_profile */
-	if (priv->kind == GCM_DEVICE_KIND_DISPLAY)
+	if (priv->kind == CD_DEVICE_KIND_DISPLAY)
 		g_key_file_set_boolean (keyfile, priv->id, "use-edid-profile", priv->use_edid_profile);
 
 	/* get extra, device specific config data */
diff --git a/src/gcm-device.h b/src/gcm-device.h
index 3b5c617..8ede217 100644
--- a/src/gcm-device.h
+++ b/src/gcm-device.h
@@ -78,9 +78,9 @@ GcmProfile		*gcm_device_generate_profile		(GcmDevice	*device,
 								 GError		**error);
 
 /* accessors */
-GcmDeviceKind		 gcm_device_get_kind			(GcmDevice	*device);
+CdDeviceKind		 gcm_device_get_kind			(GcmDevice	*device);
 void			 gcm_device_set_kind			(GcmDevice	*device,
-								 GcmDeviceKind kind);
+								 CdDeviceKind kind);
 gboolean		 gcm_device_get_connected		(GcmDevice	*device);
 void			 gcm_device_set_connected		(GcmDevice	*device,
 								 gboolean	 connected);
diff --git a/src/gcm-enum.c b/src/gcm-enum.c
index 5d485c2..a3e0566 100644
--- a/src/gcm-enum.c
+++ b/src/gcm-enum.c
@@ -65,52 +65,6 @@ gcm_intent_from_string (const gchar *intent)
 }
 
 /**
- * gcm_intent_from_string:
- **/
-GcmProfileKind
-gcm_profile_kind_from_string (const gchar *profile_kind)
-{
-	if (g_strcmp0 (profile_kind, "input-device") == 0)
-		return GCM_PROFILE_KIND_INPUT_DEVICE;
-	if (g_strcmp0 (profile_kind, "display-device") == 0)
-		return GCM_PROFILE_KIND_DISPLAY_DEVICE;
-	if (g_strcmp0 (profile_kind, "output-device") == 0)
-		return GCM_PROFILE_KIND_OUTPUT_DEVICE;
-	if (g_strcmp0 (profile_kind, "devicelink") == 0)
-		return GCM_PROFILE_KIND_DEVICELINK;
-	if (g_strcmp0 (profile_kind, "colorspace-conversion") == 0)
-		return GCM_PROFILE_KIND_COLORSPACE_CONVERSION;
-	if (g_strcmp0 (profile_kind, "abstract") == 0)
-		return GCM_PROFILE_KIND_ABSTRACT;
-	if (g_strcmp0 (profile_kind, "named-color") == 0)
-		return GCM_PROFILE_KIND_NAMED_COLOR;
-	return GCM_PROFILE_KIND_UNKNOWN;
-}
-
-/**
- * gcm_profile_kind_to_string:
- **/
-const gchar *
-gcm_profile_kind_to_string (GcmProfileKind kind)
-{
-	if (kind == GCM_PROFILE_KIND_INPUT_DEVICE)
-		return "input-device";
-	if (kind == GCM_PROFILE_KIND_DISPLAY_DEVICE)
-		return "display-device";
-	if (kind == GCM_PROFILE_KIND_OUTPUT_DEVICE)
-		return "output-device";
-	if (kind == GCM_PROFILE_KIND_DEVICELINK)
-		return "devicelink";
-	if (kind == GCM_PROFILE_KIND_COLORSPACE_CONVERSION)
-		return "colorspace-conversion";
-	if (kind == GCM_PROFILE_KIND_ABSTRACT)
-		return "abstract";
-	if (kind == GCM_PROFILE_KIND_NAMED_COLOR)
-		return "named-color";
-	return "unknown";
-}
-
-/**
  * gcm_colorspace_to_string:
  **/
 const gchar *
diff --git a/src/gcm-enum.h b/src/gcm-enum.h
index 920abc6..88058bb 100644
--- a/src/gcm-enum.h
+++ b/src/gcm-enum.h
@@ -34,18 +34,6 @@ typedef enum {
 } GcmIntent;
 
 typedef enum {
-	GCM_PROFILE_KIND_UNKNOWN,
-	GCM_PROFILE_KIND_INPUT_DEVICE,
-	GCM_PROFILE_KIND_DISPLAY_DEVICE,
-	GCM_PROFILE_KIND_OUTPUT_DEVICE,
-	GCM_PROFILE_KIND_DEVICELINK,
-	GCM_PROFILE_KIND_COLORSPACE_CONVERSION,
-	GCM_PROFILE_KIND_ABSTRACT,
-	GCM_PROFILE_KIND_NAMED_COLOR,
-	GCM_PROFILE_KIND_LAST
-} GcmProfileKind;
-
-typedef enum {
 	GCM_COLORSPACE_UNKNOWN,
 	GCM_COLORSPACE_XYZ,
 	GCM_COLORSPACE_LAB,
@@ -60,23 +48,10 @@ typedef enum {
 	GCM_COLORSPACE_LAST
 } GcmColorspace;
 
-typedef enum {
-	GCM_DEVICE_KIND_UNKNOWN,
-	GCM_DEVICE_KIND_DISPLAY,
-	GCM_DEVICE_KIND_SCANNER,
-	GCM_DEVICE_KIND_PRINTER,
-	GCM_DEVICE_KIND_CAMERA,
-	GCM_DEVICE_KIND_LAST
-} GcmDeviceKind;
-
 GcmIntent	 gcm_intent_from_string			(const gchar		*intent);
 const gchar	*gcm_intent_to_string			(GcmIntent		 intent);
-GcmProfileKind	 gcm_profile_kind_from_string		(const gchar		*profile_kind);
-const gchar	*gcm_profile_kind_to_string		(GcmProfileKind		 profile_kind);
 const gchar	*gcm_colorspace_to_string		(GcmColorspace		 colorspace);
 GcmColorspace	 gcm_colorspace_from_string		(const gchar		*colorspace);
-GcmDeviceKind	 gcm_device_kind_from_string		(const gchar		*kind);
-const gchar	*gcm_device_kind_to_string		(GcmDeviceKind		 kind);
 
 #endif /* __GCM_ENUM_H */
 
diff --git a/src/gcm-exif.c b/src/gcm-exif.c
index 1fe862e..00e344d 100644
--- a/src/gcm-exif.c
+++ b/src/gcm-exif.c
@@ -49,7 +49,7 @@ struct _GcmExifPrivate
 	gchar				*manufacturer;
 	gchar				*model;
 	gchar				*serial;
-	GcmDeviceKind			 device_kind;
+	CdDeviceKind			 device_kind;
 };
 
 enum {
@@ -74,7 +74,7 @@ gcm_exif_parse_tiff (GcmExif *exif, const gchar *filename, GError **error)
 	const gchar *model = NULL;
 	const gchar *serial = NULL;
 	const gchar *temp = NULL;
-	GcmDeviceKind device_kind = GCM_DEVICE_KIND_UNKNOWN;
+	CdDeviceKind device_kind = CD_DEVICE_KIND_UNKNOWN;
 	TIFF *tiff;
 	GcmExifPrivate *priv = exif->priv;
 
@@ -97,14 +97,14 @@ gcm_exif_parse_tiff (GcmExif *exif, const gchar *filename, GError **error)
 	/* these are all camera specific values */
 	TIFFGetField (tiff,EXIFTAG_FNUMBER, &temp);
 	if (temp != NULL)
-		device_kind = GCM_DEVICE_KIND_CAMERA;
+		device_kind = CD_DEVICE_KIND_CAMERA;
 	TIFFGetField (tiff,TIFFTAG_LENSINFO, &temp);
 	if (temp != NULL)
-		device_kind = GCM_DEVICE_KIND_CAMERA;
+		device_kind = CD_DEVICE_KIND_CAMERA;
 
 	/* crappy fallback */
 	if (g_str_has_prefix (manufacturer, "NIKON"))
-		device_kind = GCM_DEVICE_KIND_CAMERA;
+		device_kind = CD_DEVICE_KIND_CAMERA;
 
 	/* free old versions */
 	g_free (priv->manufacturer);
@@ -131,7 +131,7 @@ gcm_exif_parse_jpeg (GcmExif *exif, const gchar *filename, GError **error)
 	GcmExifPrivate *priv = exif->priv;
 	ExifData *ed = NULL;
 	ExifEntry *entry;
-	GcmDeviceKind device_kind = GCM_DEVICE_KIND_UNKNOWN;
+	CdDeviceKind device_kind = CD_DEVICE_KIND_UNKNOWN;
 	gchar make[1024] = { '\0' };
 	gchar model[1024] = { '\0' };
 
@@ -163,13 +163,13 @@ gcm_exif_parse_jpeg (GcmExif *exif, const gchar *filename, GError **error)
 	/* these are all camera specific values */
 	entry = exif_content_get_entry (ed->ifd[EXIF_IFD_EXIF], EXIF_TAG_FNUMBER);
 	if (entry != NULL)
-		device_kind = GCM_DEVICE_KIND_CAMERA;
+		device_kind = CD_DEVICE_KIND_CAMERA;
 	entry = exif_content_get_entry (ed->ifd[EXIF_IFD_EXIF], EXIF_TAG_SHUTTER_SPEED_VALUE);
 	if (entry != NULL)
-		device_kind = GCM_DEVICE_KIND_CAMERA;
+		device_kind = CD_DEVICE_KIND_CAMERA;
 	entry = exif_content_get_entry (ed->ifd[EXIF_IFD_EXIF], EXIF_TAG_FLASH);
 	if (entry != NULL)
-		device_kind = GCM_DEVICE_KIND_CAMERA;
+		device_kind = CD_DEVICE_KIND_CAMERA;
 
 	/* we failed to get data */
 	if (make == NULL || model == NULL) {
@@ -251,7 +251,7 @@ gcm_exif_parse_exiv (GcmExif *exif, const gchar *filename, GError **error)
 		priv->serial = g_strdup (split[2]);
 	else
 		priv->serial = NULL;
-	priv->device_kind = GCM_DEVICE_KIND_CAMERA;
+	priv->device_kind = CD_DEVICE_KIND_CAMERA;
 
 out:
 	g_free (standard_output);
@@ -358,10 +358,10 @@ gcm_exif_get_serial (GcmExif *exif)
 /**
  * gcm_exif_get_device_kind:
  **/
-GcmDeviceKind
+CdDeviceKind
 gcm_exif_get_device_kind (GcmExif *exif)
 {
-	g_return_val_if_fail (GCM_IS_EXIF (exif), GCM_DEVICE_KIND_UNKNOWN);
+	g_return_val_if_fail (GCM_IS_EXIF (exif), CD_DEVICE_KIND_UNKNOWN);
 	return exif->priv->device_kind;
 }
 
@@ -432,7 +432,7 @@ gcm_exif_class_init (GcmExifClass *klass)
 	 * GcmExif:device-kind:
 	 */
 	pspec = g_param_spec_uint ("device-kind", NULL, NULL,
-				   0, G_MAXUINT, GCM_DEVICE_KIND_UNKNOWN,
+				   0, G_MAXUINT, CD_DEVICE_KIND_UNKNOWN,
 				   G_PARAM_READABLE);
 	g_object_class_install_property (object_class, PROP_DEVICE_KIND, pspec);
 
@@ -449,7 +449,7 @@ gcm_exif_init (GcmExif *exif)
 	exif->priv->manufacturer = NULL;
 	exif->priv->model = NULL;
 	exif->priv->serial = NULL;
-	exif->priv->device_kind = GCM_DEVICE_KIND_CAMERA;
+	exif->priv->device_kind = CD_DEVICE_KIND_CAMERA;
 }
 
 /**
diff --git a/src/gcm-exif.h b/src/gcm-exif.h
index fbd0e8b..c12bc48 100644
--- a/src/gcm-exif.h
+++ b/src/gcm-exif.h
@@ -24,6 +24,7 @@
 
 #include <glib-object.h>
 #include <gio/gio.h>
+#include <colord.h>
 
 #include "gcm-enum.h"
 
@@ -67,7 +68,7 @@ GcmExif		*gcm_exif_new				(void);
 const gchar	*gcm_exif_get_manufacturer		(GcmExif	*exif);
 const gchar	*gcm_exif_get_model			(GcmExif	*exif);
 const gchar	*gcm_exif_get_serial			(GcmExif	*exif);
-GcmDeviceKind	 gcm_exif_get_device_kind		(GcmExif	*exif);
+CdDeviceKind	 gcm_exif_get_device_kind		(GcmExif	*exif);
 gboolean	 gcm_exif_parse				(GcmExif	*exif,
 							 GFile		*file,
 							 GError		**error);
diff --git a/src/gcm-inspect.c b/src/gcm-inspect.c
index b9250c7..64ba0e6 100644
--- a/src/gcm-inspect.c
+++ b/src/gcm-inspect.c
@@ -615,14 +615,14 @@ main (int argc, char **argv)
 	if (xid != 0)
 		gcm_inspect_show_profile_for_window (xid);
 	if (type != NULL) {
-		if (gcm_device_kind_from_string (type) == GCM_DEVICE_KIND_UNKNOWN &&
-		    gcm_profile_kind_from_string (type) == GCM_PROFILE_KIND_UNKNOWN) {
+		if (cd_device_kind_from_string (type) == CD_DEVICE_KIND_UNKNOWN &&
+		    cd_profile_kind_from_string (type) == CD_PROFILE_KIND_UNKNOWN) {
 			/* TRANSLATORS: this is when the user does --type=mickeymouse */
 			g_print ("%s\n", _("Device or profile type not recognized, recognised types are:"));
-			for (i=1; i<GCM_DEVICE_KIND_LAST; i++)
-				g_print (" - %s\n", gcm_device_kind_to_string (i));
-			for (i=1; i<GCM_PROFILE_KIND_LAST; i++)
-				g_print (" - %s\n", gcm_profile_kind_to_string (i));
+			for (i=1; i<CD_DEVICE_KIND_LAST; i++)
+				g_print (" - %s\n", cd_device_kind_to_string (i));
+			for (i=1; i<CD_PROFILE_KIND_LAST; i++)
+				g_print (" - %s\n", cd_profile_kind_to_string (i));
 		} else {
 			/* show device profiles */
 			gcm_inspect_show_profiles_for_type (type);
diff --git a/src/gcm-list-store-profiles.c b/src/gcm-list-store-profiles.c
index ef25251..84fafea 100644
--- a/src/gcm-list-store-profiles.c
+++ b/src/gcm-list-store-profiles.c
@@ -45,7 +45,7 @@ cc_color_panel_profile_get_tooltip (GcmProfile *profile)
 	const gchar *tooltip = NULL;
 
 	/* VCGT warning */
-	if (gcm_profile_get_kind (profile) == GCM_PROFILE_KIND_DISPLAY_DEVICE &&
+	if (gcm_profile_get_kind (profile) == CD_PROFILE_KIND_DISPLAY_DEVICE &&
 	    !gcm_profile_get_has_vcgt (profile)) {
 		/* TRANSLATORS: this is displayed when the profile is crap */
 		tooltip = _("This profile does not have the information required for whole-screen color correction.");
diff --git a/src/gcm-profile.c b/src/gcm-profile.c
index 5b4f3cd..a4e79ab 100644
--- a/src/gcm-profile.c
+++ b/src/gcm-profile.c
@@ -33,6 +33,7 @@
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 #include <lcms2.h>
+#include <colord.h>
 
 #include "gcm-profile.h"
 #include "gcm-color.h"
@@ -49,7 +50,7 @@ static void     gcm_profile_finalize	(GObject     *object);
 struct _GcmProfilePrivate
 {
 	gboolean		 loaded;
-	GcmProfileKind		 kind;
+	CdProfileKind		 kind;
 	GcmColorspace		 colorspace;
 	guint			 size;
 	gboolean		 has_vcgt;
@@ -531,10 +532,10 @@ gcm_profile_set_size (GcmProfile *profile, guint size)
 /**
  * gcm_profile_get_kind:
  **/
-GcmProfileKind
+CdProfileKind
 gcm_profile_get_kind (GcmProfile *profile)
 {
-	g_return_val_if_fail (GCM_IS_PROFILE (profile), GCM_PROFILE_KIND_UNKNOWN);
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), CD_PROFILE_KIND_UNKNOWN);
 	return profile->priv->kind;
 }
 
@@ -542,7 +543,7 @@ gcm_profile_get_kind (GcmProfile *profile)
  * gcm_profile_set_kind:
  **/
 void
-gcm_profile_set_kind (GcmProfile *profile, GcmProfileKind kind)
+gcm_profile_set_kind (GcmProfile *profile, CdProfileKind kind)
 {
 	g_return_if_fail (GCM_IS_PROFILE (profile));
 	profile->priv->kind = kind;
@@ -645,7 +646,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 	cmsProfileClassSignature profile_class;
 	cmsColorSpaceSignature color_space;
 	GcmColorspace colorspace;
-	GcmProfileKind profile_kind;
+	CdProfileKind profile_kind;
 	cmsCIEXYZ *cie_xyz;
 	cmsCIEXYZTRIPLE cie_illum;
 	struct tm created;
@@ -719,28 +720,28 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 	profile_class = cmsGetDeviceClass (priv->lcms_profile);
 	switch (profile_class) {
 	case cmsSigInputClass:
-		profile_kind = GCM_PROFILE_KIND_INPUT_DEVICE;
+		profile_kind = CD_PROFILE_KIND_INPUT_DEVICE;
 		break;
 	case cmsSigDisplayClass:
-		profile_kind = GCM_PROFILE_KIND_DISPLAY_DEVICE;
+		profile_kind = CD_PROFILE_KIND_DISPLAY_DEVICE;
 		break;
 	case cmsSigOutputClass:
-		profile_kind = GCM_PROFILE_KIND_OUTPUT_DEVICE;
+		profile_kind = CD_PROFILE_KIND_OUTPUT_DEVICE;
 		break;
 	case cmsSigLinkClass:
-		profile_kind = GCM_PROFILE_KIND_DEVICELINK;
+		profile_kind = CD_PROFILE_KIND_DEVICELINK;
 		break;
 	case cmsSigColorSpaceClass:
-		profile_kind = GCM_PROFILE_KIND_COLORSPACE_CONVERSION;
+		profile_kind = CD_PROFILE_KIND_COLORSPACE_CONVERSION;
 		break;
 	case cmsSigAbstractClass:
-		profile_kind = GCM_PROFILE_KIND_ABSTRACT;
+		profile_kind = CD_PROFILE_KIND_ABSTRACT;
 		break;
 	case cmsSigNamedColorClass:
-		profile_kind = GCM_PROFILE_KIND_NAMED_COLOR;
+		profile_kind = CD_PROFILE_KIND_NAMED_COLOR;
 		break;
 	default:
-		profile_kind = GCM_PROFILE_KIND_UNKNOWN;
+		profile_kind = CD_PROFILE_KIND_UNKNOWN;
 	}
 	gcm_profile_set_kind (profile, profile_kind);
 
@@ -1075,7 +1076,7 @@ gcm_profile_save (GcmProfile *profile, const gchar *filename, GError **error)
 		cmsSetColorSpace (priv->lcms_profile, cmsSigRgbData);
 		cmsSetPCS (priv->lcms_profile, cmsSigLabData);
 	}
-	if (priv->kind == GCM_PROFILE_KIND_DISPLAY_DEVICE)
+	if (priv->kind == CD_PROFILE_KIND_DISPLAY_DEVICE)
 		cmsSetDeviceClass (priv->lcms_profile, cmsSigDisplayClass);
 
 	/* write text data */
@@ -1851,7 +1852,7 @@ gcm_profile_init (GcmProfile *profile)
 	profile->priv->can_delete = FALSE;
 	profile->priv->monitor = NULL;
 	profile->priv->dict = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
-	profile->priv->kind = GCM_PROFILE_KIND_UNKNOWN;
+	profile->priv->kind = CD_PROFILE_KIND_UNKNOWN;
 	profile->priv->colorspace = GCM_COLORSPACE_UNKNOWN;
 	profile->priv->white = gcm_color_new_XYZ ();
 	profile->priv->black = gcm_color_new_XYZ ();
diff --git a/src/gcm-profile.h b/src/gcm-profile.h
index 6818252..f07561b 100644
--- a/src/gcm-profile.h
+++ b/src/gcm-profile.h
@@ -24,6 +24,7 @@
 
 #include <glib-object.h>
 #include <gio/gio.h>
+#include <colord.h>
 
 #include "gcm-clut.h"
 #include "gcm-enum.h"
@@ -122,9 +123,9 @@ const gchar	*gcm_profile_get_datetime		(GcmProfile	*profile);
 void		 gcm_profile_set_datetime		(GcmProfile	*profile,
 							 const gchar 	*datetime);
 guint		 gcm_profile_get_size			(GcmProfile	*profile);
-GcmProfileKind	 gcm_profile_get_kind			(GcmProfile	*profile);
+CdProfileKind	 gcm_profile_get_kind			(GcmProfile	*profile);
 void		 gcm_profile_set_kind			(GcmProfile	*profile,
-							 GcmProfileKind	 kind);
+							 CdProfileKind	 kind);
 GcmColorspace	 gcm_profile_get_colorspace		(GcmProfile	*profile);
 void		 gcm_profile_set_colorspace		(GcmProfile	*profile,
 							 GcmColorspace	 colorspace);
diff --git a/src/gcm-self-test.c b/src/gcm-self-test.c
index f1ad300..26fd671 100644
--- a/src/gcm-self-test.c
+++ b/src/gcm-self-test.c
@@ -421,7 +421,7 @@ gcm_test_profile_func (void)
 	g_assert_cmpstr (gcm_profile_get_datetime (profile), ==, "February  9 1998, 06:49:00 AM");
 	g_assert_cmpstr (gcm_profile_get_description (profile), ==, "Blueish Test");
 	g_assert_cmpstr (gcm_profile_get_checksum (profile), ==, "8e2aed5dac6f8b5d8da75610a65b7f27");
-	g_assert_cmpint (gcm_profile_get_kind (profile), ==, GCM_PROFILE_KIND_DISPLAY_DEVICE);
+	g_assert_cmpint (gcm_profile_get_kind (profile), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
 	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, GCM_COLORSPACE_RGB);
 	g_assert_cmpint (gcm_profile_get_temperature (profile), ==, 6500);
 	g_assert (gcm_profile_get_has_vcgt (profile));
@@ -452,7 +452,7 @@ gcm_test_profile_func (void)
 	g_assert_cmpstr (gcm_profile_get_datetime (profile), ==, "August 16 2005, 09:49:54 PM");
 	g_assert_cmpstr (gcm_profile_get_description (profile), ==, "ADOBEGAMMA-Test");
 	g_assert_cmpstr (gcm_profile_get_checksum (profile), ==, "bd847723f676e2b846daaf6759330624");
-	g_assert_cmpint (gcm_profile_get_kind (profile), ==, GCM_PROFILE_KIND_DISPLAY_DEVICE);
+	g_assert_cmpint (gcm_profile_get_kind (profile), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
 	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, GCM_COLORSPACE_RGB);
 	g_assert_cmpint (gcm_profile_get_temperature (profile), ==, 6500);
 	g_assert (gcm_profile_get_has_vcgt (profile));
@@ -495,7 +495,7 @@ gcm_test_profile_func (void)
 	g_assert_cmpstr (gcm_profile_get_manufacturer (profile), ==, NULL);
 	g_assert_cmpstr (gcm_profile_get_model (profile), ==, NULL);
 	g_assert_cmpstr (gcm_profile_get_description (profile), ==, "RGB built-in");
-	g_assert_cmpint (gcm_profile_get_kind (profile), ==, GCM_PROFILE_KIND_DISPLAY_DEVICE);
+	g_assert_cmpint (gcm_profile_get_kind (profile), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
 	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, GCM_COLORSPACE_RGB);
 	g_assert_cmpint (gcm_profile_get_temperature (profile), ==, 5000);
 	g_assert (gcm_profile_get_has_vcgt (profile));
@@ -1155,15 +1155,15 @@ gcm_test_device_func (void)
 
 	g_assert_cmpint (_changes, ==, 0);
 
-	g_assert (gcm_device_kind_from_string ("scanner") == GCM_DEVICE_KIND_SCANNER);
-	g_assert (gcm_device_kind_from_string ("xxx") == GCM_DEVICE_KIND_UNKNOWN);
+	g_assert (cd_device_kind_from_string ("scanner") == CD_DEVICE_KIND_SCANNER);
+	g_assert (cd_device_kind_from_string ("xxx") == CD_DEVICE_KIND_UNKNOWN);
 
-	g_assert_cmpstr (gcm_device_kind_to_string (GCM_DEVICE_KIND_SCANNER), ==, "scanner");
-	g_assert_cmpstr (gcm_device_kind_to_string (GCM_DEVICE_KIND_UNKNOWN), ==, "unknown");
+	g_assert_cmpstr (cd_device_kind_to_string (CD_DEVICE_KIND_SCANNER), ==, "scanner");
+	g_assert_cmpstr (cd_device_kind_to_string (CD_DEVICE_KIND_UNKNOWN), ==, "unknown");
 
 	/* set some properties */
 	g_object_set (device,
-		      "kind", GCM_DEVICE_KIND_SCANNER,
+		      "kind", CD_DEVICE_KIND_SCANNER,
 		      "id", "sysfs_dummy_device",
 		      "connected", FALSE,
 		      "virtual", FALSE,
@@ -1317,7 +1317,7 @@ gcm_test_exif_func (void)
 	g_assert_cmpstr (gcm_exif_get_model (exif), ==, "NIKON D60");
 	g_assert_cmpstr (gcm_exif_get_manufacturer (exif), ==, "NIKON CORPORATION");
 	g_assert_cmpstr (gcm_exif_get_serial (exif), ==, NULL);
-	g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, GCM_DEVICE_KIND_CAMERA);
+	g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, CD_DEVICE_KIND_CAMERA);
 
 	/* JPG */
 	file = g_file_new_for_path (TESTDATADIR "/test.jpg");
@@ -1328,7 +1328,7 @@ gcm_test_exif_func (void)
 	g_assert_cmpstr (gcm_exif_get_model (exif), ==, "NIKON D60");
 	g_assert_cmpstr (gcm_exif_get_manufacturer (exif), ==, "NIKON CORPORATION");
 	g_assert_cmpstr (gcm_exif_get_serial (exif), ==, NULL);
-	g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, GCM_DEVICE_KIND_CAMERA);
+	g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, CD_DEVICE_KIND_CAMERA);
 
 	/* RAW */
 	file = g_file_new_for_path (TESTDATADIR "/test.kdc");
@@ -1339,7 +1339,7 @@ gcm_test_exif_func (void)
 	g_assert_cmpstr (gcm_exif_get_model (exif), ==, "Eastman Kodak Company");
 	g_assert_cmpstr (gcm_exif_get_manufacturer (exif), ==, "Kodak Digital Science DC50 Zoom Camera");
 	g_assert_cmpstr (gcm_exif_get_serial (exif), ==, NULL);
-	g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, GCM_DEVICE_KIND_CAMERA);
+	g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, CD_DEVICE_KIND_CAMERA);
 
 	/* PNG */
 	file = g_file_new_for_path (TESTDATADIR "/test.png");
@@ -1516,8 +1516,8 @@ gcm_test_utils_func (void)
 	g_assert_cmpstr (filename, ==, "/tmp/device-profiles.conf");
 	g_free (filename);
 
-	g_assert (gcm_utils_device_kind_to_profile_kind (GCM_DEVICE_KIND_SCANNER) == GCM_PROFILE_KIND_INPUT_DEVICE);
-	g_assert (gcm_utils_device_kind_to_profile_kind (GCM_DEVICE_KIND_UNKNOWN) == GCM_PROFILE_KIND_UNKNOWN);
+	g_assert (gcm_utils_device_kind_to_profile_kind (CD_DEVICE_KIND_SCANNER) == CD_PROFILE_KIND_INPUT_DEVICE);
+	g_assert (gcm_utils_device_kind_to_profile_kind (CD_DEVICE_KIND_UNKNOWN) == CD_PROFILE_KIND_UNKNOWN);
 }
 
 static void
diff --git a/src/gcm-session.c b/src/gcm-session.c
index d9a9c48..2b0a8e8 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -72,7 +72,7 @@ gcm_session_notify_cb (NotifyNotification *notification, gchar *action, gpointer
  * gcm_session_notify_recalibrate:
  **/
 static gboolean
-gcm_session_notify_recalibrate (const gchar *title, const gchar *message, GcmDeviceKind kind)
+gcm_session_notify_recalibrate (const gchar *title, const gchar *message, CdDeviceKind kind)
 {
 	gboolean ret;
 	GError *error = NULL;
@@ -87,7 +87,7 @@ gcm_session_notify_recalibrate (const gchar *title, const gchar *message, GcmDev
 	notify_notification_add_action (notification, "recalibrate", _("Recalibrate now"), gcm_session_notify_cb, NULL, NULL);
 
 	/* TRANSLATORS: button: this is to ignore the recalibrate notifications */
-	notify_notification_add_action (notification, gcm_device_kind_to_string (kind), _("Ignore"), gcm_session_notify_cb, NULL, NULL);
+	notify_notification_add_action (notification, cd_device_kind_to_string (kind), _("Ignore"), gcm_session_notify_cb, NULL, NULL);
 
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
@@ -105,7 +105,7 @@ gcm_session_notify_device (GcmDevice *device)
 {
 	gchar *message;
 	const gchar *title;
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	glong since;
 	GTimeVal timeval;
 	gint threshold;
@@ -118,7 +118,7 @@ gcm_session_notify_device (GcmDevice *device)
 
 	/* check we care */
 	kind = gcm_device_get_kind (device);
-	if (kind == GCM_DEVICE_KIND_DISPLAY) {
+	if (kind == CD_DEVICE_KIND_DISPLAY) {
 
 		/* get from GSettings */
 		threshold = g_settings_get_int (settings, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD);
@@ -147,15 +147,15 @@ gcm_session_notify_device (GcmDevice *device)
 static void
 gcm_session_added_cb (GcmClient *client_, GcmDevice *device, gpointer user_data)
 {
-	GcmDeviceKind kind;
+	CdDeviceKind kind;
 	const gchar *profile;
 	gchar *basename = NULL;
 	gboolean allow_notifications;
 
 	/* check we care */
 	kind = gcm_device_get_kind (device);
-	if (kind != GCM_DEVICE_KIND_DISPLAY &&
-	    kind != GCM_DEVICE_KIND_PRINTER)
+	if (kind != CD_DEVICE_KIND_DISPLAY &&
+	    kind != CD_DEVICE_KIND_PRINTER)
 		return;
 
 	/* ensure we have a profile */
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index e6fa208..1541ebf 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -462,23 +462,23 @@ out:
 /**
  * gcm_utils_device_kind_to_profile_kind:
  **/
-GcmProfileKind
-gcm_utils_device_kind_to_profile_kind (GcmDeviceKind kind)
+CdProfileKind
+gcm_utils_device_kind_to_profile_kind (CdDeviceKind kind)
 {
-	GcmProfileKind profile_kind;
+	CdProfileKind profile_kind;
 	switch (kind) {
-	case GCM_DEVICE_KIND_DISPLAY:
-		profile_kind = GCM_PROFILE_KIND_DISPLAY_DEVICE;
+	case CD_DEVICE_KIND_DISPLAY:
+		profile_kind = CD_PROFILE_KIND_DISPLAY_DEVICE;
 		break;
-	case GCM_DEVICE_KIND_CAMERA:
-	case GCM_DEVICE_KIND_SCANNER:
-		profile_kind = GCM_PROFILE_KIND_INPUT_DEVICE;
+	case CD_DEVICE_KIND_CAMERA:
+	case CD_DEVICE_KIND_SCANNER:
+		profile_kind = CD_PROFILE_KIND_INPUT_DEVICE;
 		break;
-	case GCM_DEVICE_KIND_PRINTER:
-		profile_kind = GCM_PROFILE_KIND_OUTPUT_DEVICE;
+	case CD_DEVICE_KIND_PRINTER:
+		profile_kind = CD_PROFILE_KIND_OUTPUT_DEVICE;
 		break;
 	default:
-		profile_kind = GCM_PROFILE_KIND_UNKNOWN;
+		profile_kind = CD_PROFILE_KIND_UNKNOWN;
 	}
 	return profile_kind;
 }
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index 672f2d0..acd5aba 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -74,7 +74,7 @@ gboolean	 gcm_utils_output_is_lcd		(const gchar		*output_name);
 void		 gcm_utils_alphanum_lcase		(gchar			*string);
 void		 gcm_utils_ensure_sensible_filename	(gchar			*string);
 gchar		*gcm_utils_get_default_config_location	(void);
-GcmProfileKind	 gcm_utils_device_kind_to_profile_kind	(GcmDeviceKind		 kind);
+CdProfileKind	 gcm_utils_device_kind_to_profile_kind	(CdDeviceKind		 kind);
 gboolean	 gcm_utils_install_package		(const gchar		*package_name,
 							 GtkWindow		*window);
 gboolean	 gcm_utils_is_icc_profile		(GFile			*file);
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index 487f334..7aac12e 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -185,17 +185,17 @@ gcm_viewer_delete_event_cb (GtkWidget *widget, GdkEvent *event, GcmViewerPrivate
  * gcm_viewer_profile_kind_to_icon_name:
  **/
 static const gchar *
-gcm_viewer_profile_kind_to_icon_name (GcmProfileKind kind)
+gcm_viewer_profile_kind_to_icon_name (CdProfileKind kind)
 {
-	if (kind == GCM_PROFILE_KIND_DISPLAY_DEVICE)
+	if (kind == CD_PROFILE_KIND_DISPLAY_DEVICE)
 		return "video-display";
-	if (kind == GCM_PROFILE_KIND_INPUT_DEVICE)
+	if (kind == CD_PROFILE_KIND_INPUT_DEVICE)
 		return "scanner";
-	if (kind == GCM_PROFILE_KIND_OUTPUT_DEVICE)
+	if (kind == CD_PROFILE_KIND_OUTPUT_DEVICE)
 		return "printer";
-	if (kind == GCM_PROFILE_KIND_COLORSPACE_CONVERSION)
+	if (kind == CD_PROFILE_KIND_COLORSPACE_CONVERSION)
 		return "view-refresh";
-	if (kind == GCM_PROFILE_KIND_ABSTRACT)
+	if (kind == CD_PROFILE_KIND_ABSTRACT)
 		return "insert-link";
 	return "image-missing";
 }
@@ -204,13 +204,13 @@ gcm_viewer_profile_kind_to_icon_name (GcmProfileKind kind)
  * gcm_viewer_profile_get_sort_string:
  **/
 static const gchar *
-gcm_viewer_profile_get_sort_string (GcmProfileKind kind)
+gcm_viewer_profile_get_sort_string (CdProfileKind kind)
 {
-	if (kind == GCM_PROFILE_KIND_DISPLAY_DEVICE)
+	if (kind == CD_PROFILE_KIND_DISPLAY_DEVICE)
 		return "1";
-	if (kind == GCM_PROFILE_KIND_INPUT_DEVICE)
+	if (kind == CD_PROFILE_KIND_INPUT_DEVICE)
 		return "2";
-	if (kind == GCM_PROFILE_KIND_OUTPUT_DEVICE)
+	if (kind == CD_PROFILE_KIND_OUTPUT_DEVICE)
 		return "3";
 	return "4";
 }
@@ -224,7 +224,7 @@ gcm_viewer_update_profile_list (GcmViewerPrivate *viewer)
 	GtkTreeIter iter;
 	const gchar *description;
 	const gchar *icon_name;
-	GcmProfileKind profile_kind = GCM_PROFILE_KIND_UNKNOWN;
+	CdProfileKind profile_kind = CD_PROFILE_KIND_UNKNOWN;
 	GcmProfile *profile;
 	guint i;
 	const gchar *filename = NULL;
@@ -542,33 +542,33 @@ gcm_viewer_add_profiles_columns (GcmViewerPrivate *viewer, GtkTreeView *treeview
  * gcm_viewer_profile_kind_to_string:
  **/
 static gchar *
-gcm_viewer_profile_kind_to_string (GcmProfileKind kind)
+gcm_viewer_profile_kind_to_string (CdProfileKind kind)
 {
-	if (kind == GCM_PROFILE_KIND_INPUT_DEVICE) {
+	if (kind == CD_PROFILE_KIND_INPUT_DEVICE) {
 		/* TRANSLATORS: this the ICC profile type */
 		return _("Input device");
 	}
-	if (kind == GCM_PROFILE_KIND_DISPLAY_DEVICE) {
+	if (kind == CD_PROFILE_KIND_DISPLAY_DEVICE) {
 		/* TRANSLATORS: this the ICC profile type */
 		return _("Display device");
 	}
-	if (kind == GCM_PROFILE_KIND_OUTPUT_DEVICE) {
+	if (kind == CD_PROFILE_KIND_OUTPUT_DEVICE) {
 		/* TRANSLATORS: this the ICC profile type */
 		return _("Output device");
 	}
-	if (kind == GCM_PROFILE_KIND_DEVICELINK) {
+	if (kind == CD_PROFILE_KIND_DEVICELINK) {
 		/* TRANSLATORS: this the ICC profile type */
 		return _("Devicelink");
 	}
-	if (kind == GCM_PROFILE_KIND_COLORSPACE_CONVERSION) {
+	if (kind == CD_PROFILE_KIND_COLORSPACE_CONVERSION) {
 		/* TRANSLATORS: this the ICC profile type */
 		return _("Colorspace conversion");
 	}
-	if (kind == GCM_PROFILE_KIND_ABSTRACT) {
+	if (kind == CD_PROFILE_KIND_ABSTRACT) {
 		/* TRANSLATORS: this the ICC profile kind */
 		return _("Abstract");
 	}
-	if (kind == GCM_PROFILE_KIND_NAMED_COLOR) {
+	if (kind == CD_PROFILE_KIND_NAMED_COLOR) {
 		/* TRANSLATORS: this the ICC profile type */
 		return _("Named color");
 	}
@@ -646,7 +646,7 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 	const gchar *filename;
 	gchar *basename = NULL;
 	gchar *size_text = NULL;
-	GcmProfileKind profile_kind;
+	CdProfileKind profile_kind;
 	GcmColorspace profile_colorspace;
 	const gchar *profile_kind_text;
 	const gchar *profile_colorspace_text;
@@ -724,7 +724,7 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 	/* set kind */
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "hbox_type"));
 	profile_kind = gcm_profile_get_kind (profile);
-	if (profile_kind == GCM_PROFILE_KIND_UNKNOWN) {
+	if (profile_kind == CD_PROFILE_KIND_UNKNOWN) {
 		gtk_widget_hide (widget);
 	} else {
 		gtk_widget_show (widget);
@@ -747,7 +747,7 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 
 	/* set vcgt */
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "hbox_vcgt"));
-	gtk_widget_set_visible (widget, (profile_kind == GCM_PROFILE_KIND_DISPLAY_DEVICE));
+	gtk_widget_set_visible (widget, (profile_kind == CD_PROFILE_KIND_DISPLAY_DEVICE));
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "label_vcgt"));
 	has_vcgt = gcm_profile_get_has_vcgt (profile);
 	if (has_vcgt) {
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 78cdb1e..8b80494 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -4,6 +4,7 @@ INCLUDES =						\
 	$(GTK_CFLAGS)					\
 	$(NOTIFY_CFLAGS)				\
 	$(CANBERRA_CFLAGS)				\
+	$(COLORD_CFLAGS)				\
 	$(CONTROL_CENTER_CFLAGS)			\
 	-DG_UDEV_API_IS_SUBJECT_TO_CHANGE		\
 	-DGNOME_DESKTOP_USE_UNSTABLE_API		\
@@ -48,6 +49,7 @@ gcm_dump_profile_SOURCES =				\
 
 gcm_dump_profile_LDADD =				\
 	$(GLIB_LIBS)					\
+	$(COLORD_LIBS)					\
 	$(LCMS_LIBS)					\
 	$(top_builddir)/src/libgcmshared.a		\
 	-lm
@@ -81,7 +83,7 @@ gcm_fix_profile_LDADD =					\
 gcm_fix_profile_CFLAGS =				\
 	$(WARNINGFLAGS_C)
 
-COLOR_GLIB_LIBS =					\
+COLORD_LIBS =					\
 	$(top_builddir)/src/libgcmshared.a
 
 gcm_sensor_example_SOURCES =				\
diff --git a/tools/gcm-dump-profile.c b/tools/gcm-dump-profile.c
index 95c4628..ba08af4 100644
--- a/tools/gcm-dump-profile.c
+++ b/tools/gcm-dump-profile.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <locale.h>
+#include <colord.h>
 
 #include "gcm-profile.h"
 #include "gcm-debug.h"
@@ -62,7 +63,7 @@ gcm_dump_profile_filename (const gchar *filename)
 
 	/* print what we know */
 	profile_kind = gcm_profile_get_kind (profile);
-	g_print ("Kind:\t%s\n", gcm_profile_kind_to_string (profile_kind));
+//	g_print ("Kind:\t%s\n", cd_profile_kind_to_string (profile_kind));
 	colorspace = gcm_profile_get_colorspace (profile);
 	g_print ("Colorspace:\t%s\n", gcm_colorspace_to_string (colorspace));
 	size = gcm_profile_get_size (profile);



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