[gnome-disk-utility] Depend on the latest DeviceKit-disks API



commit ead40c49264f03384b8a6c3be9a5c271e28d7be1
Author: David Zeuthen <davidz redhat com>
Date:   Fri Sep 18 12:45:02 2009 -0400

    Depend on the latest DeviceKit-disks API
    
    The daemon is now using WindowsStyleCaps for property names.

 configure.ac         |    2 +-
 src/gdu/gdu-device.c |  198 +++++++++++++++++++++++++-------------------------
 src/gdu/gdu-pool.c   |   12 ++--
 3 files changed, 106 insertions(+), 106 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e22fd74..74cd1b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,7 @@ GTK2_REQUIRED=2.17.2
 UNIQUE_REQUIRED=1.0
 LIBNOTIFY_REQUIRED=0.3.0
 NAUTILUS_REQUIRED=2.24.0
-DEVKIT_DISKS_REQUIRED=006
+DEVKIT_DISKS_REQUIRED=007
 
 SCROLLKEEPER_REQUIRED=0.3.14
 INTLTOOL_REQUIRED=0.35.0
diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
index a38b08b..81f7eaa 100644
--- a/src/gdu/gdu-device.c
+++ b/src/gdu/gdu-device.c
@@ -162,211 +162,211 @@ collect_props (const char *key, const GValue *value, DeviceProperties *props)
 {
         gboolean handled = TRUE;
 
-        if (strcmp (key, "native-path") == 0)
+        if (strcmp (key, "NativePath") == 0)
                 props->native_path = g_strdup (g_value_get_string (value));
 
-        else if (strcmp (key, "device-detection-time") == 0)
+        else if (strcmp (key, "DeviceDetectionTime") == 0)
                 props->device_detection_time = g_value_get_uint64 (value);
-        else if (strcmp (key, "device-media-detection-time") == 0)
+        else if (strcmp (key, "DeviceMediaDetectionTime") == 0)
                 props->device_media_detection_time = g_value_get_uint64 (value);
-        else if (strcmp (key, "device-major") == 0)
+        else if (strcmp (key, "DeviceMajor") == 0)
                 props->device_major = g_value_get_int64 (value);
-        else if (strcmp (key, "device-minor") == 0)
+        else if (strcmp (key, "DeviceMinor") == 0)
                 props->device_minor = g_value_get_int64 (value);
-        else if (strcmp (key, "device-file") == 0)
+        else if (strcmp (key, "DeviceFile") == 0)
                 props->device_file = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "device-file-by-id") == 0)
+        else if (strcmp (key, "DeviceFileById") == 0)
                 props->device_file_by_id = g_strdupv (g_value_get_boxed (value));
-        else if (strcmp (key, "device-file-by-path") == 0)
+        else if (strcmp (key, "DeviceFileByPath") == 0)
                 props->device_file_by_path = g_strdupv (g_value_get_boxed (value));
-        else if (strcmp (key, "device-is-system-internal") == 0)
+        else if (strcmp (key, "DeviceIsSystemInternal") == 0)
                 props->device_is_system_internal = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-partition") == 0)
+        else if (strcmp (key, "DeviceIsPartition") == 0)
                 props->device_is_partition = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-partition-table") == 0)
+        else if (strcmp (key, "DeviceIsPartitionTable") == 0)
                 props->device_is_partition_table = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-removable") == 0)
+        else if (strcmp (key, "DeviceIsRemovable") == 0)
                 props->device_is_removable = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-media-available") == 0)
+        else if (strcmp (key, "DeviceIsMediaAvailable") == 0)
                 props->device_is_media_available = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-media-change-detected") == 0)
+        else if (strcmp (key, "DeviceIsMediaChangeDetected") == 0)
                 props->device_is_media_change_detected = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-media-change-detection-polling") == 0)
+        else if (strcmp (key, "DeviceIsMediaChangeDetectionPolling") == 0)
                 props->device_is_media_change_detection_polling = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-media-change-detection-inhibitable") == 0)
+        else if (strcmp (key, "DeviceIsMediaChangeDetectionInhibitable") == 0)
                 props->device_is_media_change_detection_inhibitable = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-media-change-detection-inhibited") == 0)
