[gnome-disk-utility/new-ui] Catch up with DeviceKit-disks being renamed to udisks



commit 2ed83bbb02fe16f0897f5a6b3c379dd065307a82
Author: David Zeuthen <davidz redhat com>
Date:   Tue Dec 1 15:17:44 2009 -0500

    Catch up with DeviceKit-disks being renamed to udisks

 configure.ac           |    7 +-
 src/gdu/Makefile.am    |   30 +++---
 src/gdu/gdu-adapter.c  |   12 +-
 src/gdu/gdu-device.c   |  242 ++++++++++++++++++++++++------------------------
 src/gdu/gdu-error.c    |   20 ++--
 src/gdu/gdu-error.h    |    2 +-
 src/gdu/gdu-expander.c |   12 +-
 src/gdu/gdu-pool.c     |   64 +++++++-------
 src/gdu/gdu-port.c     |   12 +-
 9 files changed, 201 insertions(+), 200 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a5281e5..0adf6a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,9 @@ GTK2_REQUIRED=2.17.2
 UNIQUE_REQUIRED=1.0
 LIBNOTIFY_REQUIRED=0.3.0
 NAUTILUS_REQUIRED=2.24.0
-DEVKIT_DISKS_REQUIRED=009
+
+UDISKS_REQUIRED=1.0.0
+UDISKS_NEXT_ABI_INCOMPATIBLE_VERSION=1.1.0
 
 SCROLLKEEPER_REQUIRED=0.3.14
 INTLTOOL_REQUIRED=0.35.0
@@ -143,7 +145,8 @@ PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED)
 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= $GTK2_REQUIRED)
 PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= $UNIQUE_REQUIRED)
 PKG_CHECK_MODULES(LIBNOTIFY, libnotify  >= $LIBNOTIFY_REQUIRED)
-PKG_CHECK_MODULES(DEVKIT_DISKS, DeviceKit-disks  >= $DEVKIT_DISKS_REQUIRED)
+PKG_CHECK_MODULES(UDISKS, udisks  >= $UDISKS_REQUIRED udisks < $UDISKS_NEXT_ABI_INCOMPATIBLE_VERSION)
+
 
 PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14])
 AC_SUBST(LIBATASMART_CFLAGS)
diff --git a/src/gdu/Makefile.am b/src/gdu/Makefile.am
index e5b62f5..e3d1ed8 100644
--- a/src/gdu/Makefile.am
+++ b/src/gdu/Makefile.am
@@ -1,11 +1,11 @@
 NULL =
 
 BUILT_SOURCES =                                         	\
-        devkit-disks-daemon-glue.h                      	\
-        devkit-disks-device-glue.h				\
-        devkit-disks-adapter-glue.h				\
-        devkit-disks-expander-glue.h				\
-        devkit-disks-port-glue.h				\
+        udisks-daemon-glue.h                      	\
+        udisks-device-glue.h				\
+        udisks-adapter-glue.h				\
+        udisks-expander-glue.h				\
+        udisks-port-glue.h				\
 	gdu-marshal.h			gdu-marshal.c
 
 gdu-marshal.h: gdu-marshal.list
@@ -14,20 +14,20 @@ gdu-marshal.h: gdu-marshal.list
 gdu-marshal.c: gdu-marshal.list
 	echo "#include \"gdu-marshal.h\"" > $@ && glib-genmarshal $< --prefix=gdu_marshal --body >> $@
 
-devkit-disks-daemon-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.xml Makefile.am
-	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=devkit-disks-daemon-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.xml
+udisks-daemon-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml Makefile.am
+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-daemon-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml
 
-devkit-disks-device-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Device.xml Makefile.am
-	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=devkit-disks-device-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Device.xml
+udisks-device-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml Makefile.am
+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-device-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml
 
-devkit-disks-adapter-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Adapter.xml Makefile.am
-	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=devkit-disks-adapter-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Adapter.xml
+udisks-adapter-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Adapter.xml Makefile.am
+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-adapter-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Adapter.xml
 
-devkit-disks-expander-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Expander.xml Makefile.am
-	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=devkit-disks-expander-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Expander.xml
+udisks-expander-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Expander.xml Makefile.am
+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-expander-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Expander.xml
 
-devkit-disks-port-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Port.xml Makefile.am
-	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=devkit-disks-port-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.DeviceKit.Disks.Port.xml
+udisks-port-glue.h: /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Port.xml Makefile.am
+	dbus-binding-tool --prefix=devkit_disks_daemon --mode=glib-client --output=udisks-port-glue.h /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Port.xml
 
 lib_LTLIBRARIES=libgdu.la
 
