[gnome-color-manager/colord] Remove GcmDevice as this is no longer needed with colord



commit 9c8ef7b7f7b641bab898f274dc87bd76d6bd4bc5
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jan 17 16:23:15 2011 +0000

    Remove GcmDevice as this is no longer needed with colord

 rules/95-gcm-devices.rules    |    6 +-
 src/Makefile.am               |    4 -
 src/cc-color-panel.c          |  297 +++---------
 src/gcm-calibrate-argyll.c    |    1 +
 src/gcm-calibrate-dialog.c    |    2 +-
 src/gcm-calibrate-dialog.h    |    2 -
 src/gcm-calibrate-manual.c    |    1 +
 src/gcm-calibrate-native.c    |    4 +-
 src/gcm-calibrate.c           |   17 +-
 src/gcm-calibrate.h           |    4 +-
 src/gcm-device-xrandr.c       |  120 +++---
 src/gcm-device.c              | 1062 -----------------------------------------
 src/gcm-device.h              |  144 ------
 src/gcm-enum.c                |   90 ----
 src/gcm-enum.h                |   46 --
 src/gcm-exif.h                |    2 -
 src/gcm-image.c               |    6 +-
 src/gcm-import.c              |    4 +-
 src/gcm-list-store-profiles.c |   10 +-
 src/gcm-list-store-profiles.h |    4 +-
 src/gcm-picker.c              |    7 +-
 src/gcm-profile.c             |   46 +-
 src/gcm-profile.h             |    5 +-
 src/gcm-self-test.c           |   78 ++--
 src/gcm-session.c             |   63 ++--
 src/gcm-utils.c               |   11 +-
 src/gcm-utils.h               |    4 +-
 src/gcm-viewer.c              |   30 +-
 tools/gcm-dump-profile.c      |    2 +-
 29 files changed, 290 insertions(+), 1782 deletions(-)
---
diff --git a/rules/95-gcm-devices.rules b/rules/95-gcm-devices.rules
index 4356d92..28f0797 100644
--- a/rules/95-gcm-devices.rules
+++ b/rules/95-gcm-devices.rules
@@ -11,15 +11,15 @@
 # Devices that may have profiles.
 #
 # These are properties defining the behavior:
-#  GCM_DEVICE		Can be assinged a profile
+#  CD_DEVICE		Can be assinged a profile
 #  GCM_TYPE		The type of device
 #  GCM_RESCAN		If we should rescan a particualr device class
 
 # Cameras with gphoto drivers
-SUBSYSTEM=="usb", ENV{ID_GPHOTO2}!="", ENV{GCM_DEVICE}="1", ENV{GCM_TYPE}="camera"
+SUBSYSTEM=="usb", ENV{ID_GPHOTO2}!="", ENV{CD_DEVICE}="1", ENV{GCM_TYPE}="camera"
 
 # video cameras
-SUBSYSTEM=="video4linux", ENV{ID_V4L_PRODUCT}!="", ENV{GCM_DEVICE}="1", ENV{GCM_TYPE}="camera"
+SUBSYSTEM=="video4linux", ENV{ID_V4L_PRODUCT}!="", ENV{CD_DEVICE}="1", ENV{GCM_TYPE}="camera"
 
 # USB SANE scanners
 SUBSYSTEM=="usb", ENV{libsane_matched}!="", ENV{GCM_RESCAN}="scanner"
diff --git a/src/Makefile.am b/src/Makefile.am
index 922f26d..e21ff2b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,14 +58,10 @@ libgcmshared_a_SOURCES =				\
 	gcm-color.h					\
 	gcm-debug.c					\
 	gcm-debug.h					\
-	gcm-device.c					\
-	gcm-device.h					\
 	gcm-dmi.c					\
 	gcm-dmi.h					\
 	gcm-edid.c					\
 	gcm-edid.h					\
-	gcm-enum.c					\
-	gcm-enum.h					\
 	gcm-exif.c					\
 	gcm-exif.h					\
 	gcm-gamma-widget.c				\
