[gnome-color-manager/colord] Remove the GetProfilesForType DBus method, clients are expected to use colord instead
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager/colord] Remove the GetProfilesForType DBus method, clients are expected to use colord instead
- Date: Sat, 15 Jan 2011 22:30:08 +0000 (UTC)
commit 1ed7c4a66fa275771afe5b5946d9e0e604a16f8a
Author: Richard Hughes <richard hughsie com>
Date: Sat Jan 15 22:30:46 2011 +0000
Remove the GetProfilesForType DBus method, clients are expected to use colord instead
src/gcm-session.c | 70 ----------------------------------------
src/org.gnome.ColorManager.xml | 40 -----------------------
2 files changed, 0 insertions(+), 110 deletions(-)
---
diff --git a/src/gcm-session.c b/src/gcm-session.c
index f5f4691..beb24de 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -243,35 +243,6 @@ out:
}
/**
- * gcm_session_get_profiles_for_profile_kind:
- **/
-static GPtrArray *
-gcm_session_get_profiles_for_profile_kind (GcmProfileKind kind, GError **error)
-{
- guint i;
- GcmProfile *profile;
- GPtrArray *array;
- GPtrArray *profile_array;
-
- /* create a temp array */
- array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
-
- /* get list */
- profile_array = gcm_profile_store_get_array (profile_store);
- for (i=0; i<profile_array->len; i++) {
- profile = g_ptr_array_index (profile_array, i);
-
- /* compare what we have against what we were given */
- if (kind == gcm_profile_get_kind (profile))
- g_ptr_array_add (array, g_object_ref (profile));
- }
-
- /* unref profile list */
- g_ptr_array_unref (profile_array);
- return array;
-}
-
-/**
* gcm_session_variant_from_profile_array:
**/
static GVariant *
@@ -425,12 +396,8 @@ gcm_session_handle_method_call (GDBusConnection *connection_, const gchar *sende
gchar *type = NULL;
GPtrArray *array = NULL;
gchar **devices = NULL;
- GcmDevice *device;
GError *error = NULL;
const gchar *profile_filename;
- GcmProfileKind profile_kind;
- GcmDeviceKind device_kind;
- guint i;
/* return 's' */
if (g_strcmp0 (method_name, "GetProfileForWindow") == 0) {
@@ -475,43 +442,6 @@ gcm_session_handle_method_call (GDBusConnection *connection_, const gchar *sende
}
/* return 'a(ss)' */
- if (g_strcmp0 (method_name, "GetProfilesForType") == 0) {
- g_variant_get (parameters, "(ss)", &type, &hints);
-
- /* try to parse string */
- profile_kind = gcm_profile_kind_from_string (type);
- if (profile_kind == GCM_PROFILE_KIND_UNKNOWN) {
- /* get the correct profile kind for the device kind */
- device_kind = gcm_device_kind_from_string (type);
- profile_kind = gcm_utils_device_kind_to_profile_kind (device_kind);
- }
-
- /* still nothing */
- if (profile_kind == GCM_PROFILE_KIND_UNKNOWN) {
- g_dbus_method_invocation_return_dbus_error (invocation,
- "org.gnome.ColorManager.Failed",
- "did not get a profile or device type");
- goto out;
- }
-
- /* get array of profiles */
- array = gcm_session_get_profiles_for_profile_kind (profile_kind, &error);
- if (array == NULL) {
- g_dbus_method_invocation_return_dbus_error (invocation,
- "org.gnome.ColorManager.Failed",
- error->message);
- g_error_free (error);
- goto out;
- }
-
- /* format the value */
- value = gcm_session_variant_from_profile_array (array);
- tuple = g_variant_new_tuple (&value, 1);
- g_dbus_method_invocation_return_value (invocation, tuple);
- goto out;
- }
-
- /* return 'a(ss)' */
if (g_strcmp0 (method_name, "GetProfilesForFile") == 0) {
g_variant_get (parameters, "(ss)", &filename, &hints);
diff --git a/src/org.gnome.ColorManager.xml b/src/org.gnome.ColorManager.xml
index 2271112..1837e51 100644
--- a/src/org.gnome.ColorManager.xml
+++ b/src/org.gnome.ColorManager.xml
@@ -121,46 +121,6 @@
</method>
<!--*****************************************************************************************-->
- <method name='GetProfilesForType'>
- <annotation name='org.freedesktop.DBus.GLib.Async' value=''/>
- <doc:doc>
- <doc:description>
- <doc:para>
- Gets the profiles for a device type.
- </doc:para>
- </doc:description>
- </doc:doc>
- <arg type='s' name='type' direction='in'>
- <doc:doc>
- <doc:summary>
- <doc:para>
- A device type, e.g. <doc:tt>scanner</doc:tt>, <doc:tt>display</doc:tt>,
- <doc:tt>printer</doc:tt> or <doc:tt>camera</doc:tt>.
- </doc:para>
- </doc:summary>
- </doc:doc>
- </arg>
- <arg type='s' name='options' direction='in'>
- <doc:doc>
- <doc:summary>
- <doc:para>
- Options to give hints about what profiles to choose. Currently unused.
- </doc:para>
- </doc:summary>
- </doc:doc>
- </arg>
- <arg type='a(ss)' name='profiles' direction='out'>
- <doc:doc>
- <doc:summary>
- <doc:para>
- An array of profile display names and filenames of suitable profiles to use with this type of device.
- </doc:para>
- </doc:summary>
- </doc:doc>
- </arg>
- </method>
-
- <!--*****************************************************************************************-->
<method name='GetProfilesForFile'>
<annotation name='org.freedesktop.DBus.GLib.Async' value=''/>
<doc:doc>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]