diff --git a/src/gdu/gdu-adapter.c b/src/gdu/gdu-adapter.c
index 3ae7705..f8ed27b 100644
--- a/src/gdu/gdu-adapter.c
+++ b/src/gdu/gdu-adapter.c
@@ -31,14 +31,14 @@
 #include "gdu-private.h"
 #include "gdu-pool.h"
 #include "gdu-adapter.h"
-#include "devkit-disks-adapter-glue.h"
+#include "udisks-adapter-glue.h"
 
 /* --- SUCKY CODE BEGIN --- */
 
 /* This totally sucks; dbus-bindings-tool and dbus-glib should be able
  * to do this for us.
  *
- * TODO: keep in sync with code in tools/devkit-disks in DeviceKit-disks.
+ * TODO: keep in sync with code in tools/udisks in udisks.
  */
 
 typedef struct
@@ -96,12 +96,12 @@ adapter_properties_get (DBusGConnection *bus,
         GError *error;
         GHashTable *hash_table;
         DBusGProxy *prop_proxy;
-        const char *ifname = "org.freedesktop.DeviceKit.Disks.Adapter";
+        const char *ifname = "org.freedesktop.UDisks.Adapter";
 
         props = g_new0 (AdapterProperties, 1);
 
 	prop_proxy = dbus_g_proxy_new_for_name (bus,
-                                                "org.freedesktop.DeviceKit.Disks",
+                                                "org.freedesktop.UDisks",
                                                 object_path,
                                                 "org.freedesktop.DBus.Properties");
         error = NULL;
@@ -261,9 +261,9 @@ _gdu_adapter_new_from_object_path (GduPool *pool, const char *object_path)
         }
 
 	adapter->priv->proxy = dbus_g_proxy_new_for_name (adapter->priv->bus,
-                                                         "org.freedesktop.DeviceKit.Disks",
+                                                         "org.freedesktop.UDisks",
                                                          adapter->priv->object_path,
-                                                         "org.freedesktop.DeviceKit.Disks.Adapter");
+                                                         "org.freedesktop.UDisks.Adapter");
         dbus_g_proxy_set_default_timeout (adapter->priv->proxy, INT_MAX);
         dbus_g_proxy_add_signal (adapter->priv->proxy, "Changed", G_TYPE_INVALID);
 
diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
index e5083e4..a846646 100644
--- a/src/gdu/gdu-device.c
+++ b/src/gdu/gdu-device.c
@@ -31,14 +31,14 @@
 #include "gdu-private.h"
 #include "gdu-pool.h"
 #include "gdu-device.h"
-#include "devkit-disks-device-glue.h"
+#include "udisks-device-glue.h"
 
 /* --- SUCKY CODE BEGIN --- */
 
 /* This totally sucks; dbus-bindings-tool and dbus-glib should be able
  * to do this for us.
  *
- * TODO: keep in sync with code in tools/devkit-disks in DeviceKit-disks.
+ * TODO: keep in sync with code in tools/udisks in udisks.
  */
 
 typedef struct
@@ -486,12 +486,12 @@ device_properties_get (DBusGConnection *bus,
         GError *error;
         GHashTable *hash_table;
         DBusGProxy *prop_proxy;
-        const char *ifname = "org.freedesktop.DeviceKit.Disks.Device";
+        const char *ifname = "org.freedesktop.UDisks.Device";
 
         props = g_new0 (DeviceProperties, 1);
 
 	prop_proxy = dbus_g_proxy_new_for_name (bus,
-                                                "org.freedesktop.DeviceKit.Disks",
+                                                "org.freedesktop.UDisks",
                                                 object_path,
                                                 "org.freedesktop.DBus.Properties");
         error = NULL;
@@ -650,9 +650,9 @@ _gdu_device_new_from_object_path (GduPool *pool, const char *object_path)
         }
 
 	device->priv->proxy = dbus_g_proxy_new_for_name (device->priv->bus,
-                                                         "org.freedesktop.DeviceKit.Disks",
+                                                         "org.freedesktop.UDisks",
                                                          device->priv->object_path,
-                                                         "org.freedesktop.DeviceKit.Disks.Device");
+                                                         "org.freedesktop.UDisks.Device");
         dbus_g_proxy_set_default_timeout (device->priv->proxy, INT_MAX);
         dbus_g_proxy_add_signal (device->priv->proxy, "Changed", G_TYPE_INVALID);
 