+        else if (strcmp (key, "DeviceIsMediaChangeDetectionInhibited") == 0)
                 props->device_is_media_change_detection_inhibited = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-read-only") == 0)
+        else if (strcmp (key, "DeviceIsReadOnly") == 0)
                 props->device_is_read_only = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-drive") == 0)
+        else if (strcmp (key, "DeviceIsDrive") == 0)
                 props->device_is_drive = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-optical-disc") == 0)
+        else if (strcmp (key, "DeviceIsOpticalDisc") == 0)
                 props->device_is_optical_disc = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-luks") == 0)
+        else if (strcmp (key, "DeviceIsLuks") == 0)
                 props->device_is_luks = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-luks-cleartext") == 0)
+        else if (strcmp (key, "DeviceIsLuksCleartext") == 0)
                 props->device_is_luks_cleartext = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-linux-md-component") == 0)
+        else if (strcmp (key, "DeviceIsLinuxMdComponent") == 0)
                 props->device_is_linux_md_component = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-linux-md") == 0)
+        else if (strcmp (key, "DeviceIsLinuxMd") == 0)
                 props->device_is_linux_md = g_value_get_boolean (value);
-        else if (strcmp (key, "device-is-mounted") == 0)
+        else if (strcmp (key, "DeviceIsMounted") == 0)
                 props->device_is_mounted = g_value_get_boolean (value);
-        else if (strcmp (key, "device-mount-paths") == 0)
+        else if (strcmp (key, "DeviceMountPaths") == 0)
                 props->device_mount_paths = g_strdupv (g_value_get_boxed (value));
-        else if (strcmp (key, "device-mounted-by-uid") == 0)
+        else if (strcmp (key, "DeviceMountedByUid") == 0)
                 props->device_mounted_by_uid = g_value_get_uint (value);
-        else if (strcmp (key, "device-presentation-hide") == 0)
+        else if (strcmp (key, "DevicePresentationHide") == 0)
                 props->device_presentation_hide = g_value_get_boolean (value);
-        else if (strcmp (key, "device-presentation-nopolicy") == 0)
+        else if (strcmp (key, "DevicePresentationNopolicy") == 0)
                 props->device_presentation_nopolicy = g_value_get_boolean (value);
-        else if (strcmp (key, "device-presentation-name") == 0)
+        else if (strcmp (key, "DevicePresentationName") == 0)
                 props->device_presentation_name = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "device-presentation-icon-name") == 0)
+        else if (strcmp (key, "DevicePresentationIconName") == 0)
                 props->device_presentation_icon_name = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "device-size") == 0)
+        else if (strcmp (key, "DeviceSize") == 0)
                 props->device_size = g_value_get_uint64 (value);
-        else if (strcmp (key, "device-block-size") == 0)
+        else if (strcmp (key, "DeviceBlockSize") == 0)
                 props->device_block_size = g_value_get_uint64 (value);
 
-        else if (strcmp (key, "job-in-progress") == 0)
+        else if (strcmp (key, "JobInProgress") == 0)
                 props->job_in_progress = g_value_get_boolean (value);
-        else if (strcmp (key, "job-id") == 0)
+        else if (strcmp (key, "JobId") == 0)
                 props->job_id = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "job-initiated-by-uid") == 0)
+        else if (strcmp (key, "JobInitiatedByUid") == 0)
                 props->job_initiated_by_uid = g_value_get_uint (value);
-        else if (strcmp (key, "job-is-cancellable") == 0)
+        else if (strcmp (key, "JobIsCancellable") == 0)
                 props->job_is_cancellable = g_value_get_boolean (value);
-        else if (strcmp (key, "job-percentage") == 0)
+        else if (strcmp (key, "JobPercentage") == 0)
                 props->job_percentage = g_value_get_double (value);
 
-        else if (strcmp (key, "id-usage") == 0)
+        else if (strcmp (key, "IdUsage") == 0)
                 props->id_usage = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "id-type") == 0)
+        else if (strcmp (key, "IdType") == 0)
                 props->id_type = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "id-version") == 0)
+        else if (strcmp (key, "IdVersion") == 0)
                 props->id_version = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "id-uuid") == 0)
