[gnome-color-manager] trivial: Add setters and getters to GcmProfile



commit c8c60bcf07e06b7b1b87653cc87fb2c5962ecc72
Author: Richard Hughes <richard hughsie com>
Date:   Wed Mar 24 17:49:01 2010 +0000

    trivial: Add setters and getters to GcmProfile

 src/gcm-dbus.c          |   34 ++----
 src/gcm-device.h        |    4 +-
 src/gcm-dump-profile.c  |   37 ++---
 src/gcm-import.c        |   12 +-
 src/gcm-inspect.c       |   14 +--
 src/gcm-prefs.c         |  123 ++++++-----------
 src/gcm-profile-lcms1.c |   32 ++---
 src/gcm-profile-store.c |   19 +--
 src/gcm-profile.c       |  356 +++++++++++++++++++++++++++++++++++++++--------
 src/gcm-profile.h       |   31 ++++
 10 files changed, 415 insertions(+), 247 deletions(-)
---
diff --git a/src/gcm-dbus.c b/src/gcm-dbus.c
index c648719..8ee1f9b 100644
--- a/src/gcm-dbus.c
+++ b/src/gcm-dbus.c
@@ -268,13 +268,8 @@ gcm_dbus_get_profiles_for_kind_internal (GcmDbus *dbus, GcmDeviceKind kind)
 	for (i=0; i<profile_array->len; i++) {
 		profile = g_ptr_array_index (profile_array, i);
 
-		/* get the native path of this device */
-		g_object_get (profile,
-			      "kind", &kind_tmp,
-			      NULL);
-
 		/* compare what we have against what we were given */
-		egg_debug ("comparing %i with %i", kind_tmp, profile_kind);
+		kind_tmp = gcm_profile_get_kind (profile);
 		if (kind_tmp == profile_kind)
 			g_ptr_array_add (array, g_object_ref (profile));
 	}