@@ -1423,11 +1423,11 @@ gdu_device_op_filesystem_create (GduDevice                              *device,
         }
         options[n] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_filesystem_create_async (device->priv->proxy,
-                                                                        fstype,
-                                                                        (const char **) options,
-                                                                        op_mkfs_cb,
-                                                                        data);
+        org_freedesktop_UDisks_Device_filesystem_create_async (device->priv->proxy,
+                                                               fstype,
+                                                               (const char **) options,
+                                                               op_mkfs_cb,
+                                                               data);
         while (n >= 0)
                 g_free (options[n--]);
 }
@@ -1472,11 +1472,11 @@ gdu_device_op_filesystem_mount (GduDevice                   *device,
         if (options == NULL)
                 options = null_options;
 
-        org_freedesktop_DeviceKit_Disks_Device_filesystem_mount_async (device->priv->proxy,
-                                                                       fstype,
-                                                                       (const char **) options,
-                                                                       op_mount_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_filesystem_mount_async (device->priv->proxy,
+                                                              fstype,
+                                                              (const char **) options,
+                                                              op_mount_cb,
+                                                              data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1512,10 +1512,10 @@ gdu_device_op_filesystem_unmount (GduDevice                     *device,
         data->user_data = user_data;
         options[0] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_filesystem_unmount_async (device->priv->proxy,
-                                                                         (const char **) options,
-                                                                         op_unmount_cb,
-                                                                         data);
+        org_freedesktop_UDisks_Device_filesystem_unmount_async (device->priv->proxy,
+                                                                (const char **) options,
+                                                                op_unmount_cb,
+                                                                data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1551,10 +1551,10 @@ gdu_device_op_filesystem_check (GduDevice                             *device,
         data->user_data = user_data;
         options[0] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_filesystem_check_async (device->priv->proxy,
-                                                                       (const char **) options,
-                                                                       op_check_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_filesystem_check_async (device->priv->proxy,
+                                                              (const char **) options,
+                                                              op_check_cb,
+                                                              data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1593,10 +1593,10 @@ gdu_device_op_partition_delete (GduDevice                             *device,
         n = 0;
         options[n] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_partition_delete_async (device->priv->proxy,
-                                                                       (const char **) options,
-                                                                       op_partition_delete_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_partition_delete_async (device->priv->proxy,
+                                                              (const char **) options,
+                                                              op_partition_delete_cb,
+                                                              data);
 
         while (n >= 0)
                 g_free (options[n--]);
@@ -1660,17 +1660,17 @@ gdu_device_op_partition_create (GduDevice   *device,
         }
         fsoptions[n] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_partition_create_async (device->priv->proxy,
-                                                                       offset,
-                                                                       size,
-                                                                       type,
-                                                                       label,
-                                                                       (const char **) flags,
-                                                                       (const char **) options,
-                                                                       fstype,
-                                                                       (const char **) fsoptions,
-                                                                       op_create_partition_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_partition_create_async (device->priv->proxy,
+                                                              offset,
+                                                              size,
+                                                              type,
+                                                              label,
+                                                              (const char **) flags,
+                                                              (const char **) options,
+                                                              fstype,
+                                                              (const char **) fsoptions,
+                                                              op_create_partition_cb,
+                                                              data);
 
         while (n >= 0)
                 g_free (fsoptions[n--]);
@@ -1710,12 +1710,12 @@ gdu_device_op_partition_modify (GduDevice                             *device,
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_partition_modify_async (device->priv->proxy,
-                                                                       type,
-                                                                       label,
-                                                                       (const char **) flags,
-                                                                       op_partition_modify_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_partition_modify_async (device->priv->proxy,
+                                                              type,
+                                                              label,
+                                                              (const char **) flags,
+                                                              op_partition_modify_cb,
+                                                              data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1755,11 +1755,11 @@ gdu_device_op_partition_table_create (GduDevice
         n = 0;
         options[n] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_partition_table_create_async (device->priv->proxy,
-                                                                             scheme,
-                                                                             (const char **) options,
-                                                                             op_create_partition_table_cb,
-                                                                             data);
+        org_freedesktop_UDisks_Device_partition_table_create_async (device->priv->proxy,
+                                                                    scheme,
+                                                                    (const char **) options,
+                                                                    op_create_partition_table_cb,
+                                                                    data);
 
         while (n >= 0)
                 g_free (options[n--]);
@@ -1799,11 +1799,11 @@ gdu_device_op_luks_unlock (GduDevice *device,
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_luks_unlock_async (device->priv->proxy,
-                                                                       secret,
-                                                                       (const char **) options,
-                                                                       op_unlock_luks_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_luks_unlock_async (device->priv->proxy,
+                                                         secret,
+                                                         (const char **) options,
+                                                         op_unlock_luks_cb,
+                                                         data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1840,11 +1840,11 @@ gdu_device_op_luks_change_passphrase (GduDevice   *device,
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_luks_change_passphrase_async (device->priv->proxy,
-                                                                                  old_secret,
-                                                                                  new_secret,
-                                                                                  op_change_secret_for_luks_cb,
-                                                                                  data);
+        org_freedesktop_UDisks_Device_luks_change_passphrase_async (device->priv->proxy,
+                                                                    old_secret,
+                                                                    new_secret,
+                                                                    op_change_secret_for_luks_cb,
+                                                                    data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1880,10 +1880,10 @@ gdu_device_op_luks_lock (GduDevice                           *device,
         data->user_data = user_data;
 
         options[0] = NULL;
-        org_freedesktop_DeviceKit_Disks_Device_luks_lock_async (device->priv->proxy,
-                                                                     (const char **) options,
-                                                                     op_lock_luks_cb,
-                                                                     data);
+        org_freedesktop_UDisks_Device_luks_lock_async (device->priv->proxy,
+                                                       (const char **) options,
+                                                       op_lock_luks_cb,
+                                                       data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1918,10 +1918,10 @@ gdu_device_op_filesystem_set_label (GduDevice                                *de
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_filesystem_set_label_async (device->priv->proxy,
-                                                                           new_label,
-                                                                           op_change_filesystem_label_cb,
-                                                                           data);
+        org_freedesktop_UDisks_Device_filesystem_set_label_async (device->priv->proxy,
+                                                                  new_label,
+                                                                  op_change_filesystem_label_cb,
+                                                                  data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -1977,9 +1977,9 @@ gdu_device_filesystem_list_open_files (GduDevice
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_filesystem_list_open_files_async (device->priv->proxy,
-                                                                                 op_filesystem_list_open_files_cb,
-                                                                                 data);
+        org_freedesktop_UDisks_Device_filesystem_list_open_files_async (device->priv->proxy,
+                                                                        op_filesystem_list_open_files_cb,
+                                                                        data);
 }
 
 GList *
@@ -1990,9 +1990,9 @@ gdu_device_filesystem_list_open_files_sync (GduDevice  *device,
         GPtrArray *processes;
 
         ret = NULL;
-        if (!org_freedesktop_DeviceKit_Disks_Device_filesystem_list_open_files (device->priv->proxy,
-                                                                                &processes,
-                                                                                error))
+        if (!org_freedesktop_UDisks_Device_filesystem_list_open_files (device->priv->proxy,
+                                                                       &processes,
+                                                                       error))
                 goto out;
 
         ret = op_filesystem_list_open_files_compute_ret (processes);
@@ -2034,10 +2034,10 @@ gdu_device_drive_ata_smart_refresh_data (GduDevice
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_drive_ata_smart_refresh_data_async (device->priv->proxy,
-                                                                               (const char **) options,
-                                                                               op_retrieve_ata_smart_data_cb,
-                                                                               data);
+        org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_async (device->priv->proxy,
+                                                                          (const char **) options,
+                                                                          op_retrieve_ata_smart_data_cb,
+                                                                          data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2073,11 +2073,11 @@ gdu_device_op_drive_ata_smart_initiate_selftest (GduDevice
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_drive_ata_smart_initiate_selftest_async (device->priv->proxy,
-                                                                                        test,
-                                                                                        (const gchar **) options,
-                                                                                        op_run_ata_smart_selftest_cb,
-                                                                                        data);
+        org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_async (device->priv->proxy,
+                                                                               test,
+                                                                               (const gchar **) options,
+                                                                               op_run_ata_smart_selftest_cb,
+                                                                               data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2114,10 +2114,10 @@ gdu_device_op_linux_md_stop (GduDevice                         *device,
 
         options[0] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_linux_md_stop_async (device->priv->proxy,
-                                                                    (const char **) options,
-                                                                    op_stop_linux_md_array_cb,
-                                                                    data);
+        org_freedesktop_UDisks_Device_linux_md_stop_async (device->priv->proxy,
+                                                           (const char **) options,
+                                                           op_stop_linux_md_array_cb,
+                                                           data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2157,10 +2157,10 @@ gdu_device_op_linux_md_check (GduDevice                           *device,
         if (options == NULL)
                 options = null_options;
 
-        org_freedesktop_DeviceKit_Disks_Device_linux_md_check_async (device->priv->proxy,
-                                                                     (const char **) options,
-                                                                     op_check_linux_md_array_cb,
-                                                                     data);
+        org_freedesktop_UDisks_Device_linux_md_check_async (device->priv->proxy,
+                                                            (const char **) options,
+                                                            op_check_linux_md_array_cb,
+                                                            data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2198,12 +2198,11 @@ gdu_device_op_linux_md_add_component (GduDevice
 
         options[0] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_linux_md_add_component_async (
-                device->priv->proxy,
-                component_objpath,
-                (const char **) options,
-                op_add_component_to_linux_md_array_cb,
-                data);
+        org_freedesktop_UDisks_Device_linux_md_add_component_async (device->priv->proxy,
+                                                                    component_objpath,
+                                                                    (const char **) options,
+                                                                    op_add_component_to_linux_md_array_cb,
+                                                                    data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2243,12 +2242,11 @@ gdu_device_op_linux_md_remove_component (GduDevice
         n = 0;
         options[n] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_linux_md_remove_component_async (
-                device->priv->proxy,
-                component_objpath,
-                (const char **) options,
-                op_remove_component_from_linux_md_array_cb,
-                data);
+        org_freedesktop_UDisks_Device_linux_md_remove_component_async (device->priv->proxy,
+                                                                       component_objpath,
+                                                                       (const char **) options,
+                                                                       op_remove_component_from_linux_md_array_cb,
+                                                                       data);
 
         while (n >= 0)
                 g_free (options[n--]);
@@ -2283,9 +2281,9 @@ gdu_device_op_cancel_job (GduDevice *device, GduDeviceCancelJobCompletedFunc cal
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_job_cancel_async (device->priv->proxy,
-                                                                 op_cancel_job_cb,
-                                                                 data);
+        org_freedesktop_UDisks_Device_job_cancel_async (device->priv->proxy,
+                                                        op_cancel_job_cb,
+                                                        data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2321,10 +2319,10 @@ gdu_device_op_drive_eject (GduDevice                        *device,
         data->user_data = user_data;
         options[0] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_drive_eject_async (device->priv->proxy,
-                                                                  (const char **) options,
-                                                                  op_eject_cb,
-                                                                  data);
+        org_freedesktop_UDisks_Device_drive_eject_async (device->priv->proxy,
+                                                         (const char **) options,
+                                                         op_eject_cb,
+                                                         data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2360,10 +2358,10 @@ gdu_device_op_drive_detach (GduDevice                        *device,
         data->user_data = user_data;
         options[0] = NULL;
 
-        org_freedesktop_DeviceKit_Disks_Device_drive_detach_async (device->priv->proxy,
-                                                                   (const char **) options,
-                                                                   op_detach_cb,
-                                                                   data);
+        org_freedesktop_UDisks_Device_drive_detach_async (device->priv->proxy,
+                                                          (const char **) options,
+                                                          op_detach_cb,
+                                                          data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2397,9 +2395,9 @@ gdu_device_op_drive_poll_media (GduDevice                        *device,
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_drive_poll_media_async (device->priv->proxy,
-                                                                       op_poll_media_cb,
-                                                                       data);
+        org_freedesktop_UDisks_Device_drive_poll_media_async (device->priv->proxy,
+                                                              op_poll_media_cb,
+                                                              data);
 }
 
 /* -------------------------------------------------------------------------------- */
@@ -2446,11 +2444,11 @@ void gdu_device_op_drive_benchmark (GduDevice                             *devic
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_Device_drive_benchmark_async (device->priv->proxy,
-                                                                      do_write_benchmark,
-                                                                      (const gchar **) options,
-                                                                      op_drive_benchmark_cb,
-                                                                      data);
+        org_freedesktop_UDisks_Device_drive_benchmark_async (device->priv->proxy,
+                                                             do_write_benchmark,
+                                                             (const gchar **) options,
+                                                             op_drive_benchmark_cb,
+                                                             data);
 }
 
 
diff --git a/src/gdu/gdu-error.c b/src/gdu/gdu-error.c
index 665d8b3..20b00d1 100644
--- a/src/gdu/gdu-error.c
+++ b/src/gdu/gdu-error.c
@@ -69,25 +69,25 @@ _gdu_error_fixup (GError *error)
                 return;
 
         matched = TRUE;
-        if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.Failed") == 0)
+        if (strcmp (name, "org.freedesktop.UDisks.Error.Failed") == 0)
                 error->code = GDU_ERROR_FAILED;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.Busy") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.Busy") == 0)
                 error->code = GDU_ERROR_BUSY;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.Cancelled") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.Cancelled") == 0)
                 error->code = GDU_ERROR_CANCELLED;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.Inhibited") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.Inhibited") == 0)
                 error->code = GDU_ERROR_INHIBITED;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.InvalidOption") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.InvalidOption") == 0)
                 error->code = GDU_ERROR_INVALID_OPTION;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.NotSupported") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.NotSupported") == 0)
                 error->code = GDU_ERROR_NOT_SUPPORTED;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.AtaSmartWouldWakeup") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.AtaSmartWouldWakeup") == 0)
                 error->code = GDU_ERROR_ATA_SMART_WOULD_WAKEUP;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.PermissionDenied") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.PermissionDenied") == 0)
                 error->code = GDU_ERROR_PERMISSION_DENIED;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.FilesystemDriverMissing") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.FilesystemDriverMissing") == 0)
                 error->code = GDU_ERROR_FILESYSTEM_DRIVER_MISSING;
-        else if (strcmp (name, "org.freedesktop.DeviceKit.Disks.Error.FilesystemToolsMissing") == 0)
+        else if (strcmp (name, "org.freedesktop.UDisks.Error.FilesystemToolsMissing") == 0)
                 error->code = GDU_ERROR_FILESYSTEM_TOOLS_MISSING;
         else
                 matched = FALSE;
diff --git a/src/gdu/gdu-error.h b/src/gdu/gdu-error.h
index 53ac0d2..a14e7e9 100644
--- a/src/gdu/gdu-error.h
+++ b/src/gdu/gdu-error.h
@@ -62,7 +62,7 @@ typedef enum
 /**
  * GDU_ERROR:
  *
- * Error domain used for errors reported from DeviceKit-disks daemon
+ * Error domain used for errors reported from udisks daemon
  * via D-Bus. Note that not all remote errors are mapped to this
  * domain. Errors in this domain will come from the #GduError
  * enumeration. See #GError for more information on error domains.
diff --git a/src/gdu/gdu-expander.c b/src/gdu/gdu-expander.c
index 376df7a..83ae243 100644
--- a/src/gdu/gdu-expander.c
+++ b/src/gdu/gdu-expander.c
@@ -31,14 +31,14 @@
 #include "gdu-private.h"
 #include "gdu-pool.h"
 #include "gdu-expander.h"
-#include "devkit-disks-expander-glue.h"
+#include "udisks-expander-glue.h"
 
 /* --- SUCKY CODE BEGIN --- */
 
 /* This totally sucks; dbus-bindings-tool and dbus-glib should be able
  * to do this for us.
  *
- * TODO: keep in sync with code in tools/devkit-disks in DeviceKit-disks.
+ * TODO: keep in sync with code in tools/udisks in udisks.
  */
 
 typedef struct
@@ -110,12 +110,12 @@ expander_properties_get (DBusGConnection *bus,
         GError *error;
         GHashTable *hash_table;
         DBusGProxy *prop_proxy;
-        const char *ifname = "org.freedesktop.DeviceKit.Disks.Expander";
+        const char *ifname = "org.freedesktop.UDisks.Expander";
 
         props = g_new0 (ExpanderProperties, 1);
 
 	prop_proxy = dbus_g_proxy_new_for_name (bus,
-                                                "org.freedesktop.DeviceKit.Disks",
+                                                "org.freedesktop.UDisks",
                                                 object_path,
                                                 "org.freedesktop.DBus.Properties");
         error = NULL;
@@ -282,9 +282,9 @@ _gdu_expander_new_from_object_path (GduPool *pool, const char *object_path)
         }
 
 	expander->priv->proxy = dbus_g_proxy_new_for_name (expander->priv->bus,
-                                                         "org.freedesktop.DeviceKit.Disks",
+                                                         "org.freedesktop.UDisks",
                                                          expander->priv->object_path,
-                                                         "org.freedesktop.DeviceKit.Disks.Expander");
+                                                         "org.freedesktop.UDisks.Expander");
         dbus_g_proxy_set_default_timeout (expander->priv->proxy, INT_MAX);
         dbus_g_proxy_add_signal (expander->priv->proxy, "Changed", G_TYPE_INVALID);
 
diff --git a/src/gdu/gdu-pool.c b/src/gdu/gdu-pool.c
index d3677de..6621468 100644
--- a/src/gdu/gdu-pool.c
+++ b/src/gdu/gdu-pool.c
@@ -38,7 +38,7 @@
 #include "gdu-known-filesystem.h"
 #include "gdu-private.h"
 
-#include "devkit-disks-daemon-glue.h"
+#include "udisks-daemon-glue.h"
 #include "gdu-marshal.h"
 
 /**
@@ -46,7 +46,7 @@
  * @title: GduPool
  * @short_description: Enumerate and monitor storage devices
  *
- * The #GduPool object represents a connection to the DeviceKit-disks daemon.
+ * The #GduPool object represents a connection to the udisks daemon.
  */
 
 enum {
@@ -1590,15 +1590,15 @@ get_properties (GduPool *pool)
         ret = FALSE;
 
 	prop_proxy = dbus_g_proxy_new_for_name (pool->priv->bus,
-                                                "org.freedesktop.DeviceKit.Disks",
-                                                "/org/freedesktop/DeviceKit/Disks",
+                                                "org.freedesktop.UDisks",
+                                                "/org/freedesktop/UDisks",
                                                 "org.freedesktop.DBus.Properties");
         error = NULL;
         if (!dbus_g_proxy_call (prop_proxy,
                                 "GetAll",
                                 &error,
                                 G_TYPE_STRING,
-                                "org.freedesktop.DeviceKit.Disks",
+                                "org.freedesktop.UDisks",
                                 G_TYPE_INVALID,
                                 dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
                                 &hash_table,
@@ -1684,9 +1684,9 @@ gdu_pool_new (void)
                 G_TYPE_INVALID);
 
 	pool->priv->proxy = dbus_g_proxy_new_for_name (pool->priv->bus,
-                                                       "org.freedesktop.DeviceKit.Disks",
-                                                       "/org/freedesktop/DeviceKit/Disks",
-                                                       "org.freedesktop.DeviceKit.Disks");
+                                                       "org.freedesktop.UDisks",
+                                                       "/org/freedesktop/UDisks",
+                                                       "org.freedesktop.UDisks");
         dbus_g_proxy_add_signal (pool->priv->proxy, "DeviceAdded", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
         dbus_g_proxy_add_signal (pool->priv->proxy, "DeviceRemoved", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
         dbus_g_proxy_add_signal (pool->priv->proxy, "DeviceChanged", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
@@ -1747,7 +1747,7 @@ gdu_pool_new (void)
 
         /* prime the list of devices */
         error = NULL;
-        if (!org_freedesktop_DeviceKit_Disks_enumerate_devices (pool->priv->proxy, &devices, &error)) {
+        if (!org_freedesktop_UDisks_enumerate_devices (pool->priv->proxy, &devices, &error)) {
                 g_warning ("Couldn't enumerate devices: %s", error->message);
                 g_error_free (error);
                 goto error;
@@ -1772,7 +1772,7 @@ gdu_pool_new (void)
 
         /* prime the list of adapters */
         error = NULL;
-        if (!org_freedesktop_DeviceKit_Disks_enumerate_adapters (pool->priv->proxy, &adapters, &error)) {
+        if (!org_freedesktop_UDisks_enumerate_adapters (pool->priv->proxy, &adapters, &error)) {
                 g_warning ("Couldn't enumerate adapters: %s", error->message);
                 g_error_free (error);
                 goto error;
@@ -1794,7 +1794,7 @@ gdu_pool_new (void)
 
         /* prime the list of expanders */
         error = NULL;
-        if (!org_freedesktop_DeviceKit_Disks_enumerate_expanders (pool->priv->proxy, &expanders, &error)) {
+        if (!org_freedesktop_UDisks_enumerate_expanders (pool->priv->proxy, &expanders, &error)) {
                 g_warning ("Couldn't enumerate expanders: %s", error->message);
                 g_error_free (error);
                 goto error;
@@ -1816,7 +1816,7 @@ gdu_pool_new (void)
 
         /* prime the list of ports */
         error = NULL;
-        if (!org_freedesktop_DeviceKit_Disks_enumerate_ports (pool->priv->proxy, &ports, &error)) {
+        if (!org_freedesktop_UDisks_enumerate_ports (pool->priv->proxy, &ports, &error)) {
                 g_warning ("Couldn't enumerate ports: %s", error->message);
                 g_error_free (error);
                 goto error;
@@ -2438,11 +2438,11 @@ gdu_pool_op_linux_md_start (GduPool *pool,
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_linux_md_start_async (pool->priv->proxy,
-                                                              component_objpaths,
-                                                              (const char **) options,
-                                                              op_linux_md_start_cb,
-                                                              data);
+        org_freedesktop_UDisks_linux_md_start_async (pool->priv->proxy,
+                                                     component_objpaths,
+                                                     (const char **) options,
+                                                     op_linux_md_start_cb,
+                                                     data);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -2494,14 +2494,14 @@ gdu_pool_op_linux_md_create (GduPool *pool,
         data->callback = callback;
         data->user_data = user_data;
 
-        org_freedesktop_DeviceKit_Disks_linux_md_create_async (pool->priv->proxy,
-                                                               component_objpaths,
-                                                               level,
-                                                               stripe_size,
-                                                               name,
-                                                               (const char **) options,
-                                                               op_linux_md_create_cb,
-                                                               data);
+        org_freedesktop_UDisks_linux_md_create_async (pool->priv->proxy,
+                                                      component_objpaths,
+                                                      level,
+                                                      stripe_size,
+                                                      name,
+                                                      (const char **) options,
+                                                      op_linux_md_create_cb,
+                                                      data);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -2510,9 +2510,9 @@ gdu_pool_op_linux_md_create (GduPool *pool,
  * gdu_pool_get_daemon_version:
  * @pool: A #GduPool.
  *
- * Get the version of the DeviceKit-daemon on the system.
+ * Get the version of the udisks on the system.
  *
- * Returns: The version of DeviceKit-disks daemon. Caller must free
+ * Returns: The version of udisks daemon. Caller must free
  * this string using g_free().
  **/
 char *
@@ -2542,15 +2542,15 @@ gdu_pool_is_daemon_inhibited (GduPool *pool)
         ret = TRUE;
 
 	prop_proxy = dbus_g_proxy_new_for_name (pool->priv->bus,
-                                                "org.freedesktop.DeviceKit.Disks",
-                                                "/org/freedesktop/DeviceKit/Disks",
+                                                "org.freedesktop.UDisks",
+                                                "/org/freedesktop/UDisks",
                                                 "org.freedesktop.DBus.Properties");
         error = NULL;
         if (!dbus_g_proxy_call (prop_proxy,
                                 "Get",
                                 &error,
                                 G_TYPE_STRING,
-                                "org.freedesktop.DeviceKit.Disks",
+                                "org.freedesktop.UDisks",
                                 G_TYPE_STRING,
                                 "daemon-is-inhibited",
                                 G_TYPE_INVALID,
@@ -2575,7 +2575,7 @@ gdu_pool_is_daemon_inhibited (GduPool *pool)
  * gdu_pool_get_known_filesystems:
  * @pool: A #GduPool.
  *
- * Get a list of file systems known to the DeviceKit-disks daemon.
+ * Get a list of file systems known to the udisks daemon.
  *
  * Returns: A #GList of #GduKnownFilesystem objects. Caller must free
  * this (unref all objects, then use g_list_free()).
@@ -2622,7 +2622,7 @@ out:
  * gdu_pool_supports_luks_devices:
  * @pool: A #GduPool.
  *
- * Determine if the DeviceKit-disks daemon supports LUKS encrypted
+ * Determine if the udisks daemon supports LUKS encrypted
  * devices.
  *
  * Returns: #TRUE only if the daemon supports LUKS encrypted devices.
diff --git a/src/gdu/gdu-port.c b/src/gdu/gdu-port.c
index c02c28f..8a72b98 100644
--- a/src/gdu/gdu-port.c
+++ b/src/gdu/gdu-port.c
@@ -31,14 +31,14 @@
 #include "gdu-private.h"
 #include "gdu-pool.h"
 #include "gdu-port.h"
-#include "devkit-disks-port-glue.h"
+#include "udisks-port-glue.h"
 
 /* --- SUCKY CODE BEGIN --- */
 
 /* This totally sucks; dbus-bindings-tool and dbus-glib should be able
  * to do this for us.
  *
- * TODO: keep in sync with code in tools/devkit-disks in DeviceKit-disks.
+ * TODO: keep in sync with code in tools/udisks in udisks.
  */
 
 typedef struct
@@ -88,12 +88,12 @@ port_properties_get (DBusGConnection *bus,
         GError *error;
         GHashTable *hash_table;
         DBusGProxy *prop_proxy;
-        const char *ifname = "org.freedesktop.DeviceKit.Disks.Port";
+        const char *ifname = "org.freedesktop.UDisks.Port";
 
         props = g_new0 (PortProperties, 1);
 
 	prop_proxy = dbus_g_proxy_new_for_name (bus,
-                                                "org.freedesktop.DeviceKit.Disks",
+                                                "org.freedesktop.UDisks",
                                                 object_path,
                                                 "org.freedesktop.DBus.Properties");
         error = NULL;
@@ -251,9 +251,9 @@ _gdu_port_new_from_object_path (GduPool *pool, const char *object_path)
         }
 
 	port->priv->proxy = dbus_g_proxy_new_for_name (port->priv->bus,
-                                                         "org.freedesktop.DeviceKit.Disks",
+                                                         "org.freedesktop.UDisks",
                                                          port->priv->object_path,
-                                                         "org.freedesktop.DeviceKit.Disks.Port");
+                                                         "org.freedesktop.UDisks.Port");
         dbus_g_proxy_set_default_timeout (port->priv->proxy, INT_MAX);
         dbus_g_proxy_add_signal (port->priv->proxy, "Changed", G_TYPE_INVALID);
 



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