+        else if (strcmp (key, "IdUuid") == 0)
                 props->id_uuid = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "id-label") == 0)
+        else if (strcmp (key, "IdLabel") == 0)
                 props->id_label = g_strdup (g_value_get_string (value));
 
-        else if (strcmp (key, "partition-slave") == 0)
+        else if (strcmp (key, "PartitionSlave") == 0)
                 props->partition_slave = g_strdup (g_value_get_boxed (value));
-        else if (strcmp (key, "partition-scheme") == 0)
+        else if (strcmp (key, "PartitionScheme") == 0)
                 props->partition_scheme = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "partition-number") == 0)
+        else if (strcmp (key, "PartitionNumber") == 0)
                 props->partition_number = g_value_get_int (value);
-        else if (strcmp (key, "partition-type") == 0)
+        else if (strcmp (key, "PartitionType") == 0)
                 props->partition_type = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "partition-label") == 0)
+        else if (strcmp (key, "PartitionLabel") == 0)
                 props->partition_label = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "partition-uuid") == 0)
+        else if (strcmp (key, "PartitionUuid") == 0)
                 props->partition_uuid = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "partition-flags") == 0)
+        else if (strcmp (key, "PartitionFlags") == 0)
                 props->partition_flags = g_strdupv (g_value_get_boxed (value));
-        else if (strcmp (key, "partition-offset") == 0)
+        else if (strcmp (key, "PartitionOffset") == 0)
                 props->partition_offset = g_value_get_uint64 (value);
-        else if (strcmp (key, "partition-size") == 0)
+        else if (strcmp (key, "PartitionSize") == 0)
                 props->partition_size = g_value_get_uint64 (value);
 
-        else if (strcmp (key, "partition-table-scheme") == 0)
+        else if (strcmp (key, "PartitionTableScheme") == 0)
                 props->partition_table_scheme = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "partition-table-count") == 0)
+        else if (strcmp (key, "PartitionTableCount") == 0)
                 props->partition_table_count = g_value_get_int (value);
 
-        else if (strcmp (key, "luks-holder") == 0)
+        else if (strcmp (key, "LuksHolder") == 0)
                 props->luks_holder = g_strdup (g_value_get_boxed (value));
 
-        else if (strcmp (key, "luks-cleartext-slave") == 0)
+        else if (strcmp (key, "LuksCleartextSlave") == 0)
                 props->luks_cleartext_slave = g_strdup (g_value_get_boxed (value));
-        else if (strcmp (key, "luks-cleartext-unlocked-by-uid") == 0)
+        else if (strcmp (key, "LuksCleartextUnlockedByUid") == 0)
                 props->luks_cleartext_unlocked_by_uid = g_value_get_uint (value);
 
-        else if (strcmp (key, "drive-vendor") == 0)
+        else if (strcmp (key, "DriveVendor") == 0)
                 props->drive_vendor = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-model") == 0)
+        else if (strcmp (key, "DriveModel") == 0)
                 props->drive_model = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-revision") == 0)
+        else if (strcmp (key, "DriveRevision") == 0)
                 props->drive_revision = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-serial") == 0)
+        else if (strcmp (key, "DriveSerial") == 0)
                 props->drive_serial = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-connection-interface") == 0)
+        else if (strcmp (key, "DriveConnectionInterface") == 0)
                 props->drive_connection_interface = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-connection-speed") == 0)
+        else if (strcmp (key, "DriveConnectionSpeed") == 0)
                 props->drive_connection_speed = g_value_get_uint64 (value);
-        else if (strcmp (key, "drive-media-compatibility") == 0)
+        else if (strcmp (key, "DriveMediaCompatibility") == 0)
                 props->drive_media_compatibility = g_strdupv (g_value_get_boxed (value));
-        else if (strcmp (key, "drive-media") == 0)
+        else if (strcmp (key, "DriveMedia") == 0)
                 props->drive_media = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-is-media-ejectable") == 0)
+        else if (strcmp (key, "DriveIsMediaEjectable") == 0)
                 props->drive_is_media_ejectable = g_value_get_boolean (value);