@@ -324,8 +319,8 @@ gcm_dbus_get_profiles_for_device (GcmDbus *dbus, const gchar *device_id, const g
 {
 	GPtrArray *array_profiles;
 	GcmProfile *profile;
-	gchar *title;
-	gchar *filename;
+	const gchar *title;
+	const gchar *filename;
 	guint i;
 	GPtrArray *array_structs;
 	GValue *value;
@@ -340,20 +335,14 @@ gcm_dbus_get_profiles_for_device (GcmDbus *dbus, const gchar *device_id, const g
 	for (i=0; i<array_profiles->len; i++) {
 		profile = (GcmProfile *) g_ptr_array_index (array_profiles, i);
 
-		/* get the data */
-		g_object_get (profile,
-			      "description", &title,
-			      "filename", &filename,
-			      NULL);
-
 		value = g_new0 (GValue, 1);
 		g_value_init (value, GCM_DBUS_STRUCT_STRING_STRING);
 		g_value_take_boxed (value, dbus_g_type_specialized_construct (GCM_DBUS_STRUCT_STRING_STRING));
+		title = gcm_profile_get_description (profile);
+		filename = gcm_profile_get_filename (profile);
 		dbus_g_type_struct_set (value, 0, title, 1, filename, -1);
 		g_ptr_array_add (array_structs, g_value_get_boxed (value));
 		g_free (value);
-		g_free (title);
-		g_free (filename);
 	}
 
 	/* return profiles */
@@ -373,8 +362,8 @@ gcm_dbus_get_profiles_for_type (GcmDbus *dbus, const gchar *kind, const gchar *o
 {
 	GPtrArray *array_profiles;
 	GcmProfile *profile;
-	gchar *title;
-	gchar *filename;
+	const gchar *title;
+	const gchar *filename;
 	guint i;
 	GPtrArray *array_structs;
 	GValue *value;
@@ -392,19 +381,14 @@ gcm_dbus_get_profiles_for_type (GcmDbus *dbus, const gchar *kind, const gchar *o
 		profile = (GcmProfile *) g_ptr_array_index (array_profiles, i);
 
 		/* get the data */
-		g_object_get (profile,
-			      "description", &title,
-			      "filename", &filename,
-			      NULL);
-
 		value = g_new0 (GValue, 1);
 		g_value_init (value, GCM_DBUS_STRUCT_STRING_STRING);
 		g_value_take_boxed (value, dbus_g_type_specialized_construct (GCM_DBUS_STRUCT_STRING_STRING));
+		title = gcm_profile_get_description (profile);
+		filename = gcm_profile_get_filename (profile);
 		dbus_g_type_struct_set (value, 0, title, 1, filename, -1);
 		g_ptr_array_add (array_structs, g_value_get_boxed (value));
 		g_free (value);
-		g_free (title);
-		g_free (filename);
 	}
 
 	/* return profiles */
diff --git a/src/gcm-device.h b/src/gcm-device.h
index 2e80edf..ee749a9 100644
--- a/src/gcm-device.h
+++ b/src/gcm-device.h
@@ -68,7 +68,7 @@ gboolean		 gcm_device_apply			(GcmDevice	*device,
 								 GError		**error);
 
 /* accessors */
-GcmDeviceKind	 gcm_device_get_kind			(GcmDevice	*device);
+GcmDeviceKind		 gcm_device_get_kind			(GcmDevice	*device);
 void			 gcm_device_set_kind			(GcmDevice	*device,
 								 GcmDeviceKind kind);
 gboolean		 gcm_device_get_connected		(GcmDevice	*device);
@@ -89,7 +89,7 @@ void			 gcm_device_set_brightness		(GcmDevice	*device,
 gfloat			 gcm_device_get_contrast		(GcmDevice	*device);
 void			 gcm_device_set_contrast		(GcmDevice	*device,
 								 gfloat		 contrast);
-GcmColorspace	 gcm_device_get_colorspace		(GcmDevice	*device);
+GcmColorspace		 gcm_device_get_colorspace		(GcmDevice	*device);
 void			 gcm_device_set_colorspace		(GcmDevice	*device,
 								 GcmColorspace colorspace);
 const gchar		*gcm_device_get_id			(GcmDevice	*device);
diff --git a/src/gcm-dump-profile.c b/src/gcm-dump-profile.c
index e674a11..6a9bc86 100644
--- a/src/gcm-dump-profile.c
+++ b/src/gcm-dump-profile.c
@@ -43,11 +43,11 @@ gcm_dump_profile_filename (const gchar *filename)
 	guint colorspace;
 	guint size;
 	gboolean has_vcgt;
-	gchar *description = NULL;
-	gchar *copyright = NULL;
-	gchar *manufacturer = NULL;
-	gchar *model = NULL;
-	gchar *datetime = NULL;
+	const gchar *description;
+	const gchar *copyright;
+	const gchar *manufacturer;
+	const gchar *model;
+	const gchar *datetime;
 	GFile *file = NULL;
 
 	/* parse profile */
@@ -60,43 +60,34 @@ gcm_dump_profile_filename (const gchar *filename)
 		goto out;
 	}
 
-	/* get data */
-	g_object_get (profile,
-		      "kind", &profile_kind,
-		      "colorspace", &colorspace,
-		      "size", &size,
-		      "has-vcgt", &has_vcgt,
-		      "description", &description,
-		      "copyright", &copyright,
-		      "manufacturer", &manufacturer,
-		      "model", &model,
-		      "datetime", &datetime,
-		      NULL);
-
 	/* print what we know */
+	profile_kind = gcm_profile_get_kind (profile);
 	g_print ("Kind:\t%s\n", gcm_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);
 	g_print ("Size:\t%i bytes\n", size);
+	has_vcgt = gcm_profile_get_has_vcgt (profile);
 	g_print ("Has VCGT:\t%s\n", has_vcgt ? "Yes" : "No");
+	description = gcm_profile_get_description (profile);
 	if (description != NULL)
 		g_print ("Description:\t%s\n", description);
+	copyright = gcm_profile_get_copyright (profile);
 	if (copyright != NULL)
 		g_print ("Copyright:\t%s\n", copyright);
+	manufacturer = gcm_profile_get_manufacturer (profile);
 	if (manufacturer != NULL)
 		g_print ("Manufacturer:\t%s\n", manufacturer);
+	model = gcm_profile_get_model (profile);
 	if (model != NULL)
 		g_print ("Model:\t%s\n", model);
+	datetime = gcm_profile_get_datetime (profile);
 	if (datetime != NULL)
 		g_print ("Created:\t%s\n", datetime);
 out:
 	if (file != NULL)
 		g_object_unref (file);
 	g_object_unref (profile);
-	g_free (description);
-	g_free (copyright);
-	g_free (manufacturer);
-	g_free (model);
-	g_free (datetime);
 	return ret;
 }
 
diff --git a/src/gcm-import.c b/src/gcm-import.c
index 8d15919..bd08a76 100644
--- a/src/gcm-import.c
+++ b/src/gcm-import.c
@@ -58,8 +58,8 @@ int
 main (int argc, char **argv)
 {
 	gboolean ret;
-	gchar *copyright = NULL;
-	gchar *description = NULL;
+	const gchar *copyright;
+	const gchar *description;
 	GFile *destination = NULL;
 	GFile *file = NULL;
 	gchar **files = NULL;
@@ -126,10 +126,10 @@ main (int argc, char **argv)
 	}
 
 	/* get data */
+	description = gcm_profile_get_description (profile);
+	copyright = gcm_profile_get_copyright (profile);
+	colorspace = gcm_profile_get_colorspace (profile);
 	g_object_get (profile,
-		      "description", &description,
-		      "copyright", &copyright,
-		      "colorspace", &colorspace,
 		      "white", &white,
 		      "red", &red,
 		      "green", &green,
@@ -239,8 +239,6 @@ out:
 		g_object_unref (profile);
 	if (destination != NULL)
 		g_object_unref (destination);
-	g_free (description);
-	g_free (copyright);
 	g_strfreev (files);
 	return retval;
 }
diff --git a/src/gcm-inspect.c b/src/gcm-inspect.c
index 5562ed0..dba0886 100644
--- a/src/gcm-inspect.c
+++ b/src/gcm-inspect.c
@@ -40,8 +40,6 @@
 static gboolean
 gcm_inspect_print_data_info (const gchar *title, const guint8 *data, gsize length)
 {
-	gchar *description = NULL;
-	gchar *copyright = NULL;
 	GcmProfile *profile = NULL;
 	GError *error = NULL;
 	gboolean ret;
@@ -55,23 +53,15 @@ gcm_inspect_print_data_info (const gchar *title, const guint8 *data, gsize lengt
 		goto out;
 	}
 
-	/* print some interesting facts about the profile */
-	g_object_get (profile,
-		      "description", &description,
-		      "copyright", &copyright,
-		      NULL);
-
 	/* print title */
 	g_print ("%s\n", title);
 
 	/* TRANSLATORS: this is the ICC profile description stored in an atom in the XServer */
-	g_print (" - %s %s\n", _("Description:"), description);
+	g_print (" - %s %s\n", _("Description:"), gcm_profile_get_description (profile));
 
 	/* TRANSLATORS: this is the ICC profile copyright */
-	g_print (" - %s %s\n", _("Copyright:"), copyright);
+	g_print (" - %s %s\n", _("Copyright:"), gcm_profile_get_copyright (profile));
 out:
-	g_free (copyright);
-	g_free (description);
 	if (profile != NULL)
 		g_object_unref (profile);
 	return ret;
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index a5293b0..a8a8a13 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -167,7 +167,7 @@ gcm_prefs_combobox_add_profile (GtkWidget *widget, GcmProfile *profile, GcmPrefs
 {
 	GtkTreeModel *model;
 	GtkTreeIter iter_tmp;
-	gchar *description;
+	const gchar *description;
 	gchar *sortable;
 
 	/* iter is optional */
@@ -177,16 +177,14 @@ gcm_prefs_combobox_add_profile (GtkWidget *widget, GcmProfile *profile, GcmPrefs
 	/* use description */
 	if (entry_type == GCM_PREFS_ENTRY_TYPE_NONE) {
 		/* TRANSLATORS: this is where no profile is selected */
-		description = g_strdup (_("None"));
+		description = _("None");
 		sortable = g_strdup ("1");
 	} else if (entry_type == GCM_PREFS_ENTRY_TYPE_IMPORT) {
 		/* TRANSLATORS: this is where the user can click and import a profile */
-		description = g_strdup (_("Other profileâ?¦"));
+		description = _("Other profileâ?¦");
 		sortable = g_strdup ("9");
 	} else {
-		g_object_get (profile,
-			      "description", &description,
-			      NULL);
+		description = gcm_profile_get_description (profile);
 		sortable = g_strdup_printf ("5%s", description);
 	}
 
@@ -199,7 +197,6 @@ gcm_prefs_combobox_add_profile (GtkWidget *widget, GcmProfile *profile, GcmPrefs
 			    GCM_PREFS_COMBO_COLUMN_TYPE, entry_type,
 			    GCM_PREFS_COMBO_COLUMN_SORTABLE, sortable,
 			    -1);
-	g_free (description);
 	g_free (sortable);
 }
 
@@ -403,12 +400,12 @@ static void
 gcm_prefs_update_profile_list (void)
 {
 	GtkTreeIter iter;
-	gchar *description;
+	const gchar *description;
 	const gchar *icon_name;
 	GcmProfileKind profile_kind = GCM_PROFILE_KIND_UNKNOWN;
 	GcmProfile *profile;
 	guint i;
-	gchar *filename = NULL;
+	const gchar *filename = NULL;
 	gchar *sort = NULL;
 	GPtrArray *profile_array = NULL;
 
@@ -423,18 +420,16 @@ gcm_prefs_update_profile_list (void)
 	/* update each list */
 	for (i=0; i<profile_array->len; i++) {
 		profile = g_ptr_array_index (profile_array, i);
-		g_object_get (profile,
-			      "description", &description,
-			      "kind", &profile_kind,
-			      "filename", &filename,
-			      NULL);
 
-		egg_debug ("add %s to profiles list", filename);
+		profile_kind = gcm_profile_get_kind (profile);
 		icon_name = gcm_prefs_profile_kind_to_icon_name (profile_kind);
 		gtk_list_store_append (list_store_profiles, &iter);
+		description = gcm_profile_get_description (profile);
 		sort = g_strdup_printf ("%s%s",
 					gcm_prefs_profile_get_sort_string (profile_kind),
 					description);
+		filename = gcm_profile_get_filename (profile);
+		egg_debug ("add %s to profiles list", filename);
 		gtk_list_store_set (list_store_profiles, &iter,
 				    GCM_PROFILES_COLUMN_ID, filename,
 				    GCM_PROFILES_COLUMN_SORT, sort,
@@ -444,8 +439,6 @@ gcm_prefs_update_profile_list (void)
 				    -1);
 
 		g_free (sort);
-		g_free (filename);
-		g_free (description);
 	}
 	if (profile_array != NULL)
 		g_ptr_array_unref (profile_array);
@@ -461,7 +454,7 @@ gcm_prefs_profile_delete_cb (GtkWidget *widget, gpointer data)
 	GtkResponseType response;
 	GtkWindow *window;
 	gint retval;
-	gchar *filename = NULL;
+	const gchar *filename;
 	GcmProfile *profile;
 	GtkTreeSelection *selection;
 	GtkTreeModel *model;
@@ -496,17 +489,13 @@ gcm_prefs_profile_delete_cb (GtkWidget *widget, gpointer data)
 			    GCM_PROFILES_COLUMN_PROFILE, &profile,
 			    -1);
 
-	/* get device data */
-	g_object_get (profile,
-		      "filename", &filename,
-		      NULL);
-
 	/* try to remove file */
+	filename = gcm_profile_get_filename (profile);
 	retval = g_unlink (filename);
 	if (retval != 0)
 		goto out;
 out:
-	g_free (filename);
+	return;
 }
 
 /**
@@ -738,7 +727,7 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
 	GError *error = NULL;
 	gchar *filename = NULL;
 	guint i;
-	gchar *name;
+	const gchar *name;
 	GcmProfile *profile;
 	GPtrArray *profile_array = NULL;
 	GFile *file = NULL;
@@ -803,15 +792,11 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, gpointer data)
 	destination = g_file_get_path (dest);
 	for (i=0; i<profile_array->len; i++) {
 		profile = g_ptr_array_index (profile_array, i);
-		g_object_get (profile,
-			      "filename", &name,
-			      NULL);
+		name = gcm_profile_get_filename (profile);
 		if (g_strcmp0 (name, destination) == 0) {
 			egg_debug ("found existing profile: %s", destination);
-			g_free (name);
 			break;
 		}
-		g_free (name);
 	}
 
 	/* we didn't find an existing profile */
@@ -1173,19 +1158,15 @@ gcm_prefs_is_profile_suitable_for_device (GcmProfile *profile, GcmDevice *device
 	gboolean ret = FALSE;
 	GcmDeviceKind device_kind;
 
-	/* get properties */
-	g_object_get (profile,
-		      "kind", &profile_kind_tmp,
-		      "colorspace", &profile_colorspace,
-		      NULL);
-
 	/* not the right colorspace */
 	device_colorspace = gcm_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);
+	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)
 		goto out;
@@ -1204,7 +1185,7 @@ gcm_prefs_add_profiles_suitable_for_devices (GtkWidget *widget, const gchar *pro
 {
 	GtkTreeModel *model;
 	guint i;
-	gchar *filename;
+	const gchar *filename;
 	gboolean ret;
 	gboolean set_active = FALSE;
 	GcmProfile *profile;
@@ -1232,15 +1213,12 @@ gcm_prefs_add_profiles_suitable_for_devices (GtkWidget *widget, const gchar *pro
 			gcm_prefs_combobox_add_profile (widget, profile, GCM_PREFS_ENTRY_TYPE_PROFILE, &iter);
 
 			/* set active option */
-			g_object_get (profile,
-				      "filename", &filename,
-				      NULL);
+			filename = gcm_profile_get_filename (profile);
 			if (g_strcmp0 (filename, profile_filename) == 0) {
 				//FIXME: does not work for sorted lists
 				gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &iter);
 				set_active = TRUE;
 			}
-			g_free (filename);
 		}
 	}
 
@@ -1502,12 +1480,12 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 	GcmXyz *red;
 	GcmXyz *green;
 	GcmXyz *blue;
-	gchar *profile_copyright = NULL;
-	gchar *profile_manufacturer = NULL;
-	gchar *profile_model = NULL;
-	gchar *profile_datetime = NULL;
+	const gchar *profile_copyright;
+	const gchar *profile_manufacturer;
+	const gchar *profile_model ;
+	const gchar *profile_datetime;
 	gchar *temp;
-	gchar *filename = NULL;
+	const gchar *filename;
 	gchar *basename = NULL;
 	gchar *size_text = NULL;
 	GcmProfileKind profile_kind;
@@ -1534,15 +1512,6 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* get the new details from the profile */
 	g_object_get (profile,
-		      "filename", &filename,
-		      "size", &filesize,
-		      "has-vcgt", &has_vcgt,
-		      "copyright", &profile_copyright,
-		      "manufacturer", &profile_manufacturer,
-		      "model", &profile_model,
-		      "datetime", &profile_datetime,
-		      "kind", &profile_kind,
-		      "colorspace", &profile_colorspace,
 		      "white", &white,
 		      "red", &red,
 		      "green", &green,
@@ -1587,6 +1556,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* set kind */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_type"));
+	profile_kind = gcm_profile_get_kind (profile);
 	if (profile_kind == GCM_PROFILE_KIND_UNKNOWN) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1598,6 +1568,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* set colorspace */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_colorspace"));
+	profile_colorspace = gcm_profile_get_colorspace (profile);
 	if (profile_colorspace == GCM_COLORSPACE_UNKNOWN) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1611,6 +1582,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_vcgt"));
 	gtk_widget_set_visible (widget, (profile_kind == GCM_PROFILE_KIND_DISPLAY_DEVICE));
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "label_vcgt"));
+	has_vcgt = gcm_profile_get_has_vcgt (profile);
 	if (has_vcgt) {
 		/* TRANSLATORS: if the device has a VCGT profile */
 		gtk_label_set_label (GTK_LABEL (widget), _("Yes"));
@@ -1620,12 +1592,14 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 	}
 
 	/* set basename */
+	filename = gcm_profile_get_filename (profile);
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "label_filename"));
 	basename = g_path_get_basename (filename);
 	gtk_label_set_label (GTK_LABEL (widget), basename);
 
 	/* set size */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_size"));
+	filesize = gcm_profile_get_size (profile);
 	if (filesize == 0) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1637,6 +1611,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* set new copyright */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_copyright"));
+	profile_copyright = gcm_profile_get_copyright (profile);
 	if (profile_copyright == NULL) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1649,6 +1624,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* set new manufacturer */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_profile_manufacturer"));
+	profile_manufacturer = gcm_profile_get_manufacturer (profile);
 	if (profile_manufacturer == NULL) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1661,6 +1637,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* set new model */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_profile_model"));
+	profile_model = gcm_profile_get_model (profile);
 	if (profile_model == NULL) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1671,6 +1648,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 
 	/* set new datetime */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_datetime"));
+	profile_datetime = gcm_profile_get_datetime (profile);
 	if (profile_datetime == NULL) {
 		gtk_widget_hide (widget);
 	} else {
@@ -1698,12 +1676,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 	g_object_unref (green);
 	g_object_unref (blue);
 	g_free (size_text);
-	g_free (filename);
 	g_free (basename);
-	g_free (profile_copyright);
-	g_free (profile_manufacturer);
-	g_free (profile_model);
-	g_free (profile_datetime);
 }
 
 /**
@@ -1903,12 +1876,10 @@ gcm_prefs_profile_combo_changed_cb (GtkWidget *widget, gpointer data)
 
 	/* get profile filename */
 	if (entry_type == GCM_PREFS_ENTRY_TYPE_PROFILE) {
-		g_object_get (profile,
-			      "filename", &filename,
-			      "has-vcgt", &has_vcgt,
-			      NULL);
 
 		/* show a warning if the profile is crap */
+		filename = g_strdup (gcm_profile_get_filename (profile));
+		has_vcgt = gcm_profile_get_has_vcgt (profile);
 		if (kind == GCM_DEVICE_KIND_DISPLAY && !has_vcgt && filename != NULL) {
 			gtk_widget_show (info_bar_vcgt);
 		} else {
@@ -1952,7 +1923,6 @@ out:
 		g_object_unref (dest);
 	if (profile_tmp != NULL)
 		g_object_unref (profile_tmp);
-	g_free (filename);
 }
 
 /**
@@ -2269,8 +2239,8 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget, GcmColorspace colorspace, con
 {
 	GcmProfile *profile;
 	guint i;
-	gchar *filename;
-	gchar *description;
+	const gchar *filename;
+	const gchar *description;
 	GcmColorspace colorspace_tmp;
 	gboolean has_profile = FALSE;
 	gboolean has_vcgt;
@@ -2289,14 +2259,11 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget, GcmColorspace colorspace, con
 	/* update each list */
 	for (i=0; i<profile_array->len; i++) {
 		profile = g_ptr_array_index (profile_array, i);
-		g_object_get (profile,
-			      "has-vcgt", &has_vcgt,
-			      "filename", &filename,
-			      "description", &description,
-			      "colorspace", &colorspace_tmp,
-			      NULL);
 
 		/* only for correct kind */
+		description = gcm_profile_get_description (profile);
+		has_vcgt = gcm_profile_get_has_vcgt (profile);
+		colorspace_tmp = gcm_profile_get_colorspace (profile);
 		if (!has_vcgt &&
 		    colorspace == colorspace_tmp &&
 		    (colorspace == GCM_COLORSPACE_CMYK ||
@@ -2304,12 +2271,11 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget, GcmColorspace colorspace, con
 			gcm_prefs_combobox_add_profile (widget, profile, GCM_PREFS_ENTRY_TYPE_PROFILE, &iter);
 
 			/* set active option */
+			filename = gcm_profile_get_filename (profile);
 			if (g_strcmp0 (filename, profile_filename) == 0)
 				gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &iter);
 			has_profile = TRUE;
 		}
-		g_free (filename);
-		g_free (description);
 	}
 	if (!has_profile) {
 		/* TRANSLATORS: this is when there are no profiles that can be used; the search term is either "RGB" or "CMYK" */
@@ -2332,7 +2298,7 @@ gcm_prefs_space_combo_changed_cb (GtkWidget *widget, gpointer data)
 {
 	gboolean ret;
 	GtkTreeIter iter;
-	gchar *filename = NULL;
+	const gchar *filename;
 	GtkTreeModel *model;
 	GcmProfile *profile = NULL;
 	const gchar *gconf_key = GCM_SETTINGS_COLORSPACE_RGB;
@@ -2349,19 +2315,16 @@ gcm_prefs_space_combo_changed_cb (GtkWidget *widget, gpointer data)
 			    -1);
 	if (profile == NULL)
 		goto out;
-	g_object_get (profile,
-		      "filename", &filename,
-		      NULL);
 
 	if (data != NULL)
 		gconf_key = GCM_SETTINGS_COLORSPACE_CMYK;
 
+	filename = gcm_profile_get_filename (profile);
 	egg_debug ("changed working space %s", filename);
 	gconf_client_set_string (gconf_client, gconf_key, filename, NULL);
 out:
 	if (profile != NULL)
 		g_object_unref (profile);
-	g_free (filename);
 }
 
 
diff --git a/src/gcm-profile-lcms1.c b/src/gcm-profile-lcms1.c
index 69b5b33..0c17492 100644
--- a/src/gcm-profile-lcms1.c
+++ b/src/gcm-profile-lcms1.c
@@ -521,9 +521,7 @@ gcm_profile_lcms1_parse_data (GcmProfile *profile, const guint8 *data, gsize len
 	default:
 		profile_kind = GCM_PROFILE_KIND_UNKNOWN;
 	}
-	g_object_set (profile,
-		      "kind", profile_kind,
-		      NULL);
+	gcm_profile_set_kind (profile, profile_kind);
 
 	/* get colorspace */
 	color_space = cmsGetColorSpace (priv->lcms_profile);
@@ -561,9 +559,7 @@ gcm_profile_lcms1_parse_data (GcmProfile *profile, const guint8 *data, gsize len
 	default:
 		colorspace = GCM_COLORSPACE_UNKNOWN;
 	}
-	g_object_set (profile,
-		      "colorspace", colorspace,
-		      NULL);
+	gcm_profile_set_colorspace (profile, colorspace);
 
 	/* get primary illuminants */
 	ret = cmsTakeColorants (&cie_illum, priv->lcms_profile);
@@ -649,9 +645,7 @@ gcm_profile_lcms1_parse_data (GcmProfile *profile, const guint8 *data, gsize len
 	ret = cmsTakeCreationDateTime (&created, priv->lcms_profile);
 	if (ret) {
 		text = gcm_utils_format_date_time (&created);
-		g_object_set (profile,
-			      "datetime", text,
-			      NULL);
+		gcm_profile_set_datetime (profile, text);
 		g_free (text);
 	}
 
@@ -670,22 +664,22 @@ gcm_profile_lcms1_parse_data (GcmProfile *profile, const guint8 *data, gsize len
 
 		if (tag_id == icSigProfileDescriptionTag) {
 			text = gcm_profile_lcms1_parse_multi_localized_unicode (profile_lcms1, data + tag_offset, tag_size);
-			g_object_set (profile, "description", text, NULL);
+			gcm_profile_set_description (profile, text);
 			g_free (text);
 		}
 		if (tag_id == icSigCopyrightTag) {
 			text = gcm_profile_lcms1_parse_multi_localized_unicode (profile_lcms1, data + tag_offset, tag_size);
-			g_object_set (profile, "copyright", text, NULL);
+			gcm_profile_set_copyright (profile, text);
 			g_free (text);
 		}
 		if (tag_id == icSigDeviceMfgDescTag) {
 			text = gcm_profile_lcms1_parse_multi_localized_unicode (profile_lcms1, data + tag_offset, tag_size);
-			g_object_set (profile, "manufacturer", text, NULL);
+			gcm_profile_set_manufacturer (profile, text);
 			g_free (text);
 		}
 		if (tag_id == icSigDeviceModelDescTag) {
 			text = gcm_profile_lcms1_parse_multi_localized_unicode (profile_lcms1, data + tag_offset, tag_size);
-			g_object_set (profile, "model", text, NULL);
+			gcm_profile_set_model (profile, text);
 			g_free (text);
 		}
 		if (tag_id == icSigMachineLookUpTableTag) {
@@ -712,9 +706,7 @@ gcm_profile_lcms1_parse_data (GcmProfile *profile, const guint8 *data, gsize len
 	ret = TRUE;
 
 	/* set properties */
-	g_object_set (profile,
-		      "has-vcgt", priv->has_vcgt_formula || priv->has_vcgt_table,
-		      NULL);
+	gcm_profile_set_has_vcgt (profile, priv->has_vcgt_formula || priv->has_vcgt_table);
 
 	egg_debug ("Has MLUT:         %s", priv->has_mlut ? "YES" : "NO");
 	egg_debug ("Has VCGT formula: %s", priv->has_vcgt_formula ? "YES" : "NO");
@@ -874,12 +866,8 @@ gcm_profile_lcms1_generate_curve (GcmProfile *profile, guint size)
 	GcmProfileLcms1 *profile_lcms1 = GCM_PROFILE_LCMS1 (profile);
 	GcmProfileLcms1Private *priv = profile_lcms1->priv;
 
-	/* get data */
-	g_object_get (profile,
-		      "colorspace", &colorspace,
-		      NULL);
-
-	/* run through the profile_lcms1 */
+	/* run through the profile */
+	colorspace = gcm_profile_get_colorspace (profile);
 	if (colorspace == GCM_COLORSPACE_RGB) {
 
 		/* RGB */
diff --git a/src/gcm-profile-store.c b/src/gcm-profile-store.c
index 9bd178b..2972606 100644
--- a/src/gcm-profile-store.c
+++ b/src/gcm-profile-store.c
@@ -119,7 +119,7 @@ gcm_profile_store_get_by_filename (GcmProfileStore *profile_store, const gchar *
 	guint i;
 	GcmProfile *profile = NULL;
 	GcmProfile *profile_tmp;
-	gchar *filename_tmp;
+	const gchar *filename_tmp;
 	GcmProfileStorePrivate *priv = profile_store->priv;
 
 	g_return_val_if_fail (GCM_IS_PROFILE_STORE (profile_store), NULL);
@@ -128,17 +128,12 @@ gcm_profile_store_get_by_filename (GcmProfileStore *profile_store, const gchar *
 	/* find profile */
 	for (i=0; i<priv->profile_array->len; i++) {
 		profile_tmp = g_ptr_array_index (priv->profile_array, i);
-		g_object_get (profile_tmp,
-			      "filename", &filename_tmp,
-			      NULL);
+		filename_tmp = gcm_profile_get_filename (profile_tmp);
 		if (g_strcmp0 (filename, filename_tmp) == 0) {
 			profile = g_object_ref (profile_tmp);
-			g_free (filename_tmp);
 			goto out;
 		}
-		g_free (filename_tmp);
 	}
-
 out:
 	return profile;
 }
@@ -149,23 +144,17 @@ out:
 static void
 gcm_profile_store_notify_filename_cb (GcmProfile *profile, GParamSpec *pspec, GcmProfileStore *profile_store)
 {
-	gchar *description;
+	const gchar *description;
 	GcmProfileStorePrivate *priv = profile_store->priv;
 
-	/* get data, as the filename is no longer valid */
-	g_object_get (profile,
-		      "description", &description,
-		      NULL);
-
 	/* remove from list */
 	g_ptr_array_remove (priv->profile_array, profile);
 
 	/* emit a signal */
+	description = gcm_profile_get_description (profile);
 	egg_debug ("emit removed (and changed): %s", description);
 	g_signal_emit (profile_store, signals[SIGNAL_REMOVED], 0, profile);
 	g_signal_emit (profile_store, signals[SIGNAL_CHANGED], 0);
-
-	g_free (description);
 }
 
 /**
diff --git a/src/gcm-profile.c b/src/gcm-profile.c
index 62af0dd..f449558 100644
--- a/src/gcm-profile.c
+++ b/src/gcm-profile.c
@@ -51,13 +51,12 @@ static void     gcm_profile_finalize	(GObject     *object);
  **/
 struct _GcmProfilePrivate
 {
-	GcmProfileKind		 profile_kind;
+	GcmProfileKind		 kind;
 	GcmColorspace		 colorspace;
 	guint			 size;
 	gboolean		 has_vcgt;
 	gchar			*description;
 	gchar			*filename;
-	GFileMonitor		*monitor;
 	gchar			*copyright;
 	gchar			*manufacturer;
 	gchar			*model;
@@ -67,6 +66,7 @@ struct _GcmProfilePrivate
 	GcmXyz			*red;
 	GcmXyz			*green;
 	GcmXyz			*blue;
+	GFileMonitor		*monitor;
 };
 
 enum {
@@ -91,6 +91,285 @@ enum {
 
 G_DEFINE_TYPE (GcmProfile, gcm_profile, G_TYPE_OBJECT)
 
+static void gcm_profile_file_monitor_changed_cb (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type, GcmProfile *profile);
+
+/**
+ * gcm_profile_get_description:
+ **/
+const gchar *
+gcm_profile_get_description (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
+	return profile->priv->description;
+}
+
+/**
+ * gcm_profile_set_description:
+ **/
+void
+gcm_profile_set_description (GcmProfile *profile, const gchar *description)
+{
+	GcmProfilePrivate *priv = profile->priv;
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+
+	g_free (priv->description);
+	priv->description = g_strdup (description);
+
+	if (priv->description != NULL)
+		gcm_utils_ensure_printable (priv->description);
+
+	/* there's nothing sensible to display */
+	if (priv->description == NULL || priv->description[0] == '\0') {
+		g_free (priv->description);
+		if (priv->filename != NULL) {
+			priv->description = g_path_get_basename (priv->filename);
+		} else {
+			/* TRANSLATORS: this is where the ICC profile_lcms1 has no description */
+			priv->description = g_strdup (_("Missing description"));
+		}
+	}
+	g_object_notify (G_OBJECT (profile), "description");
+}
+
+
+/**
+ * gcm_profile_get_filename:
+ **/
+const gchar *
+gcm_profile_get_filename (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
+	return profile->priv->filename;
+}
+
+/**
+ * gcm_profile_set_filename:
+ **/
+void
+gcm_profile_set_filename (GcmProfile *profile, const gchar *filename)
+{
+	GcmProfilePrivate *priv = profile->priv;
+	GFile *file;
+
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+
+	g_free (priv->filename);
+	priv->filename = g_strdup (filename);
+
+	/* unref old instance */
+	if (priv->monitor != NULL) {
+		g_object_unref (priv->monitor);
+		priv->monitor = NULL;
+	}
+
+	/* setup watch on new profile */
+	if (priv->filename != NULL) {
+		file = g_file_new_for_path (priv->filename);
+		priv->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL);
+		if (priv->monitor != NULL)
+			g_signal_connect (priv->monitor, "changed", G_CALLBACK(gcm_profile_file_monitor_changed_cb), profile);
+		g_object_unref (file);
+	}
+	g_object_notify (G_OBJECT (profile), "filename");
+}
+
+
+/**
+ * gcm_profile_get_copyright:
+ **/
+const gchar *
+gcm_profile_get_copyright (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
+	return profile->priv->copyright;
+}
+
+/**
+ * gcm_profile_set_copyright:
+ **/
+void
+gcm_profile_set_copyright (GcmProfile *profile, const gchar *copyright)
+{
+	GcmProfilePrivate *priv = profile->priv;
+
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+
+	g_free (priv->copyright);
+	priv->copyright = g_strdup (copyright);
+	if (priv->copyright != NULL)
+		gcm_utils_ensure_printable (priv->copyright);
+	g_object_notify (G_OBJECT (profile), "copyright");
+}
+
+
+/**
+ * gcm_profile_get_model:
+ **/
+const gchar *
+gcm_profile_get_model (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
+	return profile->priv->model;
+}
+
+/**
+ * gcm_profile_set_model:
+ **/
+void
+gcm_profile_set_model (GcmProfile *profile, const gchar *model)
+{
+	GcmProfilePrivate *priv = profile->priv;
+
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+
+	g_free (priv->model);
+	priv->model = g_strdup (model);
+	if (priv->model != NULL)
+		gcm_utils_ensure_printable (priv->model);
+	g_object_notify (G_OBJECT (profile), "model");
+}
+
+/**
+ * gcm_profile_get_manufacturer:
+ **/
+const gchar *
+gcm_profile_get_manufacturer (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
+	return profile->priv->manufacturer;
+}
+
+/**
+ * gcm_profile_set_manufacturer:
+ **/
+void
+gcm_profile_set_manufacturer (GcmProfile *profile, const gchar *manufacturer)
+{
+	GcmProfilePrivate *priv = profile->priv;
+
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+
+	g_free (priv->manufacturer);
+	priv->manufacturer = g_strdup (manufacturer);
+	if (priv->manufacturer != NULL)
+		gcm_utils_ensure_printable (priv->manufacturer);
+	g_object_notify (G_OBJECT (profile), "manufacturer");
+}
+
+
+/**
+ * gcm_profile_get_datetime:
+ **/
+const gchar *
+gcm_profile_get_datetime (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), NULL);
+	return profile->priv->datetime;
+}
+
+/**
+ * gcm_profile_set_datetime:
+ **/
+void
+gcm_profile_set_datetime (GcmProfile *profile, const gchar *datetime)
+{
+	GcmProfilePrivate *priv = profile->priv;
+
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+
+	g_free (priv->datetime);
+	priv->datetime = g_strdup (datetime);
+	g_object_notify (G_OBJECT (profile), "datetime");
+}
+
+
+/**
+ * gcm_profile_get_size:
+ **/
+guint
+gcm_profile_get_size (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), 0);
+	return profile->priv->size;
+}
+
+/**
+ * gcm_profile_set_size:
+ **/
+void
+gcm_profile_set_size (GcmProfile *profile, guint size)
+{
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+	profile->priv->size = size;
+	g_object_notify (G_OBJECT (profile), "size");
+}
+
+
+/**
+ * gcm_profile_get_kind:
+ **/
+GcmProfileKind
+gcm_profile_get_kind (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), GCM_PROFILE_KIND_UNKNOWN);
+	return profile->priv->kind;
+}
+
+/**
+ * gcm_profile_set_kind:
+ **/
+void
+gcm_profile_set_kind (GcmProfile *profile, GcmProfileKind kind)
+{
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+	profile->priv->kind = kind;
+	g_object_notify (G_OBJECT (profile), "kind");
+}
+
+
+/**
+ * gcm_profile_get_colorspace:
+ **/
+GcmColorspace
+gcm_profile_get_colorspace (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), GCM_COLORSPACE_UNKNOWN);
+	return profile->priv->colorspace;
+}
+
+/**
+ * gcm_profile_set_colorspace:
+ **/
+void
+gcm_profile_set_colorspace (GcmProfile *profile, GcmColorspace colorspace)
+{
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+	profile->priv->colorspace = colorspace;
+	g_object_notify (G_OBJECT (profile), "colorspace");
+}
+
+
+/**
+ * gcm_profile_get_has_vcgt:
+ **/
+gboolean
+gcm_profile_get_has_vcgt (GcmProfile *profile)
+{
+	g_return_val_if_fail (GCM_IS_PROFILE (profile), FALSE);
+	return profile->priv->has_vcgt;
+}
+
+/**
+ * gcm_profile_set_has_vcgt:
+ **/
+void
+gcm_profile_set_has_vcgt (GcmProfile *profile, gboolean has_vcgt)
+{
+	g_return_if_fail (GCM_IS_PROFILE (profile));
+	profile->priv->has_vcgt = has_vcgt;
+	g_object_notify (G_OBJECT (profile), "has_vcgt");
+}
+
 /**
  * gcm_profile_parse_data:
  **/
@@ -146,9 +425,7 @@ gcm_profile_parse (GcmProfile *profile, GFile *file, GError **error)
 
 	/* save */
 	filename = g_file_get_path (file);
-	g_object_set (profile,
-		      "filename", filename,
-		      NULL);
+	gcm_profile_set_filename (profile, filename);
 out:
 	g_free (filename);
 	g_free (data);
@@ -239,9 +516,7 @@ gcm_profile_file_monitor_changed_cb (GFileMonitor *monitor, GFile *file, GFile *
 
 	/* just rescan everything */
 	egg_debug ("%s deleted, clearing filename", priv->filename);
-	g_object_set (profile,
-		      "filename", NULL,
-		      NULL);
+	gcm_profile_set_filename (profile, NULL);
 out:
 	return;
 }
@@ -275,7 +550,7 @@ gcm_profile_get_property (GObject *object, guint prop_id, GValue *value, GParamS
 		g_value_set_string (value, priv->filename);
 		break;
 	case PROP_KIND:
-		g_value_set_uint (value, priv->profile_kind);
+		g_value_set_uint (value, priv->kind);
 		break;
 	case PROP_COLORSPACE:
 		g_value_set_uint (value, priv->colorspace);
@@ -315,78 +590,37 @@ gcm_profile_set_property (GObject *object, guint prop_id, const GValue *value, G
 {
 	GcmProfile *profile = GCM_PROFILE (object);
 	GcmProfilePrivate *priv = profile->priv;
-	GFile *file;
 
 	switch (prop_id) {
 	case PROP_COPYRIGHT:
-		g_free (priv->copyright);
-		priv->copyright = g_strdup (g_value_get_string (value));
-		if (priv->copyright != NULL)
-			gcm_utils_ensure_printable (priv->copyright);
+		gcm_profile_set_copyright (profile, g_value_get_string (value));
 		break;
 	case PROP_MANUFACTURER:
-		g_free (priv->manufacturer);
-		priv->manufacturer = g_strdup (g_value_get_string (value));
-		if (priv->manufacturer != NULL)
-			gcm_utils_ensure_printable (priv->manufacturer);
+		gcm_profile_set_manufacturer (profile, g_value_get_string (value));
 		break;
 	case PROP_MODEL:
-		g_free (priv->model);
-		priv->model = g_strdup (g_value_get_string (value));
-		if (priv->model != NULL)
-			gcm_utils_ensure_printable (priv->model);
+		gcm_profile_set_model (profile, g_value_get_string (value));
 		break;
 	case PROP_DATETIME:
-		g_free (priv->datetime);
-		priv->datetime = g_strdup (g_value_get_string (value));
+		gcm_profile_set_datetime (profile, g_value_get_string (value));
 		break;
 	case PROP_DESCRIPTION:
-		g_free (priv->description);
-		priv->description = g_strdup (g_value_get_string (value));
-		if (priv->description != NULL)
-			gcm_utils_ensure_printable (priv->description);
-
-		/* there's nothing sensible to display */
-		if (priv->description == NULL || priv->description[0] == '\0') {
-			g_free (priv->description);
-			if (priv->filename != NULL) {
-				priv->description = g_path_get_basename (priv->filename);
-			} else {
-				/* TRANSLATORS: this is where the ICC profile_lcms1 has no description */
-				priv->description = g_strdup (_("Missing description"));
-			}
-		}
+		gcm_profile_set_description (profile, g_value_get_string (value));
 		break;
 	case PROP_FILENAME:
-		g_free (priv->filename);
-		priv->filename = g_strdup (g_value_get_string (value));
-
-		/* unref old instance */
-		if (priv->monitor != NULL) {
-			g_object_unref (priv->monitor);
-			priv->monitor = NULL;
-		}
-
-		/* setup watch on new profile */
-		if (priv->filename != NULL) {
-			file = g_file_new_for_path (priv->filename);
-			priv->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL);
-			if (priv->monitor != NULL)
-				g_signal_connect (priv->monitor, "changed", G_CALLBACK(gcm_profile_file_monitor_changed_cb), profile);
-			g_object_unref (file);
-		}
+		gcm_profile_set_filename (profile, g_value_get_string (value));
 		break;
 	case PROP_KIND:
-		priv->profile_kind = g_value_get_uint (value);
+		gcm_profile_set_kind (profile, g_value_get_uint (value));
 		break;
 	case PROP_COLORSPACE:
-		priv->colorspace = g_value_get_uint (value);
+		gcm_profile_set_colorspace (profile, g_value_get_uint (value));
 		break;
 	case PROP_SIZE:
-		priv->size = g_value_get_uint (value);
+		gcm_profile_set_size (profile, g_value_get_uint (value));
 		break;
 	case PROP_HAS_VCGT:
-		priv->has_vcgt = g_value_get_boolean (value);
+		gcm_profile_set_has_vcgt (profile, g_value_get_boolean (value));
 		break;
 	case PROP_WHITE:
 		priv->white = g_value_dup_object (value);
@@ -552,7 +786,7 @@ gcm_profile_init (GcmProfile *profile)
 {
 	profile->priv = GCM_PROFILE_GET_PRIVATE (profile);
 	profile->priv->monitor = NULL;
-	profile->priv->profile_kind = GCM_PROFILE_KIND_UNKNOWN;
+	profile->priv->kind = GCM_PROFILE_KIND_UNKNOWN;
 	profile->priv->colorspace = GCM_COLORSPACE_UNKNOWN;
 	profile->priv->white = gcm_xyz_new ();
 	profile->priv->black = gcm_xyz_new ();
diff --git a/src/gcm-profile.h b/src/gcm-profile.h
index 373fbe5..49b0143 100644
--- a/src/gcm-profile.h
+++ b/src/gcm-profile.h
@@ -26,6 +26,7 @@
 #include <gio/gio.h>
 
 #include "gcm-clut.h"
+#include "gcm-enum.h"
 
 G_BEGIN_DECLS
 
@@ -86,6 +87,36 @@ GcmClut		*gcm_profile_generate_vcgt		(GcmProfile	*profile,
 							 guint		 size);
 GcmClut		*gcm_profile_generate_curve		(GcmProfile	*profile,
 							 guint		 size);
+const gchar	*gcm_profile_get_description		(GcmProfile	*profile);
+void		 gcm_profile_set_description		(GcmProfile	*profile,
+							 const gchar 	*description);
+const gchar	*gcm_profile_get_filename		(GcmProfile	*profile);
+void		 gcm_profile_set_filename		(GcmProfile	*profile,
+							 const gchar 	*filename);
+const gchar	*gcm_profile_get_copyright		(GcmProfile	*profile);
+void		 gcm_profile_set_copyright		(GcmProfile	*profile,
+							 const gchar 	*copyright);
+const gchar	*gcm_profile_get_manufacturer		(GcmProfile	*profile);
+void		 gcm_profile_set_manufacturer		(GcmProfile	*profile,
+							 const gchar 	*manufacturer);
+const gchar	*gcm_profile_get_model			(GcmProfile	*profile);
+void		 gcm_profile_set_model			(GcmProfile	*profile,
+							 const gchar 	*model);
+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);
+void		 gcm_profile_set_size			(GcmProfile	*profile,
+							 guint		 size);
+GcmProfileKind	 gcm_profile_get_kind			(GcmProfile	*profile);
+void		 gcm_profile_set_kind			(GcmProfile	*profile,
+							 GcmProfileKind	 kind);
+GcmColorspace	 gcm_profile_get_colorspace		(GcmProfile	*profile);
+void		 gcm_profile_set_colorspace		(GcmProfile	*profile,
+							 GcmColorspace	 colorspace);
+gboolean	 gcm_profile_get_has_vcgt		(GcmProfile	*profile);
+void		 gcm_profile_set_has_vcgt		(GcmProfile	*profile,
+							 gboolean	 has_vcgt);
 
 G_END_DECLS
 



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