diff --git a/src/cc-color-panel.c b/src/cc-color-panel.c
index b0e9bf6..dca3ba3 100644
--- a/src/cc-color-panel.c
+++ b/src/cc-color-panel.c
@@ -48,7 +48,7 @@ struct _CcColorPanelPrivate {
 	GtkBuilder		*builder;
 	GtkListStore		*list_store_devices;
 	GtkListStore		*list_store_profiles;
-	GcmDevice		*current_device;
+	CdDevice		*current_device;
 	GcmProfileStore		*profile_store;
 	CdClient		*cd_client;
 	GcmSensorClient		*sensor_client;
@@ -72,11 +72,11 @@ static void cc_color_panel_finalize (GObject *object);
 #define PK_DBUS_INTERFACE_QUERY				"org.freedesktop.PackageKit.Query"
 
 enum {
-	GCM_DEVICES_COLUMN_ID,
-	GCM_DEVICES_COLUMN_SORT,
-	GCM_DEVICES_COLUMN_ICON,
-	GCM_DEVICES_COLUMN_TITLE,
-	GCM_DEVICES_COLUMN_LAST
+	CD_DEVICES_COLUMN_ID,
+	CD_DEVICES_COLUMN_SORT,
+	CD_DEVICES_COLUMN_ICON,
+	CD_DEVICES_COLUMN_TITLE,
+	CD_DEVICES_COLUMN_LAST
 };
 
 enum {
@@ -117,7 +117,7 @@ cc_color_panel_error_dialog (CcColorPanel *panel, const gchar *title, const gcha
  * cc_color_panel_set_default:
  **/
 static gboolean
-cc_color_panel_set_default (CcColorPanel *panel, GcmDevice *device)
+cc_color_panel_set_default (CcColorPanel *panel, CdDevice *device)
 {
 	/* TODO: make default */
 	return TRUE;
@@ -167,7 +167,7 @@ static void
 cc_color_panel_default_cb (GtkWidget *widget, CcColorPanel *panel)
 {
 	GPtrArray *array = NULL;
-	GcmDevice *device;
+	CdDevice *device;
 	CdDeviceKind kind;
 	gboolean ret;
 	guint i;
@@ -178,7 +178,7 @@ cc_color_panel_default_cb (GtkWidget *widget, CcColorPanel *panel)
 		device = g_ptr_array_index (array, i);
 
 		/* not a xrandr panel */
-		kind = gcm_device_get_kind (device);
+		kind = cd_device_get_kind (device);
 		if (kind != CD_DEVICE_KIND_DISPLAY)
 			continue;
 
@@ -231,7 +231,7 @@ static gboolean
 cc_color_panel_calibrate_display (CcColorPanel *panel, GcmCalibrate *calibrate)
 {
 	gboolean ret = FALSE;
-	gboolean ret_tmp;
+	gboolean ret_tmp = FALSE;
 	GError *error = NULL;
 	GtkWindow *window;
 
@@ -248,7 +248,7 @@ cc_color_panel_calibrate_display (CcColorPanel *panel, GcmCalibrate *calibrate)
 	}
 
 	/* clear any VCGT */
-//	ret = gcm_device_xrandr_reset (GCM_DEVICE_XRANDR (panel->priv->current_device), &error);
+//	ret = cd_device_xrandr_reset (CD_DEVICE_XRANDR (panel->priv->current_device), &error);
 	if (!ret) {
 		g_warning ("failed to reset so we can calibrate: %s", error->message);
 		g_error_free (error);
@@ -266,7 +266,7 @@ cc_color_panel_calibrate_display (CcColorPanel *panel, GcmCalibrate *calibrate)
 out:
 	/* need to set the gamma back to the default after calibration */
 	error = NULL;
-	ret_tmp = gcm_device_apply (panel->priv->current_device, &error);
+//	ret_tmp = cd_device_apply (panel->priv->current_device, &error);
 	if (!ret_tmp) {
 		g_warning ("failed to apply profile: %s", error->message);
 		g_error_free (error);
@@ -441,7 +441,7 @@ cc_color_panel_profile_add_virtual_file (CcColorPanel *panel, GFile *file)
 	gboolean ret;
 	GcmExif *exif;
 	GError *error = NULL;
-	GcmDevice *device = NULL;
+	CdDevice *device = NULL;
 
 	/* parse file */
 	exif = gcm_exif_new ();
@@ -460,12 +460,12 @@ cc_color_panel_profile_add_virtual_file (CcColorPanel *panel, GFile *file)
 	/* create device */
 	device = NULL;
 #if 0
-	ret = gcm_device_virtual_create_from_params (GCM_DEVICE_VIRTUAL (device),
+	ret = cd_device_virtual_create_from_params (CD_DEVICE_VIRTUAL (device),
 						     gcm_exif_get_device_kind (exif),
 						     gcm_exif_get_model (exif),
 						     gcm_exif_get_manufacturer (exif),
 						     gcm_exif_get_serial (exif),
-						     GCM_COLORSPACE_RGB);
+						     CD_COLORSPACE_RGB);
 	if (!ret) {
 		/* TRANSLATORS: could not add virtual device */
 		cc_color_panel_error_dialog (panel, _("Failed to create virtual device"), NULL);
@@ -473,15 +473,6 @@ cc_color_panel_profile_add_virtual_file (CcColorPanel *panel, GFile *file)
 	}
 #endif
 
-	/* save what we've got */
-	ret = gcm_device_save (device, &error);
-	if (!ret) {
-		/* TRANSLATORS: could not add virtual device */
-		cc_color_panel_error_dialog (panel, _("Failed to save virtual device"), error->message);
-		g_error_free (error);
-		goto out;
-	}
-
 	/* add to the device list */
 //	ret = cd_client_add_device (panel->priv->cd_client, device, &error);
 	if (!ret) {
@@ -725,7 +716,7 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 	calibrate = GCM_CALIBRATE(gcm_calibrate_argyll_new ());
 
 	/* choose the correct kind of calibration */
-	kind = gcm_device_get_kind (panel->priv->current_device);
+	kind = cd_device_get_kind (panel->priv->current_device);
 	switch (kind) {
 	case CD_DEVICE_KIND_DISPLAY:
 		ret = cc_color_panel_calibrate_display (panel, calibrate);
@@ -766,7 +757,7 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 	}
 
 	/* find an existing profile of this name */
-	profile_array = gcm_device_get_profiles (panel->priv->current_device);
+//	profile_array = cd_device_get_profiles (panel->priv->current_device);
 	destination = g_file_get_path (dest);
 	for (i=0; i<profile_array->len; i++) {
 		profile = g_ptr_array_index (profile_array, i);
@@ -782,13 +773,7 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 		g_debug ("adding: %s", destination);
 
 		/* set this default */
-		gcm_device_set_default_profile_filename (panel->priv->current_device, destination);
-		ret = gcm_device_save (panel->priv->current_device, &error);
-		if (!ret) {
-			g_warning ("failed to save default: %s", error->message);
-			g_error_free (error);
-			goto out;
-		}
+//		cd_device_set_default_profile_filename (panel->priv->current_device, destination);
 	}
 
 	/* remove temporary file */
@@ -837,23 +822,23 @@ cc_color_panel_device_add_cb (GtkWidget *widget, CcColorPanel *panel)
  * cc_color_panel_is_profile_suitable_for_device:
  **/
 static gboolean
-cc_color_panel_is_profile_suitable_for_device (GcmProfile *profile, GcmDevice *device)
+cc_color_panel_is_profile_suitable_for_device (GcmProfile *profile, CdDevice *device)
 {
 	CdProfileKind profile_kind_tmp;
 	CdProfileKind profile_kind;
-	GcmColorspace profile_colorspace;
-	GcmColorspace device_colorspace;
+	CdColorspace profile_colorspace;
+	CdColorspace device_colorspace = 0;
 	gboolean ret = FALSE;
 	CdDeviceKind device_kind;
 
 	/* not the right colorspace */
-	device_colorspace = gcm_device_get_colorspace (device);
+//	device_colorspace = cd_device_get_colorspace (device);
 	profile_colorspace = gcm_profile_get_colorspace (profile);
 	if (device_colorspace != profile_colorspace)
 		goto out;
 
 	/* not the correct kind */
-	device_kind = gcm_device_get_kind (device);
+	device_kind = cd_device_get_kind (device);
 	profile_kind_tmp = gcm_profile_get_kind (profile);
 	profile_kind = gcm_utils_device_kind_to_profile_kind (device_kind);
 	if (profile_kind_tmp != profile_kind)
@@ -914,11 +899,11 @@ cc_color_panel_add_profiles_suitable_for_devices (CcColorPanel *panel, GtkWidget
 static void
 cc_color_panel_profile_add_cb (GtkWidget *widget, CcColorPanel *panel)
 {
-	const gchar *profile_filename;
+	const gchar *profile_filename = NULL;
 
 	/* add profiles of the right kind */
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_profile"));
-	profile_filename = gcm_device_get_default_profile_filename (panel->priv->current_device);
+//	profile_filename = cd_device_get_default_profile_filename (panel->priv->current_device);
 	cc_color_panel_add_profiles_suitable_for_devices (panel, widget, profile_filename);
 
 	/* show the dialog */
@@ -936,8 +921,7 @@ cc_color_panel_profile_remove_cb (GtkWidget *widget, CcColorPanel *panel)
 	GtkTreeIter iter;
 	GtkTreeSelection *selection;
 	GtkTreeModel *model;
-	gboolean ret;
-	const gchar *device_md5 = NULL;
+	gboolean ret = FALSE;
 	GcmProfile *profile = NULL;
 	GError *error = NULL;
 
@@ -954,40 +938,13 @@ cc_color_panel_profile_remove_cb (GtkWidget *widget, CcColorPanel *panel)
 			    GCM_LIST_STORE_PROFILES_COLUMN_PROFILE, &profile,
 			    -1);
 
-	/* 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) == 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");
-			gcm_device_set_use_edid_profile (panel->priv->current_device, FALSE);
-		}
-	}
-
 	/* just remove it, the list store will get ::changed */
-	ret = gcm_device_profile_remove (panel->priv->current_device, profile, &error);
+//	ret = cd_device_profile_remove (panel->priv->current_device, profile, &error);
 	if (!ret) {
 		g_warning ("failed to remove profile: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
-
-	/* save */
-	ret = gcm_device_save (panel->priv->current_device, &error);
-	if (!ret) {
-		g_warning ("failed to save config: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
-	/* apply */
-	ret = gcm_device_apply (panel->priv->current_device, &error);
-	if (!ret) {
-		g_warning ("failed to apply config: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
 out:
 	if (profile != NULL)
 		g_object_unref (profile);
@@ -1002,7 +959,7 @@ cc_color_panel_profile_make_default_internal (CcColorPanel *panel, GtkTreeModel
 {
 	GcmProfile *profile;
 	GError *error = NULL;
-	gboolean ret;
+	gboolean ret = FALSE;
 	GtkWidget *widget;
 
 	/* get currentlt selected item */
@@ -1011,29 +968,13 @@ cc_color_panel_profile_make_default_internal (CcColorPanel *panel, GtkTreeModel
 			    -1);
 
 	/* just set it default, the list store will get ::changed */
-	ret = gcm_device_profile_set_default (panel->priv->current_device, profile, &error);
+//	ret = cd_device_profile_set_default (panel->priv->current_device, profile, &error);
 	if (!ret) {
 		g_warning ("failed to set default profile: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
 
-	/* save */
-	ret = gcm_device_save (panel->priv->current_device, &error);
-	if (!ret) {
-		g_warning ("failed to save config: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
-	/* apply */
-	ret = gcm_device_apply (panel->priv->current_device, &error);
-	if (!ret) {
-		g_warning ("failed to apply config: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
 	/* set button insensitive */
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "button_assign_make_default"));
 	gtk_widget_set_sensitive (widget, FALSE);
@@ -1070,10 +1011,10 @@ static void
 cc_color_panel_button_virtual_add_cb (GtkWidget *widget, CcColorPanel *panel)
 {
 	CdDeviceKind device_kind;
-	GcmDevice *device;
+	CdDevice *device;
 	const gchar *model;
 	const gchar *manufacturer;
-	gboolean ret;
+	gboolean ret = FALSE;
 	GError *error = NULL;
 
 	/* get device details */
@@ -1087,15 +1028,6 @@ cc_color_panel_button_virtual_add_cb (GtkWidget *widget, CcColorPanel *panel)
 	/* create device */
 	device = NULL;
 
-	/* save what we've got */
-	ret = gcm_device_save (device, &error);
-	if (!ret) {
-		/* TRANSLATORS: could not add virtual device */
-		cc_color_panel_error_dialog (panel, _("Failed to save virtual device"), error->message);
-		g_error_free (error);
-		goto out;
-	}
-
 	/* add to the device list */
 //	ret = cd_client_add_device (panel->priv->cd_client, device, &error);
 	if (!ret) {
@@ -1150,7 +1082,7 @@ cc_color_panel_button_assign_ok_cb (GtkWidget *widget, CcColorPanel *panel)
 	GtkTreeIter iter;
 	GtkTreeModel *model;
 	GcmProfile *profile = NULL;
-	gboolean ret;
+	gboolean ret = FALSE;
 	GError *error = NULL;
 
 	/* hide window */
@@ -1168,7 +1100,7 @@ cc_color_panel_button_assign_ok_cb (GtkWidget *widget, CcColorPanel *panel)
 			    -1);
 
 	/* just add it, the list store will get ::changed */
-	ret = gcm_device_profile_add (panel->priv->current_device, profile, &error);
+//	ret = cd_device_profile_add (panel->priv->current_device, profile, &error);
 	if (!ret) {
 		g_warning ("failed to add: %s", error->message);
 		g_error_free (error);
@@ -1176,28 +1108,12 @@ cc_color_panel_button_assign_ok_cb (GtkWidget *widget, CcColorPanel *panel)
 	}
 
 	/* make it default */
-	ret = gcm_device_profile_set_default (panel->priv->current_device, profile, &error);
+//	ret = cd_device_profile_set_default (panel->priv->current_device, profile, &error);
 	if (!ret) {
 		g_warning ("failed to set default: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
-
-	/* save */
-	ret = gcm_device_save (panel->priv->current_device, &error);
-	if (!ret) {
-		g_warning ("failed to save config: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
-	/* apply */
-	ret = gcm_device_apply (panel->priv->current_device, &error);
-	if (!ret) {
-		g_warning ("failed to apply config: %s", error->message);
-		g_error_free (error);
-		goto out;
-	}
 out:
 	if (profile != NULL)
 		g_object_unref (profile);
@@ -1244,7 +1160,7 @@ cc_color_panel_add_devices_columns (CcColorPanel *panel, GtkTreeView *treeview)
 	renderer = gtk_cell_renderer_pixbuf_new ();
 	g_object_set (renderer, "stock-size", GTK_ICON_SIZE_DND, NULL);
 	column = gtk_tree_view_column_new_with_attributes ("", renderer,
-							   "icon-name", GCM_DEVICES_COLUMN_ICON, NULL);
+							   "icon-name", CD_DEVICES_COLUMN_ICON, NULL);
 	gtk_tree_view_append_column (treeview, column);
 
 	/* column for text */
@@ -1253,9 +1169,9 @@ cc_color_panel_add_devices_columns (CcColorPanel *panel, GtkTreeView *treeview)
 		      "wrap-mode", PANGO_WRAP_WORD,
 		      NULL);
 	column = gtk_tree_view_column_new_with_attributes ("", renderer,
-							   "markup", GCM_DEVICES_COLUMN_TITLE, NULL);
-	gtk_tree_view_column_set_sort_column_id (column, GCM_DEVICES_COLUMN_SORT);
-	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (panel->priv->list_store_devices), GCM_DEVICES_COLUMN_SORT, GTK_SORT_ASCENDING);
+							   "markup", CD_DEVICES_COLUMN_TITLE, NULL);
+	gtk_tree_view_column_set_sort_column_id (column, CD_DEVICES_COLUMN_SORT);
+	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (panel->priv->list_store_devices), CD_DEVICES_COLUMN_SORT, GTK_SORT_ASCENDING);
 	gtk_tree_view_append_column (treeview, column);
 	gtk_tree_view_column_set_expand (column, TRUE);
 }
@@ -1327,11 +1243,11 @@ cc_color_panel_set_calibrate_button_sensitivity (CcColorPanel *panel)
 	}
 
 	/* are we a display */
-	kind = gcm_device_get_kind (panel->priv->current_device);
+	kind = cd_device_get_kind (panel->priv->current_device);
 	if (kind == CD_DEVICE_KIND_DISPLAY) {
 
 		/* are we disconnected */
-		ret = gcm_device_get_connected (panel->priv->current_device);
+		ret = cd_device_get_kind (panel->priv->current_device);
 		if (!ret) {
 			/* TRANSLATORS: this is when the button is insensitive */
 			tooltip = _("Cannot create profile: The display device is not connected");
@@ -1339,7 +1255,7 @@ cc_color_panel_set_calibrate_button_sensitivity (CcColorPanel *panel)
 		}
 
 		/* are we not XRandR 1.3 compat */
-//		ret = gcm_device_xrandr_get_xrandr13 (GCM_DEVICE_XRANDR (panel->priv->current_device));
+//		ret = cd_device_xrandr_get_xrandr13 (CD_DEVICE_XRANDR (panel->priv->current_device));
 		if (!ret) {
 			/* TRANSLATORS: this is when the button is insensitive */
 			tooltip = _("Cannot create profile: The display driver does not support XRandR 1.3");
@@ -1398,10 +1314,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 	GtkTreeModel *model;
 	GtkTreePath *path;
 	GtkWidget *widget;
-	gboolean connected;
 	gchar *id = NULL;
-	gboolean ret;
-	CdDeviceKind kind;
 	GtkTreeIter iter;
 
 	/* This will only work in single or browse selection mode! */
@@ -1412,7 +1325,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 
 	/* get id */
 	gtk_tree_model_get (model, &iter,
-			    GCM_DEVICES_COLUMN_ID, &id,
+			    CD_DEVICES_COLUMN_ID, &id,
 			    -1);
 
 	/* we have a new device */
@@ -1428,23 +1341,6 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 	/* show broken devices */
 	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 == 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));
-			if (!ret) {
-                                widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "label_problems"));
-				/* TRANSLATORS: Some shitty binary drivers do not support per-head gamma controls.
-				* Whilst this does not matter if you only have one monitor attached, it means you
-				* can't color correct additional monitors or projectors. */
-				gtk_label_set_label (GTK_LABEL (widget),
-						     _("Per-device settings not supported. Check your display driver."));
-                                widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_problems"));
-				gtk_widget_show (widget);
-			}
-		}
-	}
 
 	/* set new device */
 	gcm_list_store_profiles_set_from_device (panel->priv->list_store_profiles,
@@ -1463,8 +1359,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 
 	/* can we delete this device? */
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "button_delete"));
-	connected = gcm_device_get_connected (panel->priv->current_device);
-	gtk_widget_set_sensitive (widget, !connected);
+	gtk_widget_set_sensitive (widget, TRUE);
 
 	/* can this device calibrate */
 	cc_color_panel_set_calibrate_button_sensitivity (panel);
@@ -1555,39 +1450,17 @@ cc_color_panel_device_kind_to_string (CdDeviceKind kind)
  * cc_color_panel_add_device_xrandr:
  **/
 static void
-cc_color_panel_add_device_xrandr (CcColorPanel *panel, GcmDevice *device)
+cc_color_panel_add_device_xrandr (CcColorPanel *panel, CdDevice *device)
 {
 	GtkTreeIter iter;
-	const gchar *title_tmp;
+	const gchar *title_tmp = NULL;
 	gchar *title = NULL;
 	gchar *sort = NULL;
 	const gchar *id;
-	gboolean ret;
-	gboolean connected;
-	GError *error = NULL;
 
 	/* italic for non-connected devices */
-	connected = gcm_device_get_connected (device);
-	title_tmp = gcm_device_get_title (device);
-	if (connected) {
-		/* set the gamma on the device */
-		ret = gcm_device_apply (device, &error);
-		if (!ret) {
-			g_warning ("failed to apply profile: %s", error->message);
-			g_error_free (error);
-		}
-
-		/* use a different title if we have crap xorg drivers */
-		if (ret) {
-			title = g_strdup (title_tmp);
-		} else {
-			/* TRANSLATORS: this is where an output is not settable, but we are showing it in the UI */
-			title = g_strdup_printf ("%s\n(%s)", title_tmp, _("No hardware support"));
-		}
-	} else {
-		/* TRANSLATORS: this is where the device has been setup but is not connected */
-		title = g_strdup_printf ("%s\n<i>[%s]</i>", title_tmp, _("disconnected"));
-	}
+//	title_tmp = cd_device_get_title (device);
+	title = g_strdup (title_tmp);
 
 	/* create sort order */
 	sort = g_strdup_printf ("%s%s",
@@ -1595,14 +1468,14 @@ cc_color_panel_add_device_xrandr (CcColorPanel *panel, GcmDevice *device)
 				title);
 
 	/* add to list */
-	id = gcm_device_get_id (device);
+	id = cd_device_get_id (device);
 	g_debug ("add %s to device list", id);
 	gtk_list_store_append (panel->priv->list_store_devices, &iter);
 	gtk_list_store_set (panel->priv->list_store_devices, &iter,
-			    GCM_DEVICES_COLUMN_ID, id,
-			    GCM_DEVICES_COLUMN_SORT, sort,
-			    GCM_DEVICES_COLUMN_TITLE, title,
-			    GCM_DEVICES_COLUMN_ICON, "video-display", -1);
+			    CD_DEVICES_COLUMN_ID, id,
+			    CD_DEVICES_COLUMN_SORT, sort,
+			    CD_DEVICES_COLUMN_TITLE, title,
+			    CD_DEVICES_COLUMN_ICON, "video-display", -1);
 	g_free (sort);
 	g_free (title);
 }
@@ -1779,47 +1652,37 @@ cc_color_panel_device_kind_to_icon_name (CdDeviceKind kind)
  * cc_color_panel_add_device_kind:
  **/
 static void
-cc_color_panel_add_device_kind (CcColorPanel *panel, GcmDevice *device)
+cc_color_panel_add_device_kind (CcColorPanel *panel, CdDevice *device)
 {
 	GtkTreeIter iter;
-	const gchar *title;
+	const gchar *title = NULL;
 	GString *string;
 	const gchar *id;
 	gchar *sort = NULL;
 	CdDeviceKind kind;
 	const gchar *icon_name;
-	gboolean connected;
-	gboolean virtual;
 
 	/* get icon */
-	kind = gcm_device_get_kind (device);
+	kind = cd_device_get_kind (device);
 	icon_name = cc_color_panel_device_kind_to_icon_name (kind);
 
 	/* create a title for the device */
-	title = gcm_device_get_title (device);
+	//title = cd_device_get_title (device);
 	string = g_string_new (title);
 
-	/* italic for non-connected devices */
-	connected = gcm_device_get_connected (device);
-	virtual = gcm_device_get_virtual (device);
-	if (!connected && !virtual) {
-		/* TRANSLATORS: this is where the device has been setup but is not connected */
-		g_string_append_printf (string, "\n<i>[%s]</i>", _("disconnected"));
-	}
-
 	/* create sort order */
 	sort = g_strdup_printf ("%s%s",
 				cc_color_panel_device_kind_to_string (kind),
 				string->str);
 
 	/* add to list */
-	id = gcm_device_get_id (device);
+	id = cd_device_get_id (device);
 	gtk_list_store_append (panel->priv->list_store_devices, &iter);
 	gtk_list_store_set (panel->priv->list_store_devices, &iter,
-			    GCM_DEVICES_COLUMN_ID, id,
-			    GCM_DEVICES_COLUMN_SORT, sort,
-			    GCM_DEVICES_COLUMN_TITLE, string->str,
-			    GCM_DEVICES_COLUMN_ICON, icon_name, -1);
+			    CD_DEVICES_COLUMN_ID, id,
+			    CD_DEVICES_COLUMN_SORT, sort,
+			    CD_DEVICES_COLUMN_TITLE, string->str,
+			    CD_DEVICES_COLUMN_ICON, icon_name, -1);
 	g_free (sort);
 	g_string_free (string, TRUE);
 }
@@ -1828,7 +1691,7 @@ cc_color_panel_add_device_kind (CcColorPanel *panel, GcmDevice *device)
  * cc_color_panel_remove_device:
  **/
 static void
-cc_color_panel_remove_device (CcColorPanel *panel, GcmDevice *gcm_device)
+cc_color_panel_remove_device (CcColorPanel *panel, CdDevice *cd_device)
 {
 	GtkTreeIter iter;
 	GtkTreeModel *model;
@@ -1837,9 +1700,7 @@ cc_color_panel_remove_device (CcColorPanel *panel, GcmDevice *gcm_device)
 	gboolean ret;
 
 	/* remove */
-	id = gcm_device_get_id (gcm_device);
-	g_debug ("removing: %s (connected: %i)", id,
-		   gcm_device_get_connected (gcm_device));
+	id = cd_device_get_id (cd_device);
 
 	/* get first element */
 	model = GTK_TREE_MODEL (panel->priv->list_store_devices);
@@ -1850,7 +1711,7 @@ cc_color_panel_remove_device (CcColorPanel *panel, GcmDevice *gcm_device)
 	/* get the other elements */
 	do {
 		gtk_tree_model_get (model, &iter,
-				    GCM_DEVICES_COLUMN_ID, &id_tmp,
+				    CD_DEVICES_COLUMN_ID, &id_tmp,
 				    -1);
 		if (g_strcmp0 (id_tmp, id) == 0) {
 			gtk_list_store_remove (GTK_LIST_STORE(model), &iter);
@@ -1865,19 +1726,15 @@ cc_color_panel_remove_device (CcColorPanel *panel, GcmDevice *gcm_device)
  * cc_color_panel_added_cb:
  **/
 static void
-cc_color_panel_added_cb (CdClient *client, GcmDevice *device, CcColorPanel *panel)
+cc_color_panel_added_cb (CdClient *client, CdDevice *device, CcColorPanel *panel)
 {
 	CdDeviceKind kind;
-	g_debug ("added: %s (connected: %i, saved: %i)",
-		   gcm_device_get_id (device),
-		   gcm_device_get_connected (device),
-		   gcm_device_get_saved (device));
 
 	/* remove the saved device if it's already there */
 	cc_color_panel_remove_device (panel, device);
 
 	/* add the device */
-	kind = gcm_device_get_kind (device);
+	kind = cd_device_get_kind (device);
 	if (kind == CD_DEVICE_KIND_DISPLAY)
 		cc_color_panel_add_device_xrandr (panel, device);
 	else
@@ -1888,16 +1745,16 @@ cc_color_panel_added_cb (CdClient *client, GcmDevice *device, CcColorPanel *pane
  * cc_color_panel_changed_cb:
  **/
 static void
-cc_color_panel_changed_cb (CdClient *client, GcmDevice *device, CcColorPanel *panel)
+cc_color_panel_changed_cb (CdClient *client, CdDevice *device, CcColorPanel *panel)
 {
-	g_debug ("changed: %s (doing nothing)", gcm_device_get_id (device));
+	g_debug ("changed: %s (doing nothing)", cd_device_get_id (device));
 }
 
 /**
  * cc_color_panel_removed_cb:
  **/
 static void
-cc_color_panel_removed_cb (CdClient *client, GcmDevice *device, CcColorPanel *panel)
+cc_color_panel_removed_cb (CdClient *client, CdDevice *device, CcColorPanel *panel)
 {
 	GtkTreeIter iter;
 	GtkTreeSelection *selection;
@@ -1923,12 +1780,12 @@ cc_color_panel_removed_cb (CdClient *client, GcmDevice *device, CcColorPanel *pa
  * cc_color_panel_setup_space_combobox:
  **/
 static void
-cc_color_panel_setup_space_combobox (CcColorPanel *panel, GtkWidget *widget, GcmColorspace colorspace, const gchar *profile_filename)
+cc_color_panel_setup_space_combobox (CcColorPanel *panel, GtkWidget *widget, CdColorspace colorspace, const gchar *profile_filename)
 {
 	GcmProfile *profile;
 	guint i;
 	const gchar *filename;
-	GcmColorspace colorspace_tmp;
+	CdColorspace colorspace_tmp;
 	gboolean has_profile = FALSE;
 	gboolean has_vcgt;
 	gboolean has_colorspace_description;
@@ -1950,7 +1807,7 @@ cc_color_panel_setup_space_combobox (CcColorPanel *panel, GtkWidget *widget, Gcm
 		colorspace_tmp = gcm_profile_get_colorspace (profile);
 		if (!has_vcgt &&
 		    colorspace == colorspace_tmp &&
-		    (colorspace != GCM_COLORSPACE_RGB ||
+		    (colorspace != CD_COLORSPACE_RGB ||
 		     has_colorspace_description)) {
 			cc_color_panel_combobox_add_profile (widget, profile, GCM_PREFS_ENTRY_TYPE_PROFILE, &iter);
 
@@ -1964,7 +1821,7 @@ cc_color_panel_setup_space_combobox (CcColorPanel *panel, GtkWidget *widget, Gcm
 	if (!has_profile) {
 		/* TRANSLATORS: this is when there are no profiles that can be used; the search term is either "RGB" or "CMYK" */
 		text = g_strdup_printf (_("No %s color spaces available"),
-					gcm_colorspace_to_localised_string (colorspace));
+					cd_colorspace_to_localised_string (colorspace));
 		model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 		gtk_list_store_append (GTK_LIST_STORE(model), &iter);
 		gtk_list_store_set (GTK_LIST_STORE(model), &iter,
@@ -2158,7 +2015,7 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_space_rgb"));
 	colorspace_rgb = g_settings_get_string (panel->priv->settings, GCM_SETTINGS_COLORSPACE_RGB);
 	cc_color_panel_set_combo_simple_text (widget);
-	cc_color_panel_setup_space_combobox (panel, widget, GCM_COLORSPACE_RGB, colorspace_rgb);
+	cc_color_panel_setup_space_combobox (panel, widget, CD_COLORSPACE_RGB, colorspace_rgb);
 	g_object_set_data (G_OBJECT(widget), "GCM:GSettingsKey", (gpointer) GCM_SETTINGS_COLORSPACE_RGB);
 	g_signal_connect (G_OBJECT (widget), "changed",
 			  G_CALLBACK (cc_color_panel_space_combo_changed_cb), panel);
@@ -2167,7 +2024,7 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_space_cmyk"));
 	colorspace_cmyk = g_settings_get_string (panel->priv->settings, GCM_SETTINGS_COLORSPACE_CMYK);
 	cc_color_panel_set_combo_simple_text (widget);
-	cc_color_panel_setup_space_combobox (panel, widget, GCM_COLORSPACE_CMYK, colorspace_cmyk);
+	cc_color_panel_setup_space_combobox (panel, widget, CD_COLORSPACE_CMYK, colorspace_cmyk);
 	g_object_set_data (G_OBJECT(widget), "GCM:GSettingsKey", (gpointer) GCM_SETTINGS_COLORSPACE_CMYK);
 	g_signal_connect (G_OBJECT (widget), "changed",
 			  G_CALLBACK (cc_color_panel_space_combo_changed_cb), panel);
@@ -2176,7 +2033,7 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_space_gray"));
 	colorspace_gray = g_settings_get_string (panel->priv->settings, GCM_SETTINGS_COLORSPACE_GRAY);
 	cc_color_panel_set_combo_simple_text (widget);
-	cc_color_panel_setup_space_combobox (panel, widget, GCM_COLORSPACE_GRAY, colorspace_gray);
+	cc_color_panel_setup_space_combobox (panel, widget, CD_COLORSPACE_GRAY, colorspace_gray);
 	g_object_set_data (G_OBJECT(widget), "GCM:GSettingsKey", (gpointer) GCM_SETTINGS_COLORSPACE_GRAY);
 	g_signal_connect (G_OBJECT (widget), "changed",
 			  G_CALLBACK (cc_color_panel_space_combo_changed_cb), panel);
@@ -2435,7 +2292,7 @@ cc_color_panel_init (CcColorPanel *panel)
 	                                   GCM_DATA G_DIR_SEPARATOR_S "icons");
 
 	/* create list stores */
-	panel->priv->list_store_devices = gtk_list_store_new (GCM_DEVICES_COLUMN_LAST, G_TYPE_STRING, G_TYPE_STRING,
+	panel->priv->list_store_devices = gtk_list_store_new (CD_DEVICES_COLUMN_LAST, G_TYPE_STRING, G_TYPE_STRING,
 						 G_TYPE_STRING, G_TYPE_STRING);
 	panel->priv->list_store_profiles = gcm_list_store_profiles_new ();
 
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 08eb12a..2c9b9fc 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -34,6 +34,7 @@
 #include <string.h>
 #include <gio/gio.h>
 #include <stdlib.h>
+#include <colord.h>
 #include <gtk/gtk.h>
 #ifdef HAVE_VTE
 #include <vte/vte.h>
diff --git a/src/gcm-calibrate-dialog.c b/src/gcm-calibrate-dialog.c
index 37b18de..d607f9c 100644
--- a/src/gcm-calibrate-dialog.c
+++ b/src/gcm-calibrate-dialog.c
@@ -30,8 +30,8 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <colord.h>
 
-#include "gcm-enum.h"
 #include "gcm-calibrate.h"
 #include "gcm-calibrate-dialog.h"
 #include "gcm-utils.h"
diff --git a/src/gcm-calibrate-dialog.h b/src/gcm-calibrate-dialog.h
index f178104..bb0d6af 100644
--- a/src/gcm-calibrate-dialog.h
+++ b/src/gcm-calibrate-dialog.h
@@ -25,8 +25,6 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
-#include "gcm-device.h"
-
 G_BEGIN_DECLS
 
 #define GCM_TYPE_CALIBRATE_DIALOG		(gcm_calibrate_dialog_get_type ())
diff --git a/src/gcm-calibrate-manual.c b/src/gcm-calibrate-manual.c
index b9e2d7b..09dfb37 100644
--- a/src/gcm-calibrate-manual.c
+++ b/src/gcm-calibrate-manual.c
@@ -32,6 +32,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <math.h>
+#include <colord.h>
 
 #include "gcm-utils.h"
 #include "gcm-clut.h"
diff --git a/src/gcm-calibrate-native.c b/src/gcm-calibrate-native.c
index bb6bce9..e46520b 100644
--- a/src/gcm-calibrate-native.c
+++ b/src/gcm-calibrate-native.c
@@ -33,11 +33,13 @@
 #include <gtk/gtk.h>
 #include <lcms2.h>
 #include <math.h>
+#include <colord.h>
 
 #include "gcm-calibrate-native.h"
 #include "gcm-sensor-client.h"
 #include "gcm-calibrate-dialog.h"
 #include "gcm-sample-window.h"
+#include "gcm-profile.h"
 
 static void     gcm_calibrate_native_finalize	(GObject     *object);
 
@@ -729,7 +731,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_colorspace (profile, CD_COLORSPACE_RGB);
 	gcm_profile_set_kind (profile, CD_PROFILE_KIND_DISPLAY_DEVICE);
 	gcm_profile_set_description (profile, description);
 	gcm_profile_set_copyright (profile, copyright);
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 913f486..fc683d8 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -30,6 +30,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <colord.h>
 
 #include "gcm-calibrate.h"
 #include "gcm-color.h"
@@ -303,7 +304,7 @@ gcm_calibrate_set_basename (GcmCalibrate *calibrate)
  * gcm_calibrate_set_from_device:
  **/
 gboolean
-gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GError **error)
+gcm_calibrate_set_from_device (GcmCalibrate *calibrate, CdDevice *device, GError **error)
 {
 	gboolean lcd_internal;
 	gboolean ret = TRUE;
@@ -316,15 +317,15 @@ gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GErro
 	GcmCalibratePrivate *priv = calibrate->priv;
 
 	/* get the device */
-	kind = gcm_device_get_kind (device);
-	serial = gcm_device_get_serial (device);
-	model = gcm_device_get_model (device);
-	description = gcm_device_get_title (device);
-	manufacturer = gcm_device_get_manufacturer (device);
+	kind = cd_device_get_kind (device);
+//	serial = cd_device_get_serial (device);
+	model = cd_device_get_model (device);
+//	description = cd_device_get_title (device);
+//	manufacturer = cd_device_get_manufacturer (device);
 
 	/* if we're a laptop, maybe use the dmi data instead */
 	if (kind == CD_DEVICE_KIND_DISPLAY) {
-//		native_device = gcm_device_xrandr_get_native_device (GCM_DEVICE_XRANDR (device));
+//		native_device = cd_device_xrandr_get_native_device (CD_DEVICE_XRANDR (device));
 		lcd_internal = gcm_utils_output_is_lcd_internal (native_device);
 		if (lcd_internal) {
 			model = gcm_dmi_get_name (priv->dmi);
@@ -346,7 +347,7 @@ gcm_calibrate_set_from_device (GcmCalibrate *calibrate, GcmDevice *device, GErro
 
 	/* display specific properties */
 	if (kind == CD_DEVICE_KIND_DISPLAY) {
-//		native_device = gcm_device_xrandr_get_native_device (GCM_DEVICE_XRANDR (device));
+//		native_device = cd_device_xrandr_get_native_device (CD_DEVICE_XRANDR (device));
 		if (native_device == NULL) {
 			g_set_error (error,
 				     GCM_CALIBRATE_ERROR,
diff --git a/src/gcm-calibrate.h b/src/gcm-calibrate.h
index 00f7a16..af14498 100644
--- a/src/gcm-calibrate.h
+++ b/src/gcm-calibrate.h
@@ -25,8 +25,6 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
-#include "gcm-device.h"
-
 G_BEGIN_DECLS
 
 #define GCM_TYPE_CALIBRATE		(gcm_calibrate_get_type ())
@@ -130,7 +128,7 @@ gboolean	 gcm_calibrate_spotread			(GcmCalibrate	*calibrate,
 							 GtkWindow	*window,
 							 GError		**error);
 gboolean	 gcm_calibrate_set_from_device		(GcmCalibrate	*calibrate,
-							 GcmDevice	*device,
+							 CdDevice	*device,
 							 GError		**error);
 gboolean	 gcm_calibrate_set_from_exif		(GcmCalibrate	*calibrate,
 							 const gchar	*filename,
diff --git a/src/gcm-device-xrandr.c b/src/gcm-device-xrandr.c
index 747b023..afbfe3b 100644
--- a/src/gcm-device-xrandr.c
+++ b/src/gcm-device-xrandr.c
@@ -19,17 +19,17 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-gboolean	 gcm_device_xrandr_set_from_output	(GcmDevice		*device,
+gboolean	 cd_device_xrandr_set_from_output	(CdDevice		*device,
 							 GcmX11Output		*output,
 							 GError			**error);
-void		 gcm_device_xrandr_set_remove_atom	(GcmDeviceXrandr	*device_xrandr,
+void		 cd_device_xrandr_set_remove_atom	(CdDeviceXrandr	*device_xrandr,
 							 gboolean		 remove_atom);
-const gchar	*gcm_device_xrandr_get_native_device	(GcmDeviceXrandr	*device_xrandr);
-const gchar	*gcm_device_xrandr_get_eisa_id		(GcmDeviceXrandr	*device_xrandr);
-const gchar	*gcm_device_xrandr_get_edid_md5		(GcmDeviceXrandr	*device_xrandr);
-gboolean	 gcm_device_xrandr_get_xrandr13		(GcmDeviceXrandr	*device_xrandr);
-gboolean	 gcm_device_xrandr_is_primary		(GcmDeviceXrandr	*device_xrandr);
-gboolean	 gcm_device_xrandr_reset		(GcmDeviceXrandr	*device_xrandr,
+const gchar	*cd_device_xrandr_get_native_device	(CdDeviceXrandr	*device_xrandr);
+const gchar	*cd_device_xrandr_get_eisa_id		(CdDeviceXrandr	*device_xrandr);
+const gchar	*cd_device_xrandr_get_edid_md5		(CdDeviceXrandr	*device_xrandr);
+gboolean	 cd_device_xrandr_get_xrandr13		(CdDeviceXrandr	*device_xrandr);
+gboolean	 cd_device_xrandr_is_primary		(CdDeviceXrandr	*device_xrandr);
+gboolean	 cd_device_xrandr_reset		(CdDeviceXrandr	*device_xrandr,
 							 GError			**error);
 
 #include <X11/extensions/Xrandr.h>
@@ -45,11 +45,11 @@ gboolean	 gcm_device_xrandr_reset		(GcmDeviceXrandr	*device_xrandr,
 #include "gcm-x11-screen.h"
 
 /**
- * GcmDeviceXrandrPrivate:
+ * CdDeviceXrandrPrivate:
  *
- * Private #GcmDeviceXrandr data
+ * Private #CdDeviceXrandr data
  **/
-struct _GcmDeviceXrandrPrivate
+struct _CdDeviceXrandrPrivate
 {
 	gchar				*native_device;
 	gchar				*eisa_id;
@@ -66,39 +66,39 @@ struct _GcmDeviceXrandrPrivate
 #define GCM_ICC_PROFILE_IN_X_VERSION_MINOR	3
 
 /**
- * gcm_device_xrandr_get_native_device:
+ * cd_device_xrandr_get_native_device:
  **/
 const gchar *
-gcm_device_xrandr_get_native_device (GcmDeviceXrandr *device_xrandr)
+cd_device_xrandr_get_native_device (CdDeviceXrandr *device_xrandr)
 {
 	return device_xrandr->priv->native_device;
 }
 
 /**
- * gcm_device_xrandr_get_eisa_id:
+ * cd_device_xrandr_get_eisa_id:
  **/
 const gchar *
-gcm_device_xrandr_get_eisa_id (GcmDeviceXrandr *device_xrandr)
+cd_device_xrandr_get_eisa_id (CdDeviceXrandr *device_xrandr)
 {
 	return device_xrandr->priv->eisa_id;
 }
 
 /**
- * gcm_device_xrandr_get_edid_md5:
+ * cd_device_xrandr_get_edid_md5:
  **/
 const gchar *
-gcm_device_xrandr_get_edid_md5 (GcmDeviceXrandr *device_xrandr)
+cd_device_xrandr_get_edid_md5 (CdDeviceXrandr *device_xrandr)
 {
 	return device_xrandr->priv->edid_md5;
 }
 
 /**
- * gcm_device_xrandr_get_output_name:
+ * cd_device_xrandr_get_output_name:
  *
  * Return value: the output name, free with g_free().
  **/
 static gchar *
-gcm_device_xrandr_get_output_name (GcmDeviceXrandr *device_xrandr, GcmX11Output *output)
+cd_device_xrandr_get_output_name (CdDeviceXrandr *device_xrandr, GcmX11Output *output)
 {
 	const gchar *output_name;
 	const gchar *name;
@@ -107,7 +107,7 @@ gcm_device_xrandr_get_output_name (GcmDeviceXrandr *device_xrandr, GcmX11Output
 	gboolean ret;
 	guint width = 0;
 	guint height = 0;
-	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
+	CdDeviceXrandrPrivate *priv = device_xrandr->priv;
 
 	/* blank */
 	string = g_string_new ("");
@@ -163,10 +163,10 @@ out:
 }
 
 /**
- * gcm_device_xrandr_get_id_for_xrandr_device:
+ * cd_device_xrandr_get_id_for_xrandr_device:
  **/
 static gchar *
-gcm_device_xrandr_get_id_for_xrandr_device (GcmDeviceXrandr *device_xrandr, GcmX11Output *output)
+cd_device_xrandr_get_id_for_xrandr_device (CdDeviceXrandr *device_xrandr, GcmX11Output *output)
 {
 	const gchar *output_name;
 	const gchar *name;
@@ -175,7 +175,7 @@ gcm_device_xrandr_get_id_for_xrandr_device (GcmDeviceXrandr *device_xrandr, GcmX
 	const gchar *serial;
 	GString *string;
 	gboolean ret;
-	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
+	CdDeviceXrandrPrivate *priv = device_xrandr->priv;
 
 	/* blank */
 	string = g_string_new ("xrandr");
@@ -214,10 +214,10 @@ out:
 }
 
 /**
- * gcm_device_xrandr_set_from_output:
+ * cd_device_xrandr_set_from_output:
  **/
 gboolean
-gcm_device_xrandr_set_from_output (GcmDevice *device, GcmX11Output *output, GError **error)
+cd_device_xrandr_set_from_output (CdDevice *device, GcmX11Output *output, GError **error)
 {
 	gchar *title = NULL;
 	gchar *id = NULL;
@@ -230,7 +230,7 @@ gcm_device_xrandr_set_from_output (GcmDevice *device, GcmX11Output *output, GErr
 	guint8 *data = NULL;
 	gsize length;
 	guint major, minor;
-	GcmDeviceXrandrPrivate *priv = GCM_DEVICE_XRANDR(device)->priv;
+	CdDeviceXrandrPrivate *priv = CD_DEVICE_XRANDR(device)->priv;
 
 	/* parse the EDID to get a output specific name */
 	ret = gcm_x11_output_get_edid_data (output, &data, &length, NULL);
@@ -246,7 +246,7 @@ gcm_device_xrandr_set_from_output (GcmDevice *device, GcmX11Output *output, GErr
 	}
 
 	/* get details */
-	id = gcm_device_xrandr_get_id_for_xrandr_device (GCM_DEVICE_XRANDR(device), output);
+	id = cd_device_xrandr_get_id_for_xrandr_device (CD_DEVICE_XRANDR(device), output);
 	g_debug ("asking to add %s", id);
 
 	/* get data about the display */
@@ -263,10 +263,10 @@ gcm_device_xrandr_set_from_output (GcmDevice *device, GcmX11Output *output, GErr
 		model = gcm_dmi_get_version (priv->dmi);
 
 	/* add new device */
-	title = gcm_device_xrandr_get_output_name (GCM_DEVICE_XRANDR(device), output);
+	title = cd_device_xrandr_get_output_name (CD_DEVICE_XRANDR(device), output);
 	g_object_set (device,
 		      "kind", CD_DEVICE_KIND_DISPLAY,
-		      "colorspace", GCM_COLORSPACE_RGB,
+		      "colorspace", CD_COLORSPACE_RGB,
 		      "id", id,
 		      "connected", TRUE,
 		      "serial", serial,
@@ -290,17 +290,17 @@ out:
 }
 
 /**
- * gcm_device_xrandr_generate_profile:
+ * cd_device_xrandr_generate_profile:
  **/
 static GcmProfile *
-gcm_device_xrandr_generate_profile (GcmDevice *device, GError **error)
+cd_device_xrandr_generate_profile (CdDevice *device, GError **error)
 {
 	gboolean ret;
 	const gchar *data;
 	gchar *title = NULL;
 	GcmProfile *profile;
-	GcmDeviceXrandr *device_xrandr = GCM_DEVICE_XRANDR (device);
-	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
+	CdDeviceXrandr *device_xrandr = CD_DEVICE_XRANDR (device);
+	CdDeviceXrandrPrivate *priv = device_xrandr->priv;
 
 	/* create new profile */
 	profile = gcm_profile_new ();
@@ -321,7 +321,7 @@ gcm_device_xrandr_generate_profile (GcmDevice *device, GError **error)
 	gcm_profile_set_model (profile, data);
 
 	/* TRANSLATORS: this is prepended to the device title to let the use know it was generated by us automatically */
-	title = g_strdup_printf ("%s, %s", _("Automatic"), gcm_device_get_title (device));
+	title = g_strdup_printf ("%s, %s", _("Automatic"), cd_device_get_title (device));
 	gcm_profile_set_description (profile, title);
 
 	/* generate a profile from the chroma data */
@@ -360,14 +360,14 @@ out:
 }
 
 /**
- * gcm_device_xrandr_reset:
+ * cd_device_xrandr_reset:
  *
  * Clears any VCGT table, so we're ready for profiling
  *
  * Return value: %TRUE for success;
  **/
 gboolean
-gcm_device_xrandr_reset (GcmDeviceXrandr *device_xrandr, GError **error)
+cd_device_xrandr_reset (CdDeviceXrandr *device_xrandr, GError **error)
 {
 	const gchar *id;
 	const gchar *output_name;
@@ -376,18 +376,18 @@ gcm_device_xrandr_reset (GcmDeviceXrandr *device_xrandr, GError **error)
 	CdDeviceKind kind;
 	GcmX11Output *output;
 	guint size;
-	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
+	CdDeviceXrandrPrivate *priv = device_xrandr->priv;
 
 	/* 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));
+	id = cd_device_get_id (CD_DEVICE (device_xrandr));
+	kind = cd_device_get_kind (CD_DEVICE (device_xrandr));
 	if (kind != CD_DEVICE_KIND_DISPLAY) {
 		g_set_error (error, 1, 0, "not a display: %s", id);
 		goto out;
 	}
 
 	/* should be set for display types */
-	output_name = gcm_device_xrandr_get_native_device (device_xrandr);
+	output_name = cd_device_xrandr_get_native_device (device_xrandr);
 	if (output_name == NULL || output_name[0] == '\0') {
 		g_set_error (error, 1, 0, "no output name for display: %s", id);
 		goto out;
@@ -414,12 +414,12 @@ out:
 }
 
 /**
- * gcm_device_xrandr_apply:
+ * cd_device_xrandr_apply:
  *
  * Return value: %TRUE for success;
  **/
 static gboolean
-gcm_device_xrandr_apply (GcmDevice *device, GError **error)
+cd_device_xrandr_apply (CdDevice *device, GError **error)
 {
 	gboolean ret = FALSE;
 	GcmClut *clut = NULL;
@@ -440,27 +440,27 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
 	gboolean leftmost_screen = FALSE;
 	GFile *file = NULL;
 	CdDeviceKind kind;
-	GcmDeviceXrandr *device_xrandr = GCM_DEVICE_XRANDR (device);
-	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
+	CdDeviceXrandr *device_xrandr = CD_DEVICE_XRANDR (device);
+	CdDeviceXrandrPrivate *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);
+	id = cd_device_get_id (device);
+	kind = cd_device_get_kind (device);
 	if (kind != CD_DEVICE_KIND_DISPLAY) {
 		g_set_error (error, 1, 0, "not a display: %s", id);
 		goto out;
 	}
 
 	/* should be set for display types */
-	output_name = gcm_device_xrandr_get_native_device (device_xrandr);
+	output_name = cd_device_xrandr_get_native_device (device_xrandr);
 	if (output_name == NULL || output_name[0] == '\0') {
 		g_set_error (error, 1, 0, "no output name for display: %s", id);
 		goto out;
 	}
 
 	/* if not saved, try to find default profile */
-	saved = gcm_device_get_saved (device);
-	profile = gcm_device_get_default_profile (device);
+	saved = cd_device_get_saved (device);
+	profile = cd_device_get_default_profile (device);
 	if (profile != NULL)
 		g_object_ref (profile);
 	if (!saved && profile == NULL) {
@@ -496,9 +496,9 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
 
 	/* do fine adjustment */
 	if (use_global) {
-		gamma_adjust = gcm_device_get_gamma (device);
-		brightness = gcm_device_get_brightness (device);
-		contrast = gcm_device_get_contrast (device);
+		gamma_adjust = cd_device_get_gamma (device);
+		brightness = cd_device_get_brightness (device);
+		contrast = cd_device_get_contrast (device);
 		g_object_set (clut,
 			      "gamma", gamma_adjust,
 			      "brightness", brightness,
@@ -570,12 +570,12 @@ out:
 }
 
 /**
- * gcm_device_xrandr_init:
+ * cd_device_xrandr_init:
  **/
 static void
-gcm_device_xrandr_init (GcmDeviceXrandr *device_xrandr)
+cd_device_xrandr_init (CdDeviceXrandr *device_xrandr)
 {
-	device_xrandr->priv = GCM_DEVICE_XRANDR_GET_PRIVATE (device_xrandr);
+	device_xrandr->priv = CD_DEVICE_XRANDR_GET_PRIVATE (device_xrandr);
 	device_xrandr->priv->native_device = NULL;
 	device_xrandr->priv->eisa_id = NULL;
 	device_xrandr->priv->edid_md5 = NULL;
@@ -587,13 +587,13 @@ gcm_device_xrandr_init (GcmDeviceXrandr *device_xrandr)
 }
 
 /**
- * gcm_device_xrandr_finalize:
+ * cd_device_xrandr_finalize:
  **/
 static void
-gcm_device_xrandr_finalize (GObject *object)
+cd_device_xrandr_finalize (GObject *object)
 {
-	GcmDeviceXrandr *device_xrandr = GCM_DEVICE_XRANDR (object);
-	GcmDeviceXrandrPrivate *priv = device_xrandr->priv;
+	CdDeviceXrandr *device_xrandr = CD_DEVICE_XRANDR (object);
+	CdDeviceXrandrPrivate *priv = device_xrandr->priv;
 
 	g_free (priv->native_device);
 	g_free (priv->eisa_id);
@@ -602,5 +602,5 @@ gcm_device_xrandr_finalize (GObject *object)
 	g_object_unref (priv->dmi);
 	g_object_unref (priv->screen);
 
-	G_OBJECT_CLASS (gcm_device_xrandr_parent_class)->finalize (object);
+	G_OBJECT_CLASS (cd_device_xrandr_parent_class)->finalize (object);
 }
diff --git a/src/gcm-exif.h b/src/gcm-exif.h
index c12bc48..2df670e 100644
--- a/src/gcm-exif.h
+++ b/src/gcm-exif.h
@@ -26,8 +26,6 @@
 #include <gio/gio.h>
 #include <colord.h>
 
-#include "gcm-enum.h"
-
 G_BEGIN_DECLS
 
 #define GCM_TYPE_EXIF		(gcm_exif_get_type ())
diff --git a/src/gcm-image.c b/src/gcm-image.c
index b338271..ff847e2 100644
--- a/src/gcm-image.c
+++ b/src/gcm-image.c
@@ -170,7 +170,7 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 	} else if (priv->input_profile != NULL) {
 
 		/* not RGB */
-		if (gcm_profile_get_colorspace (priv->input_profile) != GCM_COLORSPACE_RGB) {
+		if (gcm_profile_get_colorspace (priv->input_profile) != CD_COLORSPACE_RGB) {
 			g_warning ("input colorspace has to be RGB!");
 			goto out;
 		}
@@ -189,7 +189,7 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 	if (priv->output_profile != NULL) {
 
 		/* not RGB */
-		if (gcm_profile_get_colorspace (priv->output_profile) != GCM_COLORSPACE_RGB) {
+		if (gcm_profile_get_colorspace (priv->output_profile) != CD_COLORSPACE_RGB) {
 			g_warning ("output colorspace has to be RGB!");
 			goto out;
 		}
@@ -209,7 +209,7 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 		cmsHPROFILE profiles[3];
 
 		/* not LAB */
-		if (gcm_profile_get_colorspace (priv->abstract_profile) != GCM_COLORSPACE_LAB) {
+		if (gcm_profile_get_colorspace (priv->abstract_profile) != CD_COLORSPACE_LAB) {
 			g_warning ("abstract profile has to be LAB!");
 			goto out;
 		}
diff --git a/src/gcm-import.c b/src/gcm-import.c
index 5d64c70..d9ba529 100644
--- a/src/gcm-import.c
+++ b/src/gcm-import.c
@@ -67,7 +67,7 @@ main (int argc, char **argv)
 	GcmProfileStore *profile_store = NULL;
 	GcmProfile *profile = NULL;
 	GcmProfile *profile_tmp = NULL;
-	GcmColorspace colorspace;
+	CdColorspace colorspace;
 	GError *error = NULL;
 	GOptionContext *context;
 	GString *string = NULL;
@@ -189,7 +189,7 @@ main (int argc, char **argv)
 	gcm_import_add_cie_widget (GTK_DIALOG(dialog), cie_widget);
 
 	/* only show the cie widget if we have RGB data */
-	if (colorspace != GCM_COLORSPACE_RGB)
+	if (colorspace != CD_COLORSPACE_RGB)
 		gtk_widget_hide (cie_widget);
 
 	gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
diff --git a/src/gcm-list-store-profiles.c b/src/gcm-list-store-profiles.c
index 84fafea..a89cc4b 100644
--- a/src/gcm-list-store-profiles.c
+++ b/src/gcm-list-store-profiles.c
@@ -23,8 +23,8 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#include "gcm-device.h"
 #include "gcm-list-store-profiles.h"
+#include "gcm-profile.h"
 
 G_DEFINE_TYPE (GcmListStoreProfiles, gcm_list_store_profiles, GTK_TYPE_LIST_STORE);
 
@@ -32,7 +32,7 @@ G_DEFINE_TYPE (GcmListStoreProfiles, gcm_list_store_profiles, GTK_TYPE_LIST_STOR
 
 struct GcmListStoreProfilesPrivate
 {
-	GcmDevice		*device;
+	CdDevice		*device;
 	guint			 changed_id;
 };
 
@@ -71,7 +71,7 @@ gcm_list_store_refresh_profiles (GtkListStore *list_store)
 	gtk_list_store_clear (list_store);
 
 	/* add profiles for the device */
-	profiles = gcm_device_get_profiles (priv->device);
+	profiles = cd_device_get_profiles (priv->device);
 	for (i=0; i<profiles->len; i++) {
 		profile = g_ptr_array_index (profiles, i);
 		gtk_list_store_append (list_store, &iter);
@@ -90,7 +90,7 @@ gcm_list_store_refresh_profiles (GtkListStore *list_store)
  * gcm_list_store_profiles_device_changed_cb:
  **/
 static void
-gcm_list_store_profiles_device_changed_cb (GcmDevice *device, GtkListStore *list_store)
+gcm_list_store_profiles_device_changed_cb (CdDevice *device, GtkListStore *list_store)
 {
 	gcm_list_store_refresh_profiles (list_store);
 }
@@ -99,7 +99,7 @@ gcm_list_store_profiles_device_changed_cb (GcmDevice *device, GtkListStore *list
  * gcm_list_store_profiles_set_from_device:
  **/
 void
-gcm_list_store_profiles_set_from_device (GtkListStore *list_store, GcmDevice *device)
+gcm_list_store_profiles_set_from_device (GtkListStore *list_store, CdDevice *device)
 {
 	GcmListStoreProfilesPrivate *priv = GCM_LIST_STORE_PROFILES(list_store)->priv;
 
diff --git a/src/gcm-list-store-profiles.h b/src/gcm-list-store-profiles.h
index 47440a2..73fcab4 100644
--- a/src/gcm-list-store-profiles.h
+++ b/src/gcm-list-store-profiles.h
@@ -23,7 +23,7 @@
 #define __GCM_LIST_STORE_PROFILES_H__
 
 #include <gtk/gtk.h>
-#include <gcm-device.h>
+#include <colord.h>
 
 G_BEGIN_DECLS
 
@@ -60,7 +60,7 @@ struct GcmListStoreProfilesClass
 GType		 gcm_list_store_profiles_get_type		(void);
 GtkListStore	*gcm_list_store_profiles_new			(void);
 void		 gcm_list_store_profiles_set_from_device	(GtkListStore	*list_store,
-								 GcmDevice	*device);
+								 CdDevice	*device);
 
 G_END_DECLS
 
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index 762e1fa..6e96fb3 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -30,6 +30,7 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <lcms2.h>
+#include <colord.h>
 
 #include "gcm-calibrate-argyll.h"
 #include "gcm-sensor-client.h"
@@ -483,7 +484,7 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 	GcmProfile *profile;
 	guint i;
 	const gchar *filename;
-	GcmColorspace colorspace;
+	CdColorspace colorspace;
 	gboolean has_profile = FALSE;
 	gboolean has_vcgt;
 	gboolean has_colorspace_description;
@@ -504,7 +505,7 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 		has_colorspace_description = gcm_profile_has_colorspace_description (profile);
 		colorspace = gcm_profile_get_colorspace (profile);
 		if (!has_vcgt && has_colorspace_description &&
-		    colorspace == GCM_COLORSPACE_RGB) {
+		    colorspace == CD_COLORSPACE_RGB) {
 			gcm_prefs_combobox_add_profile (widget, profile, &iter);
 
 			/* set active option */
@@ -517,7 +518,7 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 	if (!has_profile) {
 		/* TRANSLATORS: this is when there are no profiles that can be used; the search term is either "RGB" or "CMYK" */
 		text = g_strdup_printf (_("No %s color spaces available"),
-					gcm_colorspace_to_localised_string (GCM_COLORSPACE_RGB));
+					cd_colorspace_to_localised_string (CD_COLORSPACE_RGB));
 		model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 		gtk_list_store_append (GTK_LIST_STORE(model), &iter);
 		gtk_list_store_set (GTK_LIST_STORE(model), &iter,
diff --git a/src/gcm-profile.c b/src/gcm-profile.c
index a4e79ab..547941c 100644
--- a/src/gcm-profile.c
+++ b/src/gcm-profile.c
@@ -51,7 +51,7 @@ struct _GcmProfilePrivate
 {
 	gboolean		 loaded;
 	CdProfileKind		 kind;
-	GcmColorspace		 colorspace;
+	CdColorspace		 colorspace;
 	guint			 size;
 	gboolean		 has_vcgt;
 	gboolean		 can_delete;
@@ -179,7 +179,7 @@ gcm_profile_set_description (GcmProfile *profile, const gchar *description)
  * Finds out if the profile contains a colorspace description.
  *
  * Return value: %TRUE if the description mentions the profile colorspace explicity,
- * e.g. "Adobe RGB" for %GCM_COLORSPACE_RGB.
+ * e.g. "Adobe RGB" for %CD_COLORSPACE_RGB.
  **/
 gboolean
 gcm_profile_has_colorspace_description (GcmProfile *profile)
@@ -188,9 +188,9 @@ gcm_profile_has_colorspace_description (GcmProfile *profile)
 	g_return_val_if_fail (GCM_IS_PROFILE (profile), FALSE);
 
 	/* for each profile type */
-	if (priv->colorspace == GCM_COLORSPACE_RGB)
+	if (priv->colorspace == CD_COLORSPACE_RGB)
 		return (g_strstr_len (priv->description, -1, "RGB") != NULL);
-	if (priv->colorspace == GCM_COLORSPACE_CMYK)
+	if (priv->colorspace == CD_COLORSPACE_CMYK)
 		return (g_strstr_len (priv->description, -1, "CMYK") != NULL);
 
 	/* nothing */
@@ -553,10 +553,10 @@ gcm_profile_set_kind (GcmProfile *profile, CdProfileKind kind)
 /**
  * gcm_profile_get_colorspace:
  **/
-GcmColorspace
+CdColorspace
 gcm_profile_get_colorspace (GcmProfile *profile)
 {
-	g_return_val_if_fail (GCM_IS_PROFILE (profile), GCM_COLORSPACE_UNKNOWN);
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), CD_COLORSPACE_UNKNOWN);
 	return profile->priv->colorspace;
 }
 
@@ -564,7 +564,7 @@ gcm_profile_get_colorspace (GcmProfile *profile)
  * gcm_profile_set_colorspace:
  **/
 void
-gcm_profile_set_colorspace (GcmProfile *profile, GcmColorspace colorspace)
+gcm_profile_set_colorspace (GcmProfile *profile, CdColorspace colorspace)
 {
 	g_return_if_fail (GCM_IS_PROFILE (profile));
 	profile->priv->colorspace = colorspace;
@@ -645,7 +645,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 	gboolean ret = FALSE;
 	cmsProfileClassSignature profile_class;
 	cmsColorSpaceSignature color_space;
-	GcmColorspace colorspace;
+	CdColorspace colorspace;
 	CdProfileKind profile_kind;
 	cmsCIEXYZ *cie_xyz;
 	cmsCIEXYZTRIPLE cie_illum;
@@ -749,37 +749,37 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 	color_space = cmsGetColorSpace (priv->lcms_profile);
 	switch (color_space) {
 	case cmsSigXYZData:
-		colorspace = GCM_COLORSPACE_XYZ;
+		colorspace = CD_COLORSPACE_XYZ;
 		break;
 	case cmsSigLabData:
-		colorspace = GCM_COLORSPACE_LAB;
+		colorspace = CD_COLORSPACE_LAB;
 		break;
 	case cmsSigLuvData:
-		colorspace = GCM_COLORSPACE_LUV;
+		colorspace = CD_COLORSPACE_LUV;
 		break;
 	case cmsSigYCbCrData:
-		colorspace = GCM_COLORSPACE_YCBCR;
+		colorspace = CD_COLORSPACE_YCBCR;
 		break;
 	case cmsSigYxyData:
-		colorspace = GCM_COLORSPACE_YXY;
+		colorspace = CD_COLORSPACE_YXY;
 		break;
 	case cmsSigRgbData:
-		colorspace = GCM_COLORSPACE_RGB;
+		colorspace = CD_COLORSPACE_RGB;
 		break;
 	case cmsSigGrayData:
-		colorspace = GCM_COLORSPACE_GRAY;
+		colorspace = CD_COLORSPACE_GRAY;
 		break;
 	case cmsSigHsvData:
-		colorspace = GCM_COLORSPACE_HSV;
+		colorspace = CD_COLORSPACE_HSV;
 		break;
 	case cmsSigCmykData:
-		colorspace = GCM_COLORSPACE_CMYK;
+		colorspace = CD_COLORSPACE_CMYK;
 		break;
 	case cmsSigCmyData:
-		colorspace = GCM_COLORSPACE_CMY;
+		colorspace = CD_COLORSPACE_CMY;
 		break;
 	default:
-		colorspace = GCM_COLORSPACE_UNKNOWN;
+		colorspace = CD_COLORSPACE_UNKNOWN;
 	}
 	gcm_profile_set_colorspace (profile, colorspace);
 
@@ -1072,7 +1072,7 @@ gcm_profile_save (GcmProfile *profile, const gchar *filename, GError **error)
 	}
 
 	/* this is all we support writing */
-	if (priv->colorspace == GCM_COLORSPACE_RGB) {
+	if (priv->colorspace == CD_COLORSPACE_RGB) {
 		cmsSetColorSpace (priv->lcms_profile, cmsSigRgbData);
 		cmsSetPCS (priv->lcms_profile, cmsSigLabData);
 	}
@@ -1444,12 +1444,12 @@ gcm_profile_generate_curve (GcmProfile *profile, guint size)
 	cmsHPROFILE srgb_profile = NULL;
 	cmsHTRANSFORM transform = NULL;
 	guint type;
-	GcmColorspace colorspace;
+	CdColorspace colorspace;
 	GcmProfilePrivate *priv = profile->priv;
 
 	/* run through the profile */
 	colorspace = gcm_profile_get_colorspace (profile);
-	if (colorspace == GCM_COLORSPACE_RGB) {
+	if (colorspace == CD_COLORSPACE_RGB) {
 
 		/* RGB */
 		component_width = 3;
@@ -1853,7 +1853,7 @@ gcm_profile_init (GcmProfile *profile)
 	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 = CD_PROFILE_KIND_UNKNOWN;
-	profile->priv->colorspace = GCM_COLORSPACE_UNKNOWN;
+	profile->priv->colorspace = CD_COLORSPACE_UNKNOWN;
 	profile->priv->white = gcm_color_new_XYZ ();
 	profile->priv->black = gcm_color_new_XYZ ();
 	profile->priv->red = gcm_color_new_XYZ ();
diff --git a/src/gcm-profile.h b/src/gcm-profile.h
index f07561b..1e98191 100644
--- a/src/gcm-profile.h
+++ b/src/gcm-profile.h
@@ -27,7 +27,6 @@
 #include <colord.h>
 
 #include "gcm-clut.h"
-#include "gcm-enum.h"
 #include "gcm-color.h"
 
 G_BEGIN_DECLS
@@ -126,9 +125,9 @@ guint		 gcm_profile_get_size			(GcmProfile	*profile);
 CdProfileKind	 gcm_profile_get_kind			(GcmProfile	*profile);
 void		 gcm_profile_set_kind			(GcmProfile	*profile,
 							 CdProfileKind	 kind);
-GcmColorspace	 gcm_profile_get_colorspace		(GcmProfile	*profile);
+CdColorspace	 gcm_profile_get_colorspace		(GcmProfile	*profile);
 void		 gcm_profile_set_colorspace		(GcmProfile	*profile,
-							 GcmColorspace	 colorspace);
+							 CdColorspace	 colorspace);
 gboolean	 gcm_profile_get_has_vcgt		(GcmProfile	*profile);
 gboolean	 gcm_profile_has_colorspace_description	(GcmProfile	*profile);
 guint		 gcm_profile_get_temperature		(GcmProfile	*profile);
diff --git a/src/gcm-self-test.c b/src/gcm-self-test.c
index 6bc15e0..1c76c55 100644
--- a/src/gcm-self-test.c
+++ b/src/gcm-self-test.c
@@ -422,7 +422,7 @@ gcm_test_profile_func (void)
 	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), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
-	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, GCM_COLORSPACE_RGB);
+	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, CD_COLORSPACE_RGB);
 	g_assert_cmpint (gcm_profile_get_temperature (profile), ==, 6500);
 	g_assert (gcm_profile_get_has_vcgt (profile));
 
@@ -453,7 +453,7 @@ gcm_test_profile_func (void)
 	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), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
-	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, GCM_COLORSPACE_RGB);
+	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, CD_COLORSPACE_RGB);
 	g_assert_cmpint (gcm_profile_get_temperature (profile), ==, 6500);
 	g_assert (gcm_profile_get_has_vcgt (profile));
 
@@ -496,7 +496,7 @@ gcm_test_profile_func (void)
 	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), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
-	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, GCM_COLORSPACE_RGB);
+	g_assert_cmpint (gcm_profile_get_colorspace (profile), ==, CD_COLORSPACE_RGB);
 	g_assert_cmpint (gcm_profile_get_temperature (profile), ==, 5000);
 	g_assert (gcm_profile_get_has_vcgt (profile));
 
@@ -958,7 +958,7 @@ gcm_test_calibrate_native_func (void)
 	GcmCalibrate *calibrate;
 	CdClient *client;
 	GcmX11Screen *screen;
-	GcmDevice *device;
+	CdDevice *device;
 	gchar *contents;
 	gchar *filename = NULL;
 
@@ -1002,7 +1002,7 @@ gcm_test_calibrate_native_func (void)
 	g_assert (ret);
 
 	/* clear any VCGT */
-	ret = gcm_device_xrandr_reset (GCM_DEVICE_XRANDR (device), &error);
+	ret = cd_device_xrandr_reset (CD_DEVICE_XRANDR (device), &error);
 	g_assert_no_error (error);
 	g_assert (ret);
 
@@ -1120,7 +1120,7 @@ gcm_test_cie_widget_func (void)
 static guint _changes = 0;
 
 static void
-gcm_device_test_changed_cb (GcmDevice *device)
+cd_device_test_changed_cb (CdDevice *device)
 {
 	_changes++;
 	_g_test_loop_quit ();
@@ -1129,7 +1129,7 @@ gcm_device_test_changed_cb (GcmDevice *device)
 static void
 gcm_test_device_func (void)
 {
-	GcmDevice *device;
+	CdDevice *device;
 	gboolean ret;
 	GError *error = NULL;
 	gchar *filename;
@@ -1142,11 +1142,11 @@ gcm_test_device_func (void)
 	GcmX11Screen *screen;
 	GcmX11Output *output;
 
-	device = gcm_device_xrandr_new ();
+	device = cd_device_xrandr_new ();
 	g_assert (device != NULL);
 
 	/* connect to the changed signal */
-	g_signal_connect (device, "changed", G_CALLBACK (gcm_device_test_changed_cb), NULL);
+	g_signal_connect (device, "changed", G_CALLBACK (cd_device_test_changed_cb), NULL);
 
 	g_assert_cmpint (_changes, ==, 0);
 
@@ -1163,33 +1163,33 @@ gcm_test_device_func (void)
 		      "connected", FALSE,
 		      "virtual", FALSE,
 		      "serial", "0123456789",
-		      "colorspace", GCM_COLORSPACE_RGB,
+		      "colorspace", CD_COLORSPACE_RGB,
 		      NULL);
 
 	_g_test_loop_run_with_timeout (1000);
 
 	g_assert_cmpint (_changes, ==, 1);
 
-	gcm_device_set_connected (device, TRUE);
+	cd_device_set_connected (device, TRUE);
 
 	_g_test_loop_run_with_timeout (1000);
 
 	g_assert_cmpint (_changes, ==, 2);
 
-	g_assert_cmpstr (gcm_device_get_id (device), ==, "sysfs_dummy_device");
+	g_assert_cmpstr (cd_device_get_id (device), ==, "sysfs_dummy_device");
 
 	/* missing file */
-	ret = gcm_device_load (device, &error);
+	ret = cd_device_load (device, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
 
-	g_assert_cmpstr (gcm_device_get_default_profile_filename (device), ==, NULL);
+	g_assert_cmpstr (cd_device_get_default_profile_filename (device), ==, NULL);
 
 	/* empty file that exists */
 	g_file_set_contents (filename, "", -1, NULL);
 
 	/* load from empty file */
-	ret = gcm_device_load (device, &error);
+	ret = cd_device_load (device, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
 
@@ -1202,7 +1202,7 @@ gcm_test_device_func (void)
 				    TESTDATADIR "/AdobeGammaTest.icm");
 	g_file_set_contents (filename, contents, -1, NULL);
 
-	ret = gcm_device_load (device, &error);
+	ret = cd_device_load (device, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
 
@@ -1212,9 +1212,9 @@ gcm_test_device_func (void)
 	g_assert_cmpint (_changes, ==, 3);
 
 	/* get some properties */
-	profile_filename = gcm_device_get_default_profile_filename (device);
+	profile_filename = cd_device_get_default_profile_filename (device);
 	gcm_test_assert_basename (profile_filename, TESTDATADIR "/bluish.icc");
-	profiles = gcm_device_get_profiles (device);
+	profiles = cd_device_get_profiles (device);
 	g_assert_cmpint (profiles->len, ==, 2);
 
 	profile = g_ptr_array_index (profiles, 0);
@@ -1226,13 +1226,13 @@ gcm_test_device_func (void)
 	gcm_test_assert_basename (gcm_profile_get_filename (profile), TESTDATADIR "/AdobeGammaTest.icm");
 
 	/* set some properties */
-	gcm_device_set_default_profile_filename (device, TESTDATADIR "/bluish.icc");
+	cd_device_set_default_profile_filename (device, TESTDATADIR "/bluish.icc");
 
 	/* ensure the file is nuked, again */
 	g_unlink (filename);
 
 	/* save to empty file */
-	ret = gcm_device_save (device, &error);
+	ret = cd_device_save (device, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
 
@@ -1256,7 +1256,7 @@ gcm_test_device_func (void)
 	g_object_unref (device);
 
 	/* test auto-generation of the profile */
-	device = gcm_device_xrandr_new ();
+	device = cd_device_xrandr_new ();
 	screen = gcm_x11_screen_new ();
 	ret = gcm_x11_screen_assign (screen, NULL, &error);
 	g_assert_no_error (error);
@@ -1267,13 +1267,13 @@ gcm_test_device_func (void)
 	g_object_unref (screen);
 
 	/* setup device */
-	ret = gcm_device_xrandr_set_from_output (device, output, &error);
+	ret = cd_device_xrandr_set_from_output (device, output, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
 	g_object_unref (output);
 
 	/* generate profile */
-	profile = gcm_device_generate_profile (device, &error);
+	profile = cd_device_generate_profile (device, &error);
 	g_assert_no_error (error);
 	g_assert (profile != NULL);
 
@@ -1512,7 +1512,7 @@ gcm_test_client_func (void)
 	GError *error = NULL;
 	gboolean ret;
 	GPtrArray *array;
-	GcmDevice *device;
+	CdDevice *device;
 	gchar *contents;
 	gchar *filename;
 	gchar *data = NULL;
@@ -1540,18 +1540,18 @@ gcm_test_client_func (void)
 	g_assert (array != NULL);
 	g_assert_cmpint (array->len, ==, 1);
 	device = g_ptr_array_index (array, 0);
-	g_assert_cmpstr (gcm_device_get_id (device), ==, "xrandr_goldstar");
-	g_assert_cmpstr (gcm_device_get_title (device), ==, "Goldstar");
-	gcm_test_assert_basename (gcm_device_get_default_profile_filename (device), TESTDATADIR "/bluish.icc");
-	g_assert (gcm_device_get_saved (device));
-	g_assert (!gcm_device_get_connected (device));
+	g_assert_cmpstr (cd_device_get_id (device), ==, "xrandr_goldstar");
+	g_assert_cmpstr (cd_device_get_title (device), ==, "Goldstar");
+	gcm_test_assert_basename (cd_device_get_default_profile_filename (device), TESTDATADIR "/bluish.icc");
+	g_assert (cd_device_get_saved (device));
+	g_assert (!cd_device_get_connected (device));
 	g_assert (GCM_IS_DEVICE_XRANDR (device));
 	g_ptr_array_unref (array);
 
-	device = gcm_device_xrandr_new ();
-	gcm_device_set_id (device, "xrandr_goldstar");
-	gcm_device_set_title (device, "Slightly different");
-	gcm_device_set_connected (device, TRUE);
+	device = cd_device_xrandr_new ();
+	cd_device_set_id (device, "xrandr_goldstar");
+	cd_device_set_title (device, "Slightly different");
+	cd_device_set_connected (device, TRUE);
 	ret = cd_client_add_device (client, device, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
@@ -1560,15 +1560,15 @@ gcm_test_client_func (void)
 	array = cd_client_get_devices (client);
 	g_assert_cmpint (array->len, ==, 1);
 	device = g_ptr_array_index (array, 0);
-	g_assert_cmpstr (gcm_device_get_id (device), ==, "xrandr_goldstar");
-	g_assert_cmpstr (gcm_device_get_title (device), ==, "Slightly different");
-	gcm_test_assert_basename (gcm_device_get_default_profile_filename (device), TESTDATADIR "/bluish.icc");
-	g_assert (gcm_device_get_saved (device));
-	g_assert (gcm_device_get_connected (device));
+	g_assert_cmpstr (cd_device_get_id (device), ==, "xrandr_goldstar");
+	g_assert_cmpstr (cd_device_get_title (device), ==, "Slightly different");
+	gcm_test_assert_basename (cd_device_get_default_profile_filename (device), TESTDATADIR "/bluish.icc");
+	g_assert (cd_device_get_saved (device));
+	g_assert (cd_device_get_connected (device));
 	g_ptr_array_unref (array);
 
 	/* delete */
-	gcm_device_set_connected (device, FALSE);
+	cd_device_set_connected (device, FALSE);
 	ret = cd_client_delete_device (client, device, &error);
 	g_assert_no_error (error);
 	g_assert (ret);
diff --git a/src/gcm-session.c b/src/gcm-session.c
index c35a152..e48c6fa 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -29,7 +29,6 @@
 #include <libnotify/notify.h>
 
 #include "gcm-debug.h"
-#include "gcm-device.h"
 #include "gcm-exif.h"
 #include "gcm-profile-store.h"
 #include "gcm-utils.h"
@@ -102,7 +101,7 @@ gcm_session_notify_recalibrate (const gchar *title, const gchar *message, CdDevi
  * gcm_session_notify_device:
  **/
 static void
-gcm_session_notify_device (GcmDevice *device)
+gcm_session_notify_device (CdDevice *device)
 {
 	gchar *message;
 	const gchar *title;
@@ -118,25 +117,25 @@ gcm_session_notify_device (GcmDevice *device)
 	title = _("Recalibration required");
 
 	/* check we care */
-	kind = gcm_device_get_kind (device);
+	kind = cd_device_get_kind (device);
 	if (kind == CD_DEVICE_KIND_DISPLAY) {
 
 		/* get from GSettings */
 		threshold = g_settings_get_int (settings, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD);
 
 		/* TRANSLATORS: this is when the display has not been recalibrated in a while */
-		message = g_strdup_printf (_("The display '%s' should be recalibrated soon."), gcm_device_get_title (device));
+		message = g_strdup_printf (_("The display '%s' should be recalibrated soon."), cd_device_get_title (device));
 	} else {
 
 		/* get from GSettings */
 		threshold = g_settings_get_int (settings, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD);
 
 		/* TRANSLATORS: this is when the printer has not been recalibrated in a while */
-		message = g_strdup_printf (_("The printer '%s' should be recalibrated soon."), gcm_device_get_title (device));
+		message = g_strdup_printf (_("The printer '%s' should be recalibrated soon."), cd_device_get_title (device));
 	}
 
 	/* check if we need to notify */
-	since = timeval.tv_sec - gcm_device_get_modified_time (device);
+	since = timeval.tv_sec - cd_device_get_modified_time (device);
 	if (threshold > since)
 		gcm_session_notify_recalibrate (title, message, kind);
 	g_free (message);
@@ -148,7 +147,7 @@ gcm_session_notify_device (GcmDevice *device)
  * gcm_session_added_cb:
  **/
 static void
-gcm_session_added_cb (CdClient *client_, GcmDevice *device, gpointer user_data)
+gcm_session_added_cb (CdClient *client_, CdDevice *device, gpointer user_data)
 {
 	CdDeviceKind kind;
 	const gchar *profile;
@@ -156,22 +155,22 @@ gcm_session_added_cb (CdClient *client_, GcmDevice *device, gpointer user_data)
 	gboolean allow_notifications;
 
 	/* check we care */
-	kind = gcm_device_get_kind (device);
+	kind = cd_device_get_kind (device);
 	if (kind != CD_DEVICE_KIND_DISPLAY &&
 	    kind != CD_DEVICE_KIND_PRINTER)
 		return;
 
 	/* ensure we have a profile */
-	profile = gcm_device_get_default_profile_filename (device);
+	profile = cd_device_get_default_profile_filename (device);
 	if (profile == NULL) {
-		g_debug ("no profile set for %s", gcm_device_get_id (device));
+		g_debug ("no profile set for %s", cd_device_get_id (device));
 		goto out;
 	}
 
 	/* ensure it's a profile generated by us */
 	basename = g_path_get_basename (profile);
 	if (!g_str_has_prefix (basename, "GCM")) {
-		g_debug ("not a GCM profile for %s: %s", gcm_device_get_id (device), profile);
+		g_debug ("not a GCM profile for %s: %s", cd_device_get_id (device), profile);
 		goto out;
 	}
 
@@ -193,7 +192,7 @@ out:
 static const gchar *
 gcm_session_get_profile_for_window (guint xid, GError **error)
 {
-	GcmDevice *device = NULL;
+	CdDevice *device = NULL;
 	GdkWindow *window;
 	const gchar *filename = NULL;
 
@@ -207,14 +206,14 @@ gcm_session_get_profile_for_window (guint xid, GError **error)
 	}
 
 	/* get device for this window */
-//	device = cd_x11_screen_get_output_by_window (client, window);
+//	output = cd_x11_screen_get_output_by_window (client, window);
 	if (device == NULL) {
 		g_set_error (error, 1, 0, "no device found for xid %i", xid);
 		goto out;
 	}
 
 	/* get the data */
-	filename = gcm_device_get_default_profile_filename (device);
+//	filename = cd_device_get_default_profile_filename (device);
 	if (filename == NULL) {
 		g_set_error (error, 1, 0, "no profiles found for xid %i", xid);
 		goto out;
@@ -261,7 +260,7 @@ gcm_session_get_profiles_for_file (const gchar *filename, GError **error)
 	guint i;
 	gboolean ret;
 	GcmExif *exif;
-	GcmDevice *device;
+	CdDevice *device;
 	GPtrArray *array = NULL;
 	GPtrArray *array_devices = NULL;
 	GFile *file;
@@ -280,10 +279,10 @@ gcm_session_get_profiles_for_file (const gchar *filename, GError **error)
 		device = g_ptr_array_index (array_devices, i);
 
 		/* match up critical parts */
-		if (g_strcmp0 (gcm_device_get_manufacturer (device), gcm_exif_get_manufacturer (exif)) == 0 &&
-		    g_strcmp0 (gcm_device_get_model (device), gcm_exif_get_model (exif)) == 0 &&
-		    g_strcmp0 (gcm_device_get_serial (device), gcm_exif_get_serial (exif)) == 0) {
-			array = gcm_device_get_profiles (device);
+		if (g_strcmp0 (cd_device_get_vendor (device), gcm_exif_get_manufacturer (exif)) == 0 &&
+		    g_strcmp0 (cd_device_get_model (device), gcm_exif_get_model (exif)) == 0 &&
+		    g_strcmp0 (cd_device_get_serial (device), gcm_exif_get_serial (exif)) == 0) {
+			array = cd_device_get_profiles (device);
 			break;
 		}
 	}
@@ -310,7 +309,7 @@ gcm_session_get_profiles_for_device (const gchar *device_id_with_prefix, GError
 	const gchar *device_id_tmp;
 	guint i;
 	gboolean use_native_device = FALSE;
-	GcmDevice *device;
+	CdDevice *device;
 	GPtrArray *array = NULL;
 	GPtrArray *array_devices = NULL;
 
@@ -334,7 +333,7 @@ gcm_session_get_profiles_for_device (const gchar *device_id_with_prefix, GError
 		device = g_ptr_array_index (array_devices, i);
 
 		/* get the id for this device */
-		device_id_tmp = gcm_device_get_id (device);
+		device_id_tmp = cd_device_get_id (device);
 
 		/* wrong kind of device */
 		if (device_id_tmp == NULL)
@@ -343,7 +342,7 @@ gcm_session_get_profiles_for_device (const gchar *device_id_with_prefix, GError
 		/* compare what we have against what we were given */
 		g_debug ("comparing %s with %s", device_id_tmp, device_id);
 		if (g_strcmp0 (device_id_tmp, device_id) == 0) {
-			array = gcm_device_get_profiles (device);
+			array = cd_device_get_profiles (device);
 			break;
 		}
 	}
@@ -564,13 +563,13 @@ gcm_session_key_changed_cb (GSettings *settings_, const gchar *key, gpointer use
  * gcm_apply_create_icc_profile_for_edid:
  **/
 static gboolean
-gcm_apply_create_icc_profile_for_edid (GcmDevice *device, const gchar *filename, GError **error)
+gcm_apply_create_icc_profile_for_edid (CdDevice *device, const gchar *filename, GError **error)
 {
 	gboolean ret = FALSE;
 	GcmProfile *profile;
 
 	/* generate */
-	profile = gcm_device_generate_profile (device, error);
+	profile = cd_device_generate_profile (device, error);
 	if (profile == NULL)
 		goto out;
 
@@ -594,16 +593,16 @@ gcm_apply_create_icc_profile_for_edid (GcmDevice *device, const gchar *filename,
 	 */
 
 	/* do we set this by default? */
-	if (!gcm_device_get_use_edid_profile (device)) {
+	if (!cd_device_get_use_edid_profile (device)) {
 		g_debug ("not using auto-edid profile as device profile");
 		goto out;
 	}
 
 	/* add to the profiles list */
-	ret = gcm_device_profile_add (device, profile, NULL);
+	ret = cd_device_profile_add (device, profile, NULL);
 	if (ret) {
 		/* need to save new list */
-		ret = gcm_device_save (device, error);
+		ret = cd_device_save (device, error);
 		if (!ret)
 			goto out;
 	} else {
@@ -780,7 +779,7 @@ main (int argc, char *argv[])
 //	gchar *filename;
 	gchar *introspection_data = NULL;
 //	gchar *path;
-//	GcmDevice *device;
+//	CdDevice *device;
 	GError *error = NULL;
 	GFile *file = NULL;
 	GOptionContext *context;
@@ -860,10 +859,10 @@ main (int argc, char *argv[])
 		device = g_ptr_array_index (array, i);
 
 		/* optimize for login to save a few hundred ms */
-		gcm_device_xrandr_set_remove_atom (GCM_DEVICE_XRANDR (device), !login);
+		cd_device_xrandr_set_remove_atom (CD_DEVICE_XRANDR (device), !login);
 
 		/* do we have to generate a edid profile? */
-		edid_md5 = gcm_device_xrandr_get_edid_md5 (GCM_DEVICE_XRANDR (device));
+		edid_md5 = cd_device_xrandr_get_edid_md5 (CD_DEVICE_XRANDR (device));
 		if (edid_md5 == NULL) {
 			g_warning ("no EDID data for device");
 		} else {
@@ -885,8 +884,8 @@ main (int argc, char *argv[])
 		}
 
 		/* set gamma for device */
-		g_debug ("applying default profile for device: %s", gcm_device_get_id (device));
-		ret = gcm_device_apply (device, &error);
+		g_debug ("applying default profile for device: %s", cd_device_get_id (device));
+		ret = cd_device_apply (device, &error);
 		if (!ret) {
 			retval = 1;
 			g_warning ("failed to set gamma: %s", error->message);
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index 4ba058b..0d9b057 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
+#include <colord.h>
 
 #include "gcm-utils.h"
 
@@ -515,20 +516,20 @@ cd_rendering_intent_to_localized_description (CdRenderingIntent intent)
 }
 
 /**
- * gcm_colorspace_to_localised_string:
+ * cd_colorspace_to_localised_string:
  **/
 const gchar *
-gcm_colorspace_to_localised_string (GcmColorspace colorspace)
+cd_colorspace_to_localised_string (CdColorspace colorspace)
 {
-	if (colorspace == GCM_COLORSPACE_RGB) {
+	if (colorspace == CD_COLORSPACE_RGB) {
 		/* TRANSLATORS: this is the colorspace, e.g. red, green, blue */
 		return _("RGB");
 	}
-	if (colorspace == GCM_COLORSPACE_CMYK) {
+	if (colorspace == CD_COLORSPACE_CMYK) {
 		/* TRANSLATORS: this is the colorspace, e.g. cyan, magenta, yellow, black */
 		return _("CMYK");
 	}
-	if (colorspace == GCM_COLORSPACE_GRAY) {
+	if (colorspace == CD_COLORSPACE_GRAY) {
 		/* TRANSLATORS: this is the colorspace type */
 		return _("gray");
 	}
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index 720ae5a..7e8296c 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -25,9 +25,7 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
-#include "gcm-device.h"
 #include "gcm-profile.h"
-#include "gcm-enum.h"
 
 #define GCM_STOCK_ICON					"gnome-color-manager"
 #define GCM_DBUS_SERVICE				"org.gnome.ColorManager"
@@ -79,7 +77,7 @@ gboolean	 gcm_utils_is_icc_profile		(GFile			*file);
 gchar		*gcm_utils_linkify			(const gchar		*text);
 const gchar	*cd_rendering_intent_to_localized_text		(CdRenderingIntent	 intent);
 const gchar	*cd_rendering_intent_to_localized_description	(CdRenderingIntent	 intent);
-const gchar	*gcm_colorspace_to_localised_string	(GcmColorspace	 colorspace);
+const gchar	*cd_colorspace_to_localised_string	(CdColorspace	 colorspace);
 
 #endif /* __GCM_UTILS_H */
 
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index c872ae8..ac01068 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -580,45 +580,45 @@ gcm_viewer_profile_kind_to_string (CdProfileKind kind)
  * gcm_viewer_profile_colorspace_to_string:
  **/
 static gchar *
-gcm_viewer_profile_colorspace_to_string (GcmColorspace colorspace)
+gcm_viewer_profile_colorspace_to_string (CdColorspace colorspace)
 {
-	if (colorspace == GCM_COLORSPACE_XYZ) {
+	if (colorspace == CD_COLORSPACE_XYZ) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("XYZ");
 	}
-	if (colorspace == GCM_COLORSPACE_LAB) {
+	if (colorspace == CD_COLORSPACE_LAB) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("LAB");
 	}
-	if (colorspace == GCM_COLORSPACE_LUV) {
+	if (colorspace == CD_COLORSPACE_LUV) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("LUV");
 	}
-	if (colorspace == GCM_COLORSPACE_YCBCR) {
+	if (colorspace == CD_COLORSPACE_YCBCR) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("YCbCr");
 	}
-	if (colorspace == GCM_COLORSPACE_YXY) {
+	if (colorspace == CD_COLORSPACE_YXY) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("Yxy");
 	}
-	if (colorspace == GCM_COLORSPACE_RGB) {
+	if (colorspace == CD_COLORSPACE_RGB) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("RGB");
 	}
-	if (colorspace == GCM_COLORSPACE_GRAY) {
+	if (colorspace == CD_COLORSPACE_GRAY) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("Gray");
 	}
-	if (colorspace == GCM_COLORSPACE_HSV) {
+	if (colorspace == CD_COLORSPACE_HSV) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("HSV");
 	}
-	if (colorspace == GCM_COLORSPACE_CMYK) {
+	if (colorspace == CD_COLORSPACE_CMYK) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("CMYK");
 	}
-	if (colorspace == GCM_COLORSPACE_CMY) {
+	if (colorspace == CD_COLORSPACE_CMY) {
 		/* TRANSLATORS: this the ICC colorspace type */
 		return _("CMY");
 	}
@@ -647,7 +647,7 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 	gchar *basename = NULL;
 	gchar *size_text = NULL;
 	CdProfileKind profile_kind;
-	GcmColorspace profile_colorspace;
+	CdColorspace profile_colorspace;
 	const gchar *profile_kind_text;
 	const gchar *profile_colorspace_text;
 	gboolean ret;
@@ -669,13 +669,13 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 			    -1);
 
 	/* set the preview widgets */
-	if (gcm_profile_get_colorspace (profile) == GCM_COLORSPACE_RGB) {
+	if (gcm_profile_get_colorspace (profile) == CD_COLORSPACE_RGB) {
 		gcm_image_set_input_profile (GCM_IMAGE(viewer->preview_widget_input), profile);
 		gcm_image_set_abstract_profile (GCM_IMAGE(viewer->preview_widget_input), NULL);
 		gcm_image_set_output_profile (GCM_IMAGE(viewer->preview_widget_output), profile);
 		gcm_image_set_abstract_profile (GCM_IMAGE(viewer->preview_widget_output), NULL);
 		show_section = TRUE;
-	} else if (gcm_profile_get_colorspace (profile) == GCM_COLORSPACE_LAB) {
+	} else if (gcm_profile_get_colorspace (profile) == CD_COLORSPACE_LAB) {
 		gcm_image_set_input_profile (GCM_IMAGE(viewer->preview_widget_input), NULL);
 		gcm_image_set_abstract_profile (GCM_IMAGE(viewer->preview_widget_input), profile);
 		gcm_image_set_output_profile (GCM_IMAGE(viewer->preview_widget_output), NULL);
@@ -736,7 +736,7 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 	/* set colorspace */
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "hbox_colorspace"));
 	profile_colorspace = gcm_profile_get_colorspace (profile);
-	if (profile_colorspace == GCM_COLORSPACE_UNKNOWN) {
+	if (profile_colorspace == CD_COLORSPACE_UNKNOWN) {
 		gtk_widget_hide (widget);
 	} else {
 		gtk_widget_show (widget);
diff --git a/tools/gcm-dump-profile.c b/tools/gcm-dump-profile.c
index ba08af4..6644531 100644
--- a/tools/gcm-dump-profile.c
+++ b/tools/gcm-dump-profile.c
@@ -65,7 +65,7 @@ gcm_dump_profile_filename (const gchar *filename)
 	profile_kind = gcm_profile_get_kind (profile);
 //	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));
+//	g_print ("Colorspace:\t%s\n", cd_colorspace_to_string (colorspace));
 	size = gcm_profile_get_size (profile);
 	g_print ("Size:\t\t%i bytes\n", size);
 	has_vcgt = gcm_profile_get_has_vcgt (profile);



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