-        else if (strcmp (key, "drive-can-detach") == 0)
+        else if (strcmp (key, "DriveCanDetach") == 0)
                 props->drive_can_detach = g_value_get_boolean (value);
-        else if (strcmp (key, "drive-can-spindown") == 0)
+        else if (strcmp (key, "DriveCanSpindown") == 0)
                 props->drive_can_spindown = g_value_get_boolean (value);
-        else if (strcmp (key, "drive-is-rotational") == 0)
+        else if (strcmp (key, "DriveIsRotational") == 0)
                 props->drive_is_rotational = g_value_get_boolean (value);
 
-        else if (strcmp (key, "optical-disc-is-blank") == 0)
+        else if (strcmp (key, "OpticalDiscIsBlank") == 0)
                 props->optical_disc_is_blank = g_value_get_boolean (value);
-        else if (strcmp (key, "optical-disc-is-appendable") == 0)
+        else if (strcmp (key, "OpticalDiscIsAppendable") == 0)
                 props->optical_disc_is_appendable = g_value_get_boolean (value);
-        else if (strcmp (key, "optical-disc-is-closed") == 0)
+        else if (strcmp (key, "OpticalDiscIsClosed") == 0)
                 props->optical_disc_is_closed = g_value_get_boolean (value);
-        else if (strcmp (key, "optical-disc-num-tracks") == 0)
+        else if (strcmp (key, "OpticalDiscNumTracks") == 0)
                 props->optical_disc_num_tracks = g_value_get_uint (value);
-        else if (strcmp (key, "optical-disc-num-audio-tracks") == 0)
+        else if (strcmp (key, "OpticalDiscNumAudioTracks") == 0)
                 props->optical_disc_num_audio_tracks = g_value_get_uint (value);
-        else if (strcmp (key, "optical-disc-num-sessions") == 0)
+        else if (strcmp (key, "OpticalDiscNumSessions") == 0)
                 props->optical_disc_num_sessions = g_value_get_uint (value);
 
-        else if (strcmp (key, "drive-ata-smart-is-available") == 0)
+        else if (strcmp (key, "DriveAtaSmartIsAvailable") == 0)
                 props->drive_ata_smart_is_available = g_value_get_boolean (value);
-        else if (strcmp (key, "drive-ata-smart-time-collected") == 0)
+        else if (strcmp (key, "DriveAtaSmartTimeCollected") == 0)
                 props->drive_ata_smart_time_collected = g_value_get_uint64 (value);
-        else if (strcmp (key, "drive-ata-smart-status") == 0)
+        else if (strcmp (key, "DriveAtaSmartStatus") == 0)
                 props->drive_ata_smart_status = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "drive-ata-smart-blob") == 0) {
+        else if (strcmp (key, "DriveAtaSmartBlob") == 0) {
                 GArray *a = g_value_get_boxed (value);
                 g_free (props->drive_ata_smart_blob);
                 props->drive_ata_smart_blob = g_memdup (a->data, a->len);
                 props->drive_ata_smart_blob_size = a->len;
         }
 
-        else if (strcmp (key, "linux-md-component-level") == 0)
+        else if (strcmp (key, "LinuxMdComponentLevel") == 0)
                 props->linux_md_component_level = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-component-num-raid-devices") == 0)
+        else if (strcmp (key, "LinuxMdComponentNumRaidDevices") == 0)
                 props->linux_md_component_num_raid_devices = g_value_get_int (value);
-        else if (strcmp (key, "linux-md-component-uuid") == 0)
+        else if (strcmp (key, "LinuxMdComponentUuid") == 0)
                 props->linux_md_component_uuid = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-component-home-host") == 0)
+        else if (strcmp (key, "LinuxMdComponentHomeHost") == 0)
                 props->linux_md_component_home_host = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-component-name") == 0)
+        else if (strcmp (key, "LinuxMdComponentName") == 0)
                 props->linux_md_component_name = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-component-version") == 0)
+        else if (strcmp (key, "LinuxMdComponentVersion") == 0)
                 props->linux_md_component_version = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-component-holder") == 0)
+        else if (strcmp (key, "LinuxMdComponentHolder") == 0)
                 props->linux_md_component_holder = g_strdup (g_value_get_boxed (value));
-        else if (strcmp (key, "linux-md-component-state") == 0)
+        else if (strcmp (key, "LinuxMdComponentState") == 0)
                 props->linux_md_component_state = g_strdupv (g_value_get_boxed (value));
 
-        else if (strcmp (key, "linux-md-state") == 0)
+        else if (strcmp (key, "LinuxMdState") == 0)
                 props->linux_md_state = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-level") == 0)
+        else if (strcmp (key, "LinuxMdLevel") == 0)
                 props->linux_md_level = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-num-raid-devices") == 0)
+        else if (strcmp (key, "LinuxMdNumRaidDevices") == 0)
                 props->linux_md_num_raid_devices = g_value_get_int (value);
-        else if (strcmp (key, "linux-md-uuid") == 0)
+        else if (strcmp (key, "LinuxMdUuid") == 0)
                 props->linux_md_uuid = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-home-host") == 0)
+        else if (strcmp (key, "LinuxMdHomeHost") == 0)
                 props->linux_md_home_host = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-name") == 0)
+        else if (strcmp (key, "LinuxMdName") == 0)
                 props->linux_md_name = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-version") == 0)
+        else if (strcmp (key, "LinuxMdVersion") == 0)
                 props->linux_md_version = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-slaves") == 0) {
+        else if (strcmp (key, "LinuxMdSlaves") == 0) {
                 int n;
                 GPtrArray *object_paths;
 
@@ -377,13 +377,13 @@ collect_props (const char *key, const GValue *value, DeviceProperties *props)
                         props->linux_md_slaves[n] = g_strdup (object_paths->pdata[n]);
                 props->linux_md_slaves[n] = NULL;
         }
-        else if (strcmp (key, "linux-md-is-degraded") == 0)
+        else if (strcmp (key, "LinuxMdIsDegraded") == 0)
                 props->linux_md_is_degraded = g_value_get_boolean (value);
-        else if (strcmp (key, "linux-md-sync-action") == 0)
+        else if (strcmp (key, "LinuxMdSyncAction") == 0)
                 props->linux_md_sync_action = g_strdup (g_value_get_string (value));
-        else if (strcmp (key, "linux-md-sync-percentage") == 0)
+        else if (strcmp (key, "LinuxMdSyncPercentage") == 0)
                 props->linux_md_sync_percentage = g_value_get_double (value);
-        else if (strcmp (key, "linux-md-sync-speed") == 0)
+        else if (strcmp (key, "LinuxMdSyncSpeed") == 0)
                 props->linux_md_sync_speed = g_value_get_uint64 (value);
 
         else
diff --git a/src/gdu/gdu-pool.c b/src/gdu/gdu-pool.c
index 180f368..0258e6e 100644
--- a/src/gdu/gdu-pool.c
+++ b/src/gdu/gdu-pool.c
@@ -1019,23 +1019,23 @@ get_properties (GduPool *pool)
                 goto out;
         }
 
-        value = g_hash_table_lookup (hash_table, "daemon-version");
+        value = g_hash_table_lookup (hash_table, "DaemonVersion");
         if (value == NULL) {
-                g_warning ("No property 'daemon-version'");
+                g_warning ("No property 'DaemonVersion'");
                 goto out;
         }
         pool->priv->daemon_version = g_strdup (g_value_get_string (value));
 
-        value = g_hash_table_lookup (hash_table, "supports-luks-devices");
+        value = g_hash_table_lookup (hash_table, "SupportsLuksDevices");
         if (value == NULL) {
-                g_warning ("No property 'supports-luks-devices'");
+                g_warning ("No property 'SupportsLuksDevices'");
                 goto out;
         }
         pool->priv->supports_luks_devices = g_value_get_boolean (value);
 
-        value = g_hash_table_lookup (hash_table, "known-filesystems");
+        value = g_hash_table_lookup (hash_table, "KnownFilesystems");
         if (value == NULL) {
-                g_warning ("No property 'known-filesystems'");
+                g_warning ("No property 'KnownFilesystems'");
                 goto out;
         }
         known_filesystems_array = g_value_get_boxed (value);



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