Rename BlockDevice interface to Block
authorDavid Zeuthen <davidz@redhat.com>
Wed, 24 Aug 2011 18:27:19 +0000 (14:27 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Wed, 24 Aug 2011 18:27:19 +0000 (14:27 -0400)
Signed-off-by: David Zeuthen <davidz@redhat.com>
21 files changed:
data/org.freedesktop.UDisks2.xml
doc/udisks2-docs.xml
doc/udisks2-sections.txt
doc/udisks2.types
src/udisksdaemon.c
src/udisksdaemon.h
src/udisksdaemonutil.c
src/udiskslinuxblock.c
src/udiskslinuxblock.h
src/udiskslinuxblockobject.c
src/udiskslinuxdrive.c
src/udiskslinuxdriveata.c
src/udiskslinuxdriveobject.c
src/udiskslinuxencrypted.c
src/udiskslinuxfilesystem.c
src/udiskslinuxloop.c
src/udiskslinuxmanager.c
src/udiskslinuxprovider.c
src/udiskslinuxswapspace.c
tools/udisksctl.c
tools/umount-udisks.c

index fe9b395..280b846 100644 (file)
@@ -39,7 +39,7 @@
         LoopSetup:
         @fd: An index for the file descriptor to use.
         @options: Options - known options (in addition to <link linkend="udisks-std-options">standard options</link>) includes <parameter>offset</parameter> (of type 't'), <parameter>size</parameter> (of type 't') and <parameter>read-only</parameter> (of type 'b').
-        @resulting_device: An object path to the object implementing the #org.freedesktop.UDisks2.BlockDevice interface.
+        @resulting_device: An object path to the object implementing the #org.freedesktop.UDisks2.Block interface.
 
         Creates a block device for the file represented by @fd.
     -->
       removable media.
 
       This interface should not to be confused with the
-      #org.freedesktop.UDisks2.BlockDevice interface that is used for
-      any low-level block devices the OS knows about. For example, if
+      #org.freedesktop.UDisks2.Block interface that is used for
+      low-level block devices the OS knows about. For example, if
       <filename>/dev/sda</filename> and <filename>/dev/sdb</filename>
       are block devices for two paths to the same drive, there will be
       only one #org.freedesktop.UDisks2.Drive object but two
-      #org.freedesktop.UDisks2.BlockDevice objects.
+      #org.freedesktop.UDisks2.Block objects.
   -->
   <interface name="org.freedesktop.UDisks2.Drive">
     <!-- Vendor: A name for the vendor of the drive or blank if unknown. -->
   <!-- ********************************************************************** -->
 
   <!--
-    org.freedesktop.UDisks2.BlockDevice:
+    org.freedesktop.UDisks2.Block:
     @short_description: Low-level Block Device
 
     This interface represents a block device.
 
-    This should not be confused with the #org.freedesktop.UDisks2.Drive
-    interface that is used to represent disk drives. For example, the
-    #org.freedesktop.UDisks2.BlockDevice interface is also used for
-    block devices that do not correspond to drives at all (e.g. <ulink
+    This should not be confused with the
+    #org.freedesktop.UDisks2.Drive interface that is used to represent
+    disk drives. For example, the #org.freedesktop.UDisks2.Block
+    interface is also used for block devices that do not correspond to
+    drives at all (e.g. <ulink
     url="http://en.wikipedia.org/wiki/Loop_device">Loop
     Devices</ulink>).
   -->
-  <interface name="org.freedesktop.UDisks2.BlockDevice">
+  <interface name="org.freedesktop.UDisks2.Block">
     <!-- Device: The special device file for the block device e.g. <filename>/dev/sda2</filename>. -->
     <property name="Device" type="ay" access="read"/>
     <!-- Symlinks:
 
          Known symlinks in <filename>/dev</filename> that points to
          the device file in the
-         #org.freedesktop.UDisks2.BlockDevice:Device property.
+         #org.freedesktop.UDisks2.Block:Device property.
 
          For example, this array could include symlinks such as
          <filename>/dev/disk/by-id/ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</filename>
 
     <!-- PreferredDevice:
          The special device file to present in the UI instead of the value
-         of the #org.freedesktop.UDisks2.BlockDevice:Device property.
+         of the #org.freedesktop.UDisks2.Block:Device property.
 
          For example this could be
          e.g. <filename>/dev/mapper/mpathk</filename> for a multipath
         IdType:
         This property contains more information about the result of
         probing the block device. Its value depends of the value the
-        #org.freedesktop.UDisks2.BlockDevice:IdUsage property:
+        #org.freedesktop.UDisks2.Block:IdUsage property:
         <variablelist>
         <varlistentry><term>filesystem</term>
           <listitem><para>The mountable file system that was detected (e.g. <literal>vfat</literal>).</para></listitem>
          actual configuration data.
 
          Use the
-         org.freedesktop.UDisks2.BlockDevice.AddConfigurationItem(),
-         org.freedesktop.UDisks2.BlockDevice.RemoveConfigurationItem()
+         org.freedesktop.UDisks2.Block.AddConfigurationItem(),
+         org.freedesktop.UDisks2.Block.RemoveConfigurationItem()
          and
-         org.freedesktop.UDisks2.BlockDevice.UpdateConfigurationItem()
+         org.freedesktop.UDisks2.Block.UpdateConfigurationItem()
          methods to add, remove and update configuration items.
 
          Use
-         org.freedesktop.UDisks2.BlockDevice.GetSecretConfiguration()
+         org.freedesktop.UDisks2.Block.GetSecretConfiguration()
          to get the secrets (e.g. passphrases) that may be part of the
          configuration but isn't exported in this property for
          security reasons.
          <varlistentry>
            <term>passphrase-contents (type <literal>'ay'</literal>)</term>
            <listitem><para>The contents of the file containing the encryption password, if applicable.
-           This is only available via the org.freedesktop.UDisks2.BlockDevice.GetSecretConfiguration()
+           This is only available via the org.freedesktop.UDisks2.Block.GetSecretConfiguration()
            method.</para></listitem>
          </varlistentry>
          <varlistentry>
          </variablelist>
          For security reasons, when creating a new
          <literal>crypttab</literal> entry (via the
-         org.freedesktop.UDisks2.BlockDevice.AddConfigurationItem()
+         org.freedesktop.UDisks2.Block.AddConfigurationItem()
          method), then the <option>passphrase-path</option> must
          reference an unexisting file in the
          <filename>/etc/luks-keys</filename> directory.
     <property name="Configuration" type="a(sa{sv})" access="read"/>
 
     <!-- CryptoBackingDevice:
-         The #org.freedesktop.UDisks2.BlockDevice object that is
+         The #org.freedesktop.UDisks2.Block object that is
          backing the device or <literal>/</literal> if unknown or if
          the block device is not the cleartext device for an encrypted
          device.
          <ulink
          url="http://en.wikipedia.org/wiki/Apple_Partition_Map">Apple
          Partition Map</ulink>). If blank, and
-         #org.freedesktop.UDisks2.BlockDevice:PartTable is %TRUE, a
+         #org.freedesktop.UDisks2.Block:PartTable is %TRUE, a
          partition table was detected but its scheme is unknown.
     -->
     <property name="PartTableScheme" type="s" access="read"/>
     <!-- PartEntryNumber: The number of the partition in the partition table. -->
     <property name="PartEntryNumber" type="u" access="read"/>
     <!-- PartEntryScheme: The partition table scheme or blank if unknown.
-         See the #org.freedesktop.UDisks2.BlockDevice:PartTable property for known schemes.
+         See the #org.freedesktop.UDisks2.Block:PartTable property for known schemes.
     -->
     <property name="PartEntryScheme" type="s" access="read"/>
     <!-- PartEntryType: The type of the partition. -->
     <!-- PartEntryUUID: The UUID of the partition or blank if not supported or unknown. -->
     <property name="PartEntryUUID" type="ay" access="read"/>
     <!-- PartEntryTable:
-         The object path of the #org.freedesktop.UDisks2.BlockDevice
+         The object path of the #org.freedesktop.UDisks2.Block
          partition table that the partition entry belongs to or
          <literal>/</literal> if the device is not a partition.
     -->
 
         Adds a new configuration item.
 
-        See the #org.freedesktop.UDisks2.BlockDevice:Configuration
+        See the #org.freedesktop.UDisks2.Block:Configuration
         property for details about valid configuration items.
     -->
     <method name="AddConfigurationItem">
 
         Removes an existing configuration item.
 
-        See the #org.freedesktop.UDisks2.BlockDevice:Configuration
+        See the #org.freedesktop.UDisks2.Block:Configuration
         property for details about valid configuration items.
     -->
     <method name="RemoveConfigurationItem">
 
         Removes a configuration item and adds a new one. This is
         equivalent to calling
-        org.freedesktop.UDisks2.BlockDevice.RemoveConfigurationItem()
+        org.freedesktop.UDisks2.Block.RemoveConfigurationItem()
         followed by
-        org.freedesktop.UDisks2.BlockDevice.AddConfigurationItem()
+        org.freedesktop.UDisks2.Block.AddConfigurationItem()
         with the change that only one PolicyKit check is made
         and that @new_item can be validated against @old_item.
 
-        See the #org.freedesktop.UDisks2.BlockDevice:Configuration
+        See the #org.freedesktop.UDisks2.Block:Configuration
         property for details about valid configuration items.
     -->
     <method name="UpdateConfigurationItem">
         @configuration: The resulting configuration.
 
         Returns the same value as in the
-        #org.freedesktop.UDisks2.BlockDevice:Configuration property
+        #org.freedesktop.UDisks2.Block:Configuration property
         but without secret information filtered out.
     -->
     <method name="GetSecretConfiguration">
       org.freedesktop.UDisks2.Filesystem:
       @short_description: Block device containing a mountable filesystem
 
-      This interface is used for #org.freedesktop.UDisks2.BlockDevice
+      This interface is used for #org.freedesktop.UDisks2.Block
       devices that contain a mountable filesystem.
   -->
   <interface name="org.freedesktop.UDisks2.Filesystem">
-    <!-- prereq: org.freedesktop.UDisks2.BlockDevice -->
+    <!-- prereq: org.freedesktop.UDisks2.Block -->
 
     <!--
         SetLabel:
       org.freedesktop.UDisks2.Swapspace:
       @short_description: Block device containing swap data
 
-      This interface is used for #org.freedesktop.UDisks2.BlockDevice
+      This interface is used for #org.freedesktop.UDisks2.Block
       devices that contain swap space.
   -->
   <interface name="org.freedesktop.UDisks2.Swapspace">
-    <!-- prereq: org.freedesktop.UDisks2.BlockDevice -->
+    <!-- prereq: org.freedesktop.UDisks2.Block -->
 
     <!-- Active: Set to %TRUE if the device is currently in use by the OS. -->
     <property name="Active" type="b" access="read"/>
       org.freedesktop.UDisks2.Encrypted:
       @short_description: Block device containing encrypted data
 
-      This interface is used for #org.freedesktop.UDisks2.BlockDevice
+      This interface is used for #org.freedesktop.UDisks2.Block
       devices that contain encrypted data.
   -->
   <interface name="org.freedesktop.UDisks2.Encrypted">
-    <!-- prereq: org.freedesktop.UDisks2.BlockDevice -->
+    <!-- prereq: org.freedesktop.UDisks2.Block -->
 
     <!--
         Unlock:
         @passphrase: The passphrase to use.
         @options: Options (currently unused except for <link linkend="udisks-std-options">standard options</link>).
-        @cleartext_device: An object path to the unlocked object implementing the #org.freedesktop.UDisks2.BlockDevice interface.
+        @cleartext_device: An object path to the unlocked object implementing the #org.freedesktop.UDisks2.Block interface.
 
         Tries to unlock the encrypted device using @passphrase.
 
       org.freedesktop.UDisks2.Loop:
       @short_description: Block device backed by a file
 
-      This interface is used for #org.freedesktop.UDisks2.BlockDevice
+      This interface is used for #org.freedesktop.UDisks2.Block
       devices that are loop devices.
   -->
   <interface name="org.freedesktop.UDisks2.Loop">
-    <!-- prereq: org.freedesktop.UDisks2.BlockDevice -->
+    <!-- prereq: org.freedesktop.UDisks2.Block -->
 
     <!--
         Delete:
index 0429835..4e6574f 100644 (file)
       <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Manager.xml"/>
       <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Drive.xml"/>
       <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Drive.Ata.xml"/>
-      <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.BlockDevice.xml"/>
+      <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Block.xml"/>
       <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Filesystem.xml"/>
       <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Swapspace.xml"/>
       <xi:include href="../udisks/udisks-generated-doc-org.freedesktop.UDisks2.Encrypted.xml"/>
       <xi:include href="xml/UDisksDrive.xml"/>
       <xi:include href="xml/UDisksDriveAta.xml"/>
       <xi:include href="xml/UDisksJob.xml"/>
-      <xi:include href="xml/UDisksBlockDevice.xml"/>
+      <xi:include href="xml/UDisksBlock.xml"/>
       <xi:include href="xml/UDisksFilesystem.xml"/>
       <xi:include href="xml/UDisksSwapspace.xml"/>
       <xi:include href="xml/UDisksEncrypted.xml"/>
index 6f4983a..49e285c 100644 (file)
@@ -67,7 +67,7 @@ udisks_daemon_get_cleanup
 UDisksDaemonWaitFunc
 udisks_daemon_wait_for_object_sync
 udisks_daemon_find_object
-udisks_daemon_find_block_device
+udisks_daemon_find_block
 udisks_daemon_launch_simple_job
 udisks_daemon_launch_spawned_job
 udisks_daemon_launch_spawned_job_sync
@@ -405,7 +405,7 @@ udisks_linux_loop_get_type
 <TITLE>UDisksObject</TITLE>
 UDisksObject
 UDisksObjectIface
-udisks_object_get_block_device
+udisks_object_get_block
 udisks_object_get_drive
 udisks_object_get_drive_ata
 udisks_object_get_filesystem
@@ -414,7 +414,7 @@ udisks_object_get_swapspace
 udisks_object_get_encrypted
 udisks_object_get_loop
 udisks_object_get_manager
-udisks_object_peek_block_device
+udisks_object_peek_block
 udisks_object_peek_drive
 udisks_object_peek_drive_ata
 udisks_object_peek_filesystem
@@ -429,7 +429,7 @@ udisks_object_proxy_new
 UDisksObjectSkeleton
 UDisksObjectSkeletonClass
 udisks_object_skeleton_new
-udisks_object_skeleton_set_block_device
+udisks_object_skeleton_set_block
 udisks_object_skeleton_set_drive
 udisks_object_skeleton_set_drive_ata
 udisks_object_skeleton_set_filesystem
@@ -828,142 +828,142 @@ udisks_encrypted_skeleton_get_type
 </SECTION>
 
 <SECTION>
-<FILE>UDisksBlockDevice</FILE>
-UDisksBlockDevice
-UDisksBlockDeviceIface
-udisks_block_device_interface_info
-udisks_block_device_override_properties
-udisks_block_device_call_get_secret_configuration
-udisks_block_device_call_get_secret_configuration_finish
-udisks_block_device_call_get_secret_configuration_sync
-udisks_block_device_complete_get_secret_configuration
-udisks_block_device_call_add_configuration_item
-udisks_block_device_call_add_configuration_item_finish
-udisks_block_device_call_add_configuration_item_sync
-udisks_block_device_complete_add_configuration_item
-udisks_block_device_call_remove_configuration_item
-udisks_block_device_call_remove_configuration_item_finish
-udisks_block_device_call_remove_configuration_item_sync
-udisks_block_device_complete_remove_configuration_item
-udisks_block_device_call_update_configuration_item
-udisks_block_device_call_update_configuration_item_finish
-udisks_block_device_call_update_configuration_item_sync
-udisks_block_device_complete_update_configuration_item
-udisks_block_device_get_configuration
-udisks_block_device_get_crypto_backing_device
-udisks_block_device_get_device
-udisks_block_device_get_drive
-udisks_block_device_get_id_label
-udisks_block_device_get_id_type
-udisks_block_device_get_id_usage
-udisks_block_device_get_id_uuid
-udisks_block_device_get_id_version
-udisks_block_device_get_major
-udisks_block_device_get_minor
-udisks_block_device_get_part_entry
-udisks_block_device_get_part_entry_flags
-udisks_block_device_get_part_entry_label
-udisks_block_device_get_part_entry_number
-udisks_block_device_get_part_entry_offset
-udisks_block_device_get_part_entry_scheme
-udisks_block_device_get_part_entry_size
-udisks_block_device_get_part_entry_table
-udisks_block_device_get_part_entry_type
-udisks_block_device_get_part_entry_uuid
-udisks_block_device_get_part_table
-udisks_block_device_get_part_table_scheme
-udisks_block_device_get_preferred_device
-udisks_block_device_get_size
-udisks_block_device_get_symlinks
-udisks_block_device_get_hint_system
-udisks_block_device_get_hint_ignore
-udisks_block_device_get_hint_auto
-udisks_block_device_get_hint_name
-udisks_block_device_get_hint_icon_name
-udisks_block_device_dup_configuration
-udisks_block_device_dup_crypto_backing_device
-udisks_block_device_dup_device
-udisks_block_device_dup_drive
-udisks_block_device_dup_id_label
-udisks_block_device_dup_id_type
-udisks_block_device_dup_id_usage
-udisks_block_device_dup_id_uuid
-udisks_block_device_dup_id_version
-udisks_block_device_dup_part_entry_flags
-udisks_block_device_dup_part_entry_label
-udisks_block_device_dup_part_entry_scheme
-udisks_block_device_dup_part_entry_table
-udisks_block_device_dup_part_entry_type
-udisks_block_device_dup_part_entry_uuid
-udisks_block_device_dup_part_table_scheme
-udisks_block_device_dup_preferred_device
-udisks_block_device_dup_symlinks
-udisks_block_device_dup_hint_name
-udisks_block_device_dup_hint_icon_name
-udisks_block_device_set_configuration
-udisks_block_device_set_crypto_backing_device
-udisks_block_device_set_device
-udisks_block_device_set_drive
-udisks_block_device_set_id_label
-udisks_block_device_set_id_type
-udisks_block_device_set_id_usage
-udisks_block_device_set_id_uuid
-udisks_block_device_set_id_version
-udisks_block_device_set_major
-udisks_block_device_set_minor
-udisks_block_device_set_part_entry
-udisks_block_device_set_part_entry_flags
-udisks_block_device_set_part_entry_label
-udisks_block_device_set_part_entry_number
-udisks_block_device_set_part_entry_offset
-udisks_block_device_set_part_entry_scheme
-udisks_block_device_set_part_entry_size
-udisks_block_device_set_part_entry_table
-udisks_block_device_set_part_entry_type
-udisks_block_device_set_part_entry_uuid
-udisks_block_device_set_part_table
-udisks_block_device_set_part_table_scheme
-udisks_block_device_set_preferred_device
-udisks_block_device_set_size
-udisks_block_device_set_symlinks
-udisks_block_device_set_hint_system
-udisks_block_device_set_hint_ignore
-udisks_block_device_set_hint_auto
-udisks_block_device_set_hint_name
-udisks_block_device_set_hint_icon_name
-UDisksBlockDeviceProxy
-UDisksBlockDeviceProxyClass
-udisks_block_device_proxy_new
-udisks_block_device_proxy_new_finish
-udisks_block_device_proxy_new_sync
-udisks_block_device_proxy_new_for_bus
-udisks_block_device_proxy_new_for_bus_finish
-udisks_block_device_proxy_new_for_bus_sync
-UDisksBlockDeviceSkeleton
-UDisksBlockDeviceSkeletonClass
-udisks_block_device_skeleton_new
+<FILE>UDisksBlock</FILE>
+UDisksBlock
+UDisksBlockIface
+udisks_block_interface_info
+udisks_block_override_properties
+udisks_block_call_get_secret_configuration
+udisks_block_call_get_secret_configuration_finish
+udisks_block_call_get_secret_configuration_sync
+udisks_block_complete_get_secret_configuration
+udisks_block_call_add_configuration_item
+udisks_block_call_add_configuration_item_finish
+udisks_block_call_add_configuration_item_sync
+udisks_block_complete_add_configuration_item
+udisks_block_call_remove_configuration_item
+udisks_block_call_remove_configuration_item_finish
+udisks_block_call_remove_configuration_item_sync
+udisks_block_complete_remove_configuration_item
+udisks_block_call_update_configuration_item
+udisks_block_call_update_configuration_item_finish
+udisks_block_call_update_configuration_item_sync
+udisks_block_complete_update_configuration_item
+udisks_block_get_configuration
+udisks_block_get_crypto_backing_device
+udisks_block_get_device
+udisks_block_get_drive
+udisks_block_get_id_label
+udisks_block_get_id_type
+udisks_block_get_id_usage
+udisks_block_get_id_uuid
+udisks_block_get_id_version
+udisks_block_get_major
+udisks_block_get_minor
+udisks_block_get_part_entry
+udisks_block_get_part_entry_flags
+udisks_block_get_part_entry_label
+udisks_block_get_part_entry_number
+udisks_block_get_part_entry_offset
+udisks_block_get_part_entry_scheme
+udisks_block_get_part_entry_size
+udisks_block_get_part_entry_table
+udisks_block_get_part_entry_type
+udisks_block_get_part_entry_uuid
+udisks_block_get_part_table
+udisks_block_get_part_table_scheme
+udisks_block_get_preferred_device
+udisks_block_get_size
+udisks_block_get_symlinks
+udisks_block_get_hint_system
+udisks_block_get_hint_ignore
+udisks_block_get_hint_auto
+udisks_block_get_hint_name
+udisks_block_get_hint_icon_name
+udisks_block_dup_configuration
+udisks_block_dup_crypto_backing_device
+udisks_block_dup_device
+udisks_block_dup_drive
+udisks_block_dup_id_label
+udisks_block_dup_id_type
+udisks_block_dup_id_usage
+udisks_block_dup_id_uuid
+udisks_block_dup_id_version
+udisks_block_dup_part_entry_flags
+udisks_block_dup_part_entry_label
+udisks_block_dup_part_entry_scheme
+udisks_block_dup_part_entry_table
+udisks_block_dup_part_entry_type
+udisks_block_dup_part_entry_uuid
+udisks_block_dup_part_table_scheme
+udisks_block_dup_preferred_device
+udisks_block_dup_symlinks
+udisks_block_dup_hint_name
+udisks_block_dup_hint_icon_name
+udisks_block_set_configuration
+udisks_block_set_crypto_backing_device
+udisks_block_set_device
+udisks_block_set_drive
+udisks_block_set_id_label
+udisks_block_set_id_type
+udisks_block_set_id_usage
+udisks_block_set_id_uuid
+udisks_block_set_id_version
+udisks_block_set_major
+udisks_block_set_minor
+udisks_block_set_part_entry
+udisks_block_set_part_entry_flags
+udisks_block_set_part_entry_label
+udisks_block_set_part_entry_number
+udisks_block_set_part_entry_offset
+udisks_block_set_part_entry_scheme
+udisks_block_set_part_entry_size
+udisks_block_set_part_entry_table
+udisks_block_set_part_entry_type
+udisks_block_set_part_entry_uuid
+udisks_block_set_part_table
+udisks_block_set_part_table_scheme
+udisks_block_set_preferred_device
+udisks_block_set_size
+udisks_block_set_symlinks
+udisks_block_set_hint_system
+udisks_block_set_hint_ignore
+udisks_block_set_hint_auto
+udisks_block_set_hint_name
+udisks_block_set_hint_icon_name
+UDisksBlockProxy
+UDisksBlockProxyClass
+udisks_block_proxy_new
+udisks_block_proxy_new_finish
+udisks_block_proxy_new_sync
+udisks_block_proxy_new_for_bus
+udisks_block_proxy_new_for_bus_finish
+udisks_block_proxy_new_for_bus_sync
+UDisksBlockSkeleton
+UDisksBlockSkeletonClass
+udisks_block_skeleton_new
 <SUBSECTION Standard>
-UDISKS_TYPE_BLOCK_DEVICE
-UDISKS_IS_BLOCK_DEVICE
-UDISKS_BLOCK_DEVICE
-UDISKS_BLOCK_DEVICE_GET_IFACE
-UDISKS_TYPE_BLOCK_DEVICE_PROXY
-UDISKS_IS_BLOCK_DEVICE_PROXY
-UDISKS_IS_BLOCK_DEVICE_PROXY_CLASS
-UDISKS_BLOCK_DEVICE_PROXY
-UDISKS_BLOCK_DEVICE_PROXY_CLASS
-UDISKS_BLOCK_DEVICE_PROXY_GET_CLASS
-UDISKS_TYPE_BLOCK_DEVICE_SKELETON
-UDISKS_IS_BLOCK_DEVICE_SKELETON
-UDISKS_IS_BLOCK_DEVICE_SKELETON_CLASS
-UDISKS_BLOCK_DEVICE_SKELETON
-UDISKS_BLOCK_DEVICE_SKELETON_CLASS
-UDISKS_BLOCK_DEVICE_SKELETON_GET_CLASS
-UDisksBlockDeviceProxyPrivate
-UDisksBlockDeviceSkeletonPrivate
-udisks_block_device_get_type
-udisks_block_device_proxy_get_type
-udisks_block_device_skeleton_get_type
+UDISKS_TYPE_BLOCK
+UDISKS_IS_BLOCK
+UDISKS_BLOCK
+UDISKS_BLOCK_GET_IFACE
+UDISKS_TYPE_BLOCK_PROXY
+UDISKS_IS_BLOCK_PROXY
+UDISKS_IS_BLOCK_PROXY_CLASS
+UDISKS_BLOCK_PROXY
+UDISKS_BLOCK_PROXY_CLASS
+UDISKS_BLOCK_PROXY_GET_CLASS
+UDISKS_TYPE_BLOCK_SKELETON
+UDISKS_IS_BLOCK_SKELETON
+UDISKS_IS_BLOCK_SKELETON_CLASS
+UDISKS_BLOCK_SKELETON
+UDISKS_BLOCK_SKELETON_CLASS
+UDISKS_BLOCK_SKELETON_GET_CLASS
+UDisksBlockProxyPrivate
+UDisksBlockSkeletonPrivate
+udisks_block_get_type
+udisks_block_proxy_get_type
+udisks_block_skeleton_get_type
 </SECTION>
 
 <SECTION>
index 994a6a1..403b631 100644 (file)
@@ -32,9 +32,9 @@ udisks_drive_skeleton_get_type
 udisks_drive_ata_get_type
 udisks_drive_ata_proxy_get_type
 udisks_drive_ata_skeleton_get_type
-udisks_block_device_get_type
-udisks_block_device_proxy_get_type
-udisks_block_device_skeleton_get_type
+udisks_block_get_type
+udisks_block_proxy_get_type
+udisks_block_skeleton_get_type
 udisks_filesystem_get_type
 udisks_filesystem_proxy_get_type
 udisks_filesystem_skeleton_get_type
index 47c48c2..2313ff2 100644 (file)
@@ -923,16 +923,16 @@ wait_for_dev_t_cb (UDisksDaemon  *daemon,
                    gpointer       user_data)
 {
   dev_t *dev = user_data;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   gboolean ret;
 
   ret = FALSE;
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   if (block == NULL)
     goto out;
 
-  if (*dev == makedev (udisks_block_device_get_major (block),
-                       udisks_block_device_get_minor (block)))
+  if (*dev == makedev (udisks_block_get_major (block),
+                       udisks_block_get_minor (block)))
     ret = TRUE;
 
  out:
@@ -940,7 +940,7 @@ wait_for_dev_t_cb (UDisksDaemon  *daemon,
 }
 
 /**
- * udisks_daemon_find_block_device:
+ * udisks_daemon_find_block:
  * @daemon: A #UDisksDaemon.
  * @block_device_number: A #dev_t with the device number to find.
  *
@@ -949,8 +949,8 @@ wait_for_dev_t_cb (UDisksDaemon  *daemon,
  * Returns: (transfer full): A #UDisksObject or %NULL if not found. Free with g_object_unref().
  */
 UDisksObject *
-udisks_daemon_find_block_device (UDisksDaemon *daemon,
-                                 dev_t         block_device_number)
+udisks_daemon_find_block (UDisksDaemon *daemon,
+                          dev_t         block_device_number)
 {
   return udisks_daemon_wait_for_object_sync (daemon,
                                              wait_for_dev_t_cb,
index 80805f1..7f346ec 100644 (file)
@@ -62,7 +62,7 @@ UDisksObject             *udisks_daemon_wait_for_object_sync  (UDisksDaemon
                                                                guint                 timeout_seconds,
                                                                GError              **error);
 
-UDisksObject             *udisks_daemon_find_block_device     (UDisksDaemon         *daemon,
+UDisksObject             *udisks_daemon_find_block            (UDisksDaemon         *daemon,
                                                                dev_t                 block_device_number);
 
 UDisksObject             *udisks_daemon_find_object           (UDisksDaemon         *daemon,
index 69b35cc..a00ae22 100644 (file)
@@ -304,7 +304,7 @@ udisks_daemon_util_setup_by_user (UDisksDaemon *daemon,
                                   uid_t         user)
 {
   gboolean ret;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksCleanup *cleanup;
   uid_t setup_by_user;
   UDisksObject *crypto_object;
@@ -312,12 +312,12 @@ udisks_daemon_util_setup_by_user (UDisksDaemon *daemon,
   ret = FALSE;
 
   cleanup = udisks_daemon_get_cleanup (daemon);
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   if (block == NULL)
     goto out;
 
   /* loop devices */
-  if (udisks_cleanup_has_loop (cleanup, udisks_block_device_get_device (block), &setup_by_user, NULL))
+  if (udisks_cleanup_has_loop (cleanup, udisks_block_get_device (block), &setup_by_user, NULL))
     {
       if (setup_by_user == user)
         {
@@ -327,14 +327,14 @@ udisks_daemon_util_setup_by_user (UDisksDaemon *daemon,
     }
 
   /* LUKS devices */
-  crypto_object = udisks_daemon_find_object (daemon, udisks_block_device_get_crypto_backing_device (block));
+  crypto_object = udisks_daemon_find_object (daemon, udisks_block_get_crypto_backing_device (block));
   if (crypto_object != NULL)
     {
-      UDisksBlockDevice *crypto_block;
-      crypto_block = udisks_object_peek_block_device (crypto_object);
+      UDisksBlock *crypto_block;
+      crypto_block = udisks_object_peek_block (crypto_object);
       if (udisks_cleanup_find_unlocked_luks (cleanup,
-                                             makedev (udisks_block_device_get_major (crypto_block),
-                                                      udisks_block_device_get_minor (crypto_block)),
+                                             makedev (udisks_block_get_major (crypto_block),
+                                                      udisks_block_get_minor (crypto_block)),
                                              &setup_by_user, NULL))
         {
           if (setup_by_user == user)
@@ -372,7 +372,7 @@ udisks_daemon_util_setup_by_user (UDisksDaemon *daemon,
  *
  * The follow variables can be used in @message
  *
- * - udisks2.device - If @object has a #UDisksBlockDevice interface, this property is set to the value of the #UDisksBlockDevice::preferred-device property.
+ * - udisks2.device - If @object has a #UDisksBlock interface, this property is set to the value of the #UDisksBlock::preferred-device property.
  *
  * Returns: %TRUE if caller is authorized, %FALSE if not.
  */
@@ -390,7 +390,7 @@ udisks_daemon_util_check_authorization_sync (UDisksDaemon          *daemon,
   PolkitAuthorizationResult *result;
   GError *error;
   gboolean ret;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   gboolean auth_no_user_interaction;
 
   ret = FALSE;
@@ -418,9 +418,9 @@ udisks_daemon_util_check_authorization_sync (UDisksDaemon          *daemon,
   /* setup other details that @message can use */
   if (object != NULL)
     {
-      block = udisks_object_peek_block_device (object);
+      block = udisks_object_peek_block (object);
       if (block != NULL)
-        polkit_details_insert (details, "udisks2.device", udisks_block_device_get_preferred_device (block));
+        polkit_details_insert (details, "udisks2.device", udisks_block_get_preferred_device (block));
     }
 
   error = NULL;
index 7475157..6b0c3e4 100644 (file)
@@ -49,9 +49,9 @@
 /**
  * SECTION:udiskslinuxblock
  * @title: UDisksLinuxBlock
- * @short_description: Linux implementation of #UDisksBlockDevice
+ * @short_description: Linux implementation of #UDisksBlock
  *
- * This type provides an implementation of the #UDisksBlockDevice
+ * This type provides an implementation of the #UDisksBlock
  * interface on Linux.
  */
 
@@ -65,18 +65,18 @@ typedef struct _UDisksLinuxBlockClass   UDisksLinuxBlockClass;
  */
 struct _UDisksLinuxBlock
 {
-  UDisksBlockDeviceSkeleton parent_instance;
+  UDisksBlockSkeleton parent_instance;
 };
 
 struct _UDisksLinuxBlockClass
 {
-  UDisksBlockDeviceSkeletonClass parent_class;
+  UDisksBlockSkeletonClass parent_class;
 };
 
-static void block_iface_init (UDisksBlockDeviceIface *iface);
+static void block_iface_init (UDisksBlockIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (UDisksLinuxBlock, udisks_linux_block, UDISKS_TYPE_BLOCK_DEVICE_SKELETON,
-                         G_IMPLEMENT_INTERFACE (UDISKS_TYPE_BLOCK_DEVICE, block_iface_init));
+G_DEFINE_TYPE_WITH_CODE (UDisksLinuxBlock, udisks_linux_block, UDISKS_TYPE_BLOCK_SKELETON,
+                         G_IMPLEMENT_INTERFACE (UDISKS_TYPE_BLOCK, block_iface_init));
 
 /* ---------------------------------------------------------------------------------------------------- */
 
@@ -99,11 +99,11 @@ udisks_linux_block_class_init (UDisksLinuxBlockClass *klass)
  *
  * Returns: A new #UDisksLinuxBlock. Free with g_object_unref().
  */
-UDisksBlockDevice *
+UDisksBlock *
 udisks_linux_block_new (void)
 {
-  return UDISKS_BLOCK_DEVICE (g_object_new (UDISKS_TYPE_LINUX_BLOCK,
-                                            NULL));
+  return UDISKS_BLOCK (g_object_new (UDISKS_TYPE_LINUX_BLOCK,
+                                     NULL));
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -231,7 +231,7 @@ update_hints (UDisksLinuxBlock  *block,
               GUdevDevice       *device,
               UDisksDrive       *drive)
 {
-  UDisksBlockDevice *iface = UDISKS_BLOCK_DEVICE (block);
+  UDisksBlock *iface = UDISKS_BLOCK (block);
   gboolean hint_system;
   gboolean hint_ignore;
   gboolean hint_auto;
@@ -286,11 +286,11 @@ update_hints (UDisksLinuxBlock  *block,
     hint_icon_name = g_udev_device_get_property (device, "UDISKS_ICON_NAME");
 
   /* ... and scene! */
-  udisks_block_device_set_hint_system (iface, hint_system);
-  udisks_block_device_set_hint_ignore (iface, hint_ignore);
-  udisks_block_device_set_hint_auto (iface, hint_auto);
-  udisks_block_device_set_hint_name (iface, hint_name);
-  udisks_block_device_set_hint_icon_name (iface, hint_icon_name);
+  udisks_block_set_hint_system (iface, hint_system);
+  udisks_block_set_hint_ignore (iface, hint_ignore);
+  udisks_block_set_hint_auto (iface, hint_auto);
+  udisks_block_set_hint_name (iface, hint_name);
+  udisks_block_set_hint_icon_name (iface, hint_icon_name);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -335,13 +335,13 @@ find_fstab_entries_for_device (UDisksLinuxBlock *block,
           goto continue_loop;
         }
 
-      if (g_strcmp0 (device, udisks_block_device_get_device (UDISKS_BLOCK_DEVICE (block))) == 0)
+      if (g_strcmp0 (device, udisks_block_get_device (UDISKS_BLOCK (block))) == 0)
         {
           ret = g_list_prepend (ret, g_object_ref (entry));
         }
       else
         {
-          symlinks = udisks_block_device_get_symlinks (UDISKS_BLOCK_DEVICE (block));
+          symlinks = udisks_block_get_symlinks (UDISKS_BLOCK (block));
           if (symlinks != NULL)
             {
               for (n = 0; symlinks[n] != NULL; n++)
@@ -403,13 +403,13 @@ find_crypttab_entries_for_device (UDisksLinuxBlock *block,
           goto continue_loop;
         }
 
-      if (g_strcmp0 (device, udisks_block_device_get_device (UDISKS_BLOCK_DEVICE (block))) == 0)
+      if (g_strcmp0 (device, udisks_block_get_device (UDISKS_BLOCK (block))) == 0)
         {
           ret = g_list_prepend (ret, g_object_ref (entry));
         }
       else
         {
-          symlinks = udisks_block_device_get_symlinks (UDISKS_BLOCK_DEVICE (block));
+          symlinks = udisks_block_get_symlinks (UDISKS_BLOCK (block));
           if (symlinks != NULL)
             {
               for (n = 0; symlinks[n] != NULL; n++)
@@ -561,7 +561,7 @@ update_configuration (UDisksLinuxBlock  *block,
       g_error_free (error);
       configuration = g_variant_new ("a(sa{sv})", NULL);
     }
-  udisks_block_device_set_configuration (UDISKS_BLOCK_DEVICE (block), configuration);
+  udisks_block_set_configuration (UDISKS_BLOCK (block), configuration);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -577,7 +577,7 @@ void
 udisks_linux_block_update (UDisksLinuxBlock        *block,
                            UDisksLinuxBlockObject *object)
 {
-  UDisksBlockDevice *iface = UDISKS_BLOCK_DEVICE (block);
+  UDisksBlock *iface = UDISKS_BLOCK (block);
   UDisksDaemon *daemon;
   GDBusObjectManagerServer *object_manager;
   GUdevDevice *device;
@@ -604,11 +604,11 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
   device_file = g_udev_device_get_device_file (device);
   symlinks = g_udev_device_get_device_file_symlinks (device);
 
-  udisks_block_device_set_device (iface, device_file);
-  udisks_block_device_set_symlinks (iface, symlinks);
-  udisks_block_device_set_major (iface, major (dev));
-  udisks_block_device_set_minor (iface, minor (dev));
-  udisks_block_device_set_size (iface, udisks_daemon_util_block_get_size (device));
+  udisks_block_set_device (iface, device_file);
+  udisks_block_set_symlinks (iface, symlinks);
+  udisks_block_set_major (iface, major (dev));
+  udisks_block_set_minor (iface, minor (dev));
+  udisks_block_set_size (iface, udisks_daemon_util_block_get_size (device));
 
   /* dm-crypt
    *
@@ -616,7 +616,7 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
    *       is a dm-crypt device.. but unfortunately device-mapper keeps all this stuff
    *       in user-space and wants you to use libdevmapper to obtain it...
    */
-  udisks_block_device_set_crypto_backing_device (iface, "/");
+  udisks_block_set_crypto_backing_device (iface, "/");
   if (g_str_has_prefix (g_udev_device_get_name (device), "dm-"))
     {
       gchar *dm_uuid;
@@ -632,7 +632,7 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
               slave_object_path = find_block_device_by_sysfs_path (object_manager, slaves[0]);
               if (slave_object_path != NULL)
                 {
-                  udisks_block_device_set_crypto_backing_device (iface, slave_object_path);
+                  udisks_block_set_crypto_backing_device (iface, slave_object_path);
                 }
               g_free (slave_object_path);
             }
@@ -680,7 +680,7 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
   /* fallback to the device name */
   if (preferred_device_file == NULL)
     preferred_device_file = g_udev_device_get_device_file (device);
-  udisks_block_device_set_preferred_device (iface, preferred_device_file);
+  udisks_block_set_preferred_device (iface, preferred_device_file);
 
   /* Determine the drive this block device belongs to
    *
@@ -690,24 +690,24 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
   drive_object_path = find_drive (object_manager, device, &drive);
   if (drive_object_path != NULL)
     {
-      udisks_block_device_set_drive (iface, drive_object_path);
+      udisks_block_set_drive (iface, drive_object_path);
       g_free (drive_object_path);
     }
   else
     {
-      udisks_block_device_set_drive (iface, "/");
+      udisks_block_set_drive (iface, "/");
     }
 
-  udisks_block_device_set_id_usage (iface, g_udev_device_get_property (device, "ID_FS_USAGE"));
-  udisks_block_device_set_id_type (iface, g_udev_device_get_property (device, "ID_FS_TYPE"));
+  udisks_block_set_id_usage (iface, g_udev_device_get_property (device, "ID_FS_USAGE"));
+  udisks_block_set_id_type (iface, g_udev_device_get_property (device, "ID_FS_TYPE"));
   s = udisks_decode_udev_string (g_udev_device_get_property (device, "ID_FS_VERSION"));
-  udisks_block_device_set_id_version (iface, s);
+  udisks_block_set_id_version (iface, s);
   g_free (s);
   s = udisks_decode_udev_string (g_udev_device_get_property (device, "ID_FS_LABEL_ENC"));
-  udisks_block_device_set_id_label (iface, s);
+  udisks_block_set_id_label (iface, s);
   g_free (s);
   s = udisks_decode_udev_string (g_udev_device_get_property (device, "ID_FS_UUID_ENC"));
-  udisks_block_device_set_id_uuid (iface, s);
+  udisks_block_set_id_uuid (iface, s);
   g_free (s);
 
   /* TODO: port this to blkid properties */
@@ -728,40 +728,40 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
   /* partition table */
   if (is_partition_table)
     {
-      udisks_block_device_set_part_table (iface, TRUE);
-      udisks_block_device_set_part_table_scheme (iface,
-                                                 g_udev_device_get_property (device,
-                                                                             "UDISKS_PARTITION_TABLE_SCHEME"));
+      udisks_block_set_part_table (iface, TRUE);
+      udisks_block_set_part_table_scheme (iface,
+                                          g_udev_device_get_property (device,
+                                                                      "UDISKS_PARTITION_TABLE_SCHEME"));
     }
   else
     {
-      udisks_block_device_set_part_table (iface, FALSE);
-      udisks_block_device_set_part_table_scheme (iface, "");
+      udisks_block_set_part_table (iface, FALSE);
+      udisks_block_set_part_table_scheme (iface, "");
     }
 
   /* partition entry */
   if (is_partition_entry)
     {
       gchar *slave_sysfs_path;
-      udisks_block_device_set_part_entry (iface, TRUE);
-      udisks_block_device_set_part_entry_scheme (iface,
-                                                 g_udev_device_get_property (device,
-                                                                             "UDISKS_PARTITION_SCHEME"));
-      udisks_block_device_set_part_entry_number (iface,
-                                                 g_udev_device_get_property_as_int (device,
-                                                                                    "UDISKS_PARTITION_NUMBER"));
-      udisks_block_device_set_part_entry_type (iface,
-                                               g_udev_device_get_property (device,
-                                                                           "UDISKS_PARTITION_TYPE"));
-      udisks_block_device_set_part_entry_flags (iface,
-                                                g_udev_device_get_property (device,
-                                                                            "UDISKS_PARTITION_FLAGS"));
-      udisks_block_device_set_part_entry_label (iface,
-                                                g_udev_device_get_property (device,
-                                                                            "UDISKS_PARTITION_LABEL"));
-      udisks_block_device_set_part_entry_uuid (iface,
-                                               g_udev_device_get_property (device,
-                                                                           "UDISKS_PARTITION_UUID"));
+      udisks_block_set_part_entry (iface, TRUE);
+      udisks_block_set_part_entry_scheme (iface,
+                                          g_udev_device_get_property (device,
+                                                                      "UDISKS_PARTITION_SCHEME"));
+      udisks_block_set_part_entry_number (iface,
+                                          g_udev_device_get_property_as_int (device,
+                                                                             "UDISKS_PARTITION_NUMBER"));
+      udisks_block_set_part_entry_type (iface,
+                                        g_udev_device_get_property (device,
+                                                                    "UDISKS_PARTITION_TYPE"));
+      udisks_block_set_part_entry_flags (iface,
+                                         g_udev_device_get_property (device,
+                                                                     "UDISKS_PARTITION_FLAGS"));
+      udisks_block_set_part_entry_label (iface,
+                                         g_udev_device_get_property (device,
+                                                                     "UDISKS_PARTITION_LABEL"));
+      udisks_block_set_part_entry_uuid (iface,
+                                        g_udev_device_get_property (device,
+                                                                    "UDISKS_PARTITION_UUID"));
       slave_sysfs_path = g_strdup (g_udev_device_get_property (device, "UDISKS_PARTITION_SLAVE"));
       if (slave_sysfs_path == NULL)
         {
@@ -783,32 +783,32 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
           gchar *slave_object_path;
           slave_object_path = find_block_device_by_sysfs_path (object_manager, slave_sysfs_path);
           if (slave_object_path != NULL)
-            udisks_block_device_set_part_entry_table (iface, slave_object_path);
+            udisks_block_set_part_entry_table (iface, slave_object_path);
           else
-            udisks_block_device_set_part_entry_table (iface, "/");
+            udisks_block_set_part_entry_table (iface, "/");
           g_free (slave_object_path);
           g_free (slave_sysfs_path);
         }
       else
         {
-          udisks_block_device_set_part_entry_table (iface, "/");
+          udisks_block_set_part_entry_table (iface, "/");
         }
-      udisks_block_device_set_part_entry_offset (iface,
-                                                 g_udev_device_get_property_as_uint64 (device,
-                                                                                       "UDISKS_PARTITION_OFFSET"));
-      udisks_block_device_set_part_entry_size (iface,
-                                               g_udev_device_get_property_as_uint64 (device,
-                                                                                     "UDISKS_PARTITION_SIZE"));
+      udisks_block_set_part_entry_offset (iface,
+                                          g_udev_device_get_property_as_uint64 (device,
+                                                                                "UDISKS_PARTITION_OFFSET"));
+      udisks_block_set_part_entry_size (iface,
+                                        g_udev_device_get_property_as_uint64 (device,
+                                                                              "UDISKS_PARTITION_SIZE"));
     }
   else
     {
-      udisks_block_device_set_part_entry (iface, FALSE);
-      udisks_block_device_set_part_entry_scheme (iface, "");
-      udisks_block_device_set_part_entry_type (iface, "");
-      udisks_block_device_set_part_entry_flags (iface, "");
-      udisks_block_device_set_part_entry_table (iface, "/");
-      udisks_block_device_set_part_entry_offset (iface, 0);
-      udisks_block_device_set_part_entry_size (iface, 0);
+      udisks_block_set_part_entry (iface, FALSE);
+      udisks_block_set_part_entry_scheme (iface, "");
+      udisks_block_set_part_entry_type (iface, "");
+      udisks_block_set_part_entry_flags (iface, "");
+      udisks_block_set_part_entry_table (iface, "/");
+      udisks_block_set_part_entry_offset (iface, 0);
+      udisks_block_set_part_entry_size (iface, 0);
     }
 
   update_hints (block, device, drive);
@@ -824,7 +824,7 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-handle_get_secret_configuration (UDisksBlockDevice     *_block,
+handle_get_secret_configuration (UDisksBlock           *_block,
                                  GDBusMethodInvocation *invocation,
                                  GVariant              *options)
 {
@@ -856,9 +856,9 @@ handle_get_secret_configuration (UDisksBlockDevice     *_block,
       goto out;
     }
 
-  udisks_block_device_complete_get_secret_configuration (UDISKS_BLOCK_DEVICE (block),
-                                                         invocation,
-                                                         configuration); /* consumes floating ref */
+  udisks_block_complete_get_secret_configuration (UDISKS_BLOCK (block),
+                                                  invocation,
+                                                  configuration); /* consumes floating ref */
 
  out:
   return TRUE; /* returning TRUE means that we handled the method invocation */
@@ -1448,7 +1448,7 @@ add_remove_crypttab_entry (GVariant  *remove,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-handle_add_configuration_item (UDisksBlockDevice     *_block,
+handle_add_configuration_item (UDisksBlock           *_block,
                                GDBusMethodInvocation *invocation,
                                GVariant              *item,
                                GVariant              *options)
@@ -1479,7 +1479,7 @@ handle_add_configuration_item (UDisksBlockDevice     *_block,
           g_dbus_method_invocation_take_error (invocation, error);
           goto out;
         }
-      udisks_block_device_complete_add_configuration_item (UDISKS_BLOCK_DEVICE (block), invocation);
+      udisks_block_complete_add_configuration_item (UDISKS_BLOCK (block), invocation);
     }
   else if (g_strcmp0 (type, "crypttab") == 0)
     {
@@ -1496,7 +1496,7 @@ handle_add_configuration_item (UDisksBlockDevice     *_block,
           g_dbus_method_invocation_take_error (invocation, error);
           goto out;
         }
-      udisks_block_device_complete_add_configuration_item (UDISKS_BLOCK_DEVICE (block), invocation);
+      udisks_block_complete_add_configuration_item (UDISKS_BLOCK (block), invocation);
     }
   else
     {
@@ -1515,7 +1515,7 @@ handle_add_configuration_item (UDisksBlockDevice     *_block,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-handle_remove_configuration_item (UDisksBlockDevice     *_block,
+handle_remove_configuration_item (UDisksBlock           *_block,
                                   GDBusMethodInvocation *invocation,
                                   GVariant              *item,
                                   GVariant              *options)
@@ -1546,7 +1546,7 @@ handle_remove_configuration_item (UDisksBlockDevice     *_block,
           g_dbus_method_invocation_take_error (invocation, error);
           goto out;
         }
-      udisks_block_device_complete_add_configuration_item (UDISKS_BLOCK_DEVICE (block), invocation);
+      udisks_block_complete_add_configuration_item (UDISKS_BLOCK (block), invocation);
     }
   else if (g_strcmp0 (type, "crypttab") == 0)
     {
@@ -1563,7 +1563,7 @@ handle_remove_configuration_item (UDisksBlockDevice     *_block,
           g_dbus_method_invocation_take_error (invocation, error);
           goto out;
         }
-      udisks_block_device_complete_add_configuration_item (UDISKS_BLOCK_DEVICE (block), invocation);
+      udisks_block_complete_add_configuration_item (UDISKS_BLOCK (block), invocation);
     }
   else
     {
@@ -1582,7 +1582,7 @@ handle_remove_configuration_item (UDisksBlockDevice     *_block,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-handle_update_configuration_item (UDisksBlockDevice     *_block,
+handle_update_configuration_item (UDisksBlock           *_block,
                                   GDBusMethodInvocation *invocation,
                                   GVariant              *old_item,
                                   GVariant              *new_item,
@@ -1626,7 +1626,7 @@ handle_update_configuration_item (UDisksBlockDevice     *_block,
           g_dbus_method_invocation_take_error (invocation, error);
           goto out;
         }
-      udisks_block_device_complete_add_configuration_item (UDISKS_BLOCK_DEVICE (block), invocation);
+      udisks_block_complete_add_configuration_item (UDISKS_BLOCK (block), invocation);
     }
   else if (g_strcmp0 (old_type, "crypttab") == 0)
     {
@@ -1643,7 +1643,7 @@ handle_update_configuration_item (UDisksBlockDevice     *_block,
           g_dbus_method_invocation_take_error (invocation, error);
           goto out;
         }
-      udisks_block_device_complete_add_configuration_item (UDISKS_BLOCK_DEVICE (block), invocation);
+      udisks_block_complete_add_configuration_item (UDISKS_BLOCK (block), invocation);
     }
   else
     {
@@ -1663,7 +1663,7 @@ handle_update_configuration_item (UDisksBlockDevice     *_block,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static void
-block_iface_init (UDisksBlockDeviceIface *iface)
+block_iface_init (UDisksBlockIface *iface)
 {
   iface->handle_get_secret_configuration  = handle_get_secret_configuration;
   iface->handle_add_configuration_item    = handle_add_configuration_item;
index 65ab632..11e6fa6 100644 (file)
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
 #define UDISKS_IS_LINUX_BLOCK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UDISKS_TYPE_LINUX_BLOCK))
 
 GType        udisks_linux_block_get_type (void) G_GNUC_CONST;
-UDisksBlockDevice *udisks_linux_block_new      (void);
+UDisksBlock *udisks_linux_block_new      (void);
 void         udisks_linux_block_update   (UDisksLinuxBlock       *block,
                                           UDisksLinuxBlockObject *object);
 
index e841dcf..576177a 100644 (file)
@@ -80,7 +80,7 @@ struct _UDisksLinuxBlockObject
   GUdevDevice *device;
 
   /* interface */
-  UDisksBlockDevice *iface_block_device;
+  UDisksBlock *iface_block_device;
   UDisksFilesystem *iface_filesystem;
   UDisksSwapspace *iface_swapspace;
   UDisksEncrypted *iface_encrypted;
@@ -380,7 +380,7 @@ update_iface (UDisksLinuxBlockObject   *object,
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
-/* org.freedesktop.UDisks.BlockDevice */
+/* org.freedesktop.UDisks.Block */
 
 static gboolean
 block_device_check (UDisksLinuxBlockObject *object)
@@ -411,7 +411,7 @@ filesystem_check (UDisksLinuxBlockObject *object)
   UDisksMountType mount_type;
 
   ret = FALSE;
-  if (g_strcmp0 (udisks_block_device_get_id_usage (object->iface_block_device), "filesystem") == 0 ||
+  if (g_strcmp0 (udisks_block_get_id_usage (object->iface_block_device), "filesystem") == 0 ||
       (udisks_mount_monitor_is_dev_in_use (object->mount_monitor,
                                            g_udev_device_get_device_number (object->device),
                                            &mount_type) &&
@@ -445,8 +445,8 @@ swapspace_check (UDisksLinuxBlockObject *object)
   UDisksMountType mount_type;
 
   ret = FALSE;
-  if ((g_strcmp0 (udisks_block_device_get_id_usage (object->iface_block_device), "other") == 0 &&
-       g_strcmp0 (udisks_block_device_get_id_type (object->iface_block_device), "swap") == 0)
+  if ((g_strcmp0 (udisks_block_get_id_usage (object->iface_block_device), "other") == 0 &&
+       g_strcmp0 (udisks_block_get_id_type (object->iface_block_device), "swap") == 0)
       || (udisks_mount_monitor_is_dev_in_use (object->mount_monitor,
                                               g_udev_device_get_device_number (object->device),
                                               &mount_type)
@@ -477,8 +477,8 @@ encrypted_check (UDisksLinuxBlockObject *object)
   gboolean ret;
 
   ret = FALSE;
-  if (g_strcmp0 (udisks_block_device_get_id_usage (object->iface_block_device), "crypto") == 0 &&
-      g_strcmp0 (udisks_block_device_get_id_type (object->iface_block_device), "crypto_LUKS") == 0)
+  if (g_strcmp0 (udisks_block_get_id_usage (object->iface_block_device), "crypto") == 0 &&
+      g_strcmp0 (udisks_block_get_id_type (object->iface_block_device), "crypto_LUKS") == 0)
     ret = TRUE;
 
   return ret;
index e0002ef..da98af3 100644 (file)
@@ -475,7 +475,7 @@ handle_eject (UDisksDrive           *_drive,
   UDisksLinuxDrive *drive = UDISKS_LINUX_DRIVE (_drive);
   UDisksLinuxDriveObject *object;
   UDisksLinuxBlockObject *block_object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   const gchar *action_id;
   gchar *error_message;
@@ -495,11 +495,11 @@ handle_eject (UDisksDrive           *_drive,
                                              "Unable to find physical block device for drive");
       goto out;
     }
-  block = udisks_object_peek_block_device (UDISKS_OBJECT (block_object));
+  block = udisks_object_peek_block (UDISKS_OBJECT (block_object));
 
   /* TODO: is it a good idea to overload modify-device? */
   action_id = "org.freedesktop.udisks2.modify-device";
-  if (udisks_block_device_get_hint_system (block))
+  if (udisks_block_get_hint_system (block))
     action_id = "org.freedesktop.udisks2.modify-device-system";
 
   /* Check that the user is actually authorized */
@@ -519,13 +519,13 @@ handle_eject (UDisksDrive           *_drive,
                                               &error_message,
                                               NULL,  /* input_string */
                                               "eject \"%s\"",
-                                              udisks_block_device_get_device (block)))
+                                              udisks_block_get_device (block)))
     {
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error eject %s: %s",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              error_message);
       goto out;
     }
index 0d55f99..c6a7398 100644 (file)
@@ -298,7 +298,7 @@ handle_smart_update (UDisksDriveAta        *_drive,
   UDisksLinuxDriveAta *drive = UDISKS_LINUX_DRIVE_ATA (_drive);
   UDisksLinuxDriveObject *object;
   UDisksLinuxBlockObject *block_object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   const gchar *action_id;
   gboolean nowakeup;
@@ -318,7 +318,7 @@ handle_smart_update (UDisksDriveAta        *_drive,
                                              "Unable to find physical block device for drive");
       goto out;
     }
-  block = udisks_object_peek_block_device (UDISKS_OBJECT (block_object));
+  block = udisks_object_peek_block (UDISKS_OBJECT (block_object));
 
   g_variant_lookup (options,
                     "nowakeup",
@@ -327,7 +327,7 @@ handle_smart_update (UDisksDriveAta        *_drive,
 
   /* TODO: is it a good idea to overload modify-device? */
   action_id = "org.freedesktop.udisks2.modify-device";
-  if (udisks_block_device_get_hint_system (block))
+  if (udisks_block_get_hint_system (block))
     action_id = "org.freedesktop.udisks2.modify-device-system";
 
   /* Check that the user is actually authorized */
index f60fa29..941326b 100644 (file)
@@ -438,7 +438,7 @@ udisks_linux_drive_object_get_block (UDisksLinuxDriveObject   *object,
   for (l = objects; l != NULL; l = l->next)
     {
       GDBusObjectSkeleton *iter_object = G_DBUS_OBJECT_SKELETON (l->data);
-      UDisksBlockDevice *block;
+      UDisksBlock *block;
       GUdevDevice *device;
       gboolean is_disk;
 
@@ -452,8 +452,8 @@ udisks_linux_drive_object_get_block (UDisksLinuxDriveObject   *object,
       if (!is_disk)
         continue;
 
-      block = udisks_object_peek_block_device (UDISKS_OBJECT (iter_object));
-      if (g_strcmp0 (udisks_block_device_get_drive (block),
+      block = udisks_object_peek_block (UDISKS_OBJECT (iter_object));
+      if (g_strcmp0 (udisks_block_get_drive (block),
                      g_dbus_object_get_object_path (G_DBUS_OBJECT (object))) == 0)
         {
           ret = g_object_ref (iter_object);
index 29c753a..7e9fa5e 100644 (file)
@@ -120,15 +120,15 @@ wait_for_cleartext_object (UDisksDaemon *daemon,
                            gpointer      user_data)
 {
   const gchar *crypto_object_path = user_data;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   gboolean ret;
 
   ret = FALSE;
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   if (block == NULL)
     goto out;
 
-  if (g_strcmp0 (udisks_block_device_get_crypto_backing_device (block), crypto_object_path) == 0)
+  if (g_strcmp0 (udisks_block_get_crypto_backing_device (block), crypto_object_path) == 0)
     ret = TRUE;
 
  out:
@@ -138,7 +138,7 @@ wait_for_cleartext_object (UDisksDaemon *daemon,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-check_crypttab (UDisksBlockDevice   *block,
+check_crypttab (UDisksBlock   *block,
                 gboolean             load_passphrase,
                 gboolean            *out_found,
                 gchar              **out_name,
@@ -151,7 +151,7 @@ check_crypttab (UDisksBlockDevice   *block,
   const gchar *type;
   GVariant *details;
 
-  g_variant_iter_init (&iter, udisks_block_device_get_configuration (block));
+  g_variant_iter_init (&iter, udisks_block_get_configuration (block));
   while (g_variant_iter_next (&iter, "(&s@a{sv})", &type, &details))
     {
       if (g_strcmp0 (type, "crypttab") == 0)
@@ -200,14 +200,14 @@ handle_unlock (UDisksEncrypted        *encrypted,
                GVariant               *options)
 {
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   UDisksCleanup *cleanup;
   gchar *error_message;
   gchar *name;
   gchar *escaped_name;
   UDisksObject *cleartext_object;
-  UDisksBlockDevice *cleartext_block;
+  UDisksBlock *cleartext_block;
   GUdevDevice *udev_cleartext_device;
   GError *error;
   uid_t caller_uid;
@@ -225,7 +225,7 @@ handle_unlock (UDisksEncrypted        *encrypted,
   cleartext_object = NULL;
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (encrypted)));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
   cleanup = udisks_daemon_get_cleanup (daemon);
 
@@ -235,14 +235,14 @@ handle_unlock (UDisksEncrypted        *encrypted,
    */
 
   /* Fail if the device is not a LUKS device */
-  if (!(g_strcmp0 (udisks_block_device_get_id_usage (block), "crypto") == 0 &&
-        g_strcmp0 (udisks_block_device_get_id_type (block), "crypto_LUKS") == 0))
+  if (!(g_strcmp0 (udisks_block_get_id_usage (block), "crypto") == 0 &&
+        g_strcmp0 (udisks_block_get_id_type (block), "crypto_LUKS") == 0))
     {
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Device %s does not appear to be a LUKS device",
-                                             udisks_block_device_get_device (block));
+                                             udisks_block_get_device (block));
       goto out;
     }
 
@@ -255,14 +255,14 @@ handle_unlock (UDisksEncrypted        *encrypted,
                                                          NULL); /* error */
   if (cleartext_object != NULL)
     {
-      UDisksBlockDevice *unlocked_block;
-      unlocked_block = udisks_object_peek_block_device (cleartext_object);
+      UDisksBlock *unlocked_block;
+      unlocked_block = udisks_object_peek_block (cleartext_object);
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Device %s is already unlocked as %s",
-                                             udisks_block_device_get_device (block),
-                                             udisks_block_device_get_device (unlocked_block));
+                                             udisks_block_get_device (block),
+                                             udisks_block_get_device (unlocked_block));
       goto out;
     }
 
@@ -292,7 +292,7 @@ handle_unlock (UDisksEncrypted        *encrypted,
   /* Now, check that the user is actually authorized to unlock the device.
    */
   action_id = "org.freedesktop.udisks2.encrypted-unlock";
-  if (udisks_block_device_get_hint_system (block) &&
+  if (udisks_block_get_hint_system (block) &&
       !(udisks_daemon_util_setup_by_user (daemon, object, caller_uid)))
     action_id = "org.freedesktop.udisks2.encrypted-unlock-system";
   if (is_in_crypttab)
@@ -309,7 +309,7 @@ handle_unlock (UDisksEncrypted        *encrypted,
   if (is_in_crypttab && crypttab_name != NULL)
     name = g_strdup (crypttab_name);
   else
-    name = g_strdup_printf ("LUKS-udisks2-%s", udisks_block_device_get_id_uuid (block));
+    name = g_strdup_printf ("LUKS-udisks2-%s", udisks_block_get_id_uuid (block));
   escaped_name = g_strescape (name, NULL);
 
   /* if available, use and prefer the /etc/crypttab passphrase */
@@ -327,14 +327,14 @@ handle_unlock (UDisksEncrypted        *encrypted,
                                               &error_message,
                                               passphrase,  /* input_string */
                                               "cryptsetup luksOpen \"%s\" \"%s\"",
-                                              udisks_block_device_get_device (block),
+                                              udisks_block_get_device (block),
                                               escaped_name))
     {
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error unlocking %s: %s",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              error_message);
       goto out;
     }
@@ -351,24 +351,24 @@ handle_unlock (UDisksEncrypted        *encrypted,
     {
       g_prefix_error (&error,
                       "Error waiting for cleartext object after unlocking %s",
-                      udisks_block_device_get_device (block));
+                      udisks_block_get_device (block));
       g_dbus_method_invocation_take_error (invocation, error);
       goto out;
     }
-  cleartext_block = udisks_object_peek_block_device (cleartext_object);
+  cleartext_block = udisks_object_peek_block (cleartext_object);
 
   udisks_notice ("Unlocked LUKS device %s as %s",
-                 udisks_block_device_get_device (block),
-                 udisks_block_device_get_device (cleartext_block));
+                 udisks_block_get_device (block),
+                 udisks_block_get_device (cleartext_block));
 
   udev_cleartext_device = udisks_linux_block_object_get_device (UDISKS_LINUX_BLOCK_OBJECT (cleartext_object));
 
   /* update the unlocked-luks file */
   if (!udisks_cleanup_add_unlocked_luks (cleanup,
-                                         makedev (udisks_block_device_get_major (cleartext_block),
-                                                  udisks_block_device_get_minor (cleartext_block)),
-                                         makedev (udisks_block_device_get_major (block),
-                                                  udisks_block_device_get_minor (block)),
+                                         makedev (udisks_block_get_major (cleartext_block),
+                                                  udisks_block_get_minor (cleartext_block)),
+                                         makedev (udisks_block_get_major (block),
+                                                  udisks_block_get_minor (block)),
                                          g_udev_device_get_sysfs_attr (udev_cleartext_device, "dm/uuid"),
                                          caller_uid,
                                          &error))
@@ -402,14 +402,14 @@ handle_lock (UDisksEncrypted        *encrypted,
              GVariant               *options)
 {
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   UDisksCleanup *cleanup;
   gchar *error_message;
   gchar *name;
   gchar *escaped_name;
   UDisksObject *cleartext_object;
-  UDisksBlockDevice *cleartext_block;
+  UDisksBlock *cleartext_block;
   GUdevDevice *device;
   uid_t unlocked_by_uid;
   dev_t cleartext_device_from_file;
@@ -425,7 +425,7 @@ handle_lock (UDisksEncrypted        *encrypted,
   device = NULL;
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (encrypted)));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
   cleanup = udisks_daemon_get_cleanup (daemon);
 
@@ -435,14 +435,14 @@ handle_lock (UDisksEncrypted        *encrypted,
    */
 
   /* Fail if the device is not a LUKS device */
-  if (!(g_strcmp0 (udisks_block_device_get_id_usage (block), "crypto") == 0 &&
-        g_strcmp0 (udisks_block_device_get_id_type (block), "crypto_LUKS") == 0))
+  if (!(g_strcmp0 (udisks_block_get_id_usage (block), "crypto") == 0 &&
+        g_strcmp0 (udisks_block_get_id_type (block), "crypto_LUKS") == 0))
     {
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Device %s does not appear to be a LUKS device",
-                                             udisks_block_device_get_device (block));
+                                             udisks_block_get_device (block));
       goto out;
     }
 
@@ -459,15 +459,15 @@ handle_lock (UDisksEncrypted        *encrypted,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Device %s is not unlocked",
-                                             udisks_block_device_get_device (block));
+                                             udisks_block_get_device (block));
       goto out;
     }
-  cleartext_block = udisks_object_peek_block_device (cleartext_object);
+  cleartext_block = udisks_object_peek_block (cleartext_object);
 
   error = NULL;
   cleartext_device_from_file = udisks_cleanup_find_unlocked_luks (cleanup,
-                                                                  makedev (udisks_block_device_get_major (block),
-                                                                           udisks_block_device_get_minor (block)),
+                                                                  makedev (udisks_block_get_major (block),
+                                                                           udisks_block_get_minor (block)),
                                                                   &unlocked_by_uid,
                                                                   &error);
   if (error != NULL)
@@ -476,7 +476,7 @@ handle_lock (UDisksEncrypted        *encrypted,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error when looking for entry `%s' in unlocked-luks: %s (%s, %d)",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              error->message,
                                              g_quark_to_string (error->domain),
                                              error->code);
@@ -518,14 +518,14 @@ handle_lock (UDisksEncrypted        *encrypted,
   if (cleartext_device_from_file != 0)
     {
       if (!udisks_cleanup_ignore_unlocked_luks (cleanup,
-                                                makedev (udisks_block_device_get_major (cleartext_block),
-                                                         udisks_block_device_get_minor (cleartext_block))))
+                                                makedev (udisks_block_get_major (cleartext_block),
+                                                         udisks_block_get_minor (cleartext_block))))
         {
           g_dbus_method_invocation_return_error (invocation,
                                                  UDISKS_ERROR,
                                                  UDISKS_ERROR_ALREADY_UNMOUNTING,
                                                  "Cannot lock %s as it's already being locked",
-                                                 udisks_block_device_get_device (block));
+                                                 udisks_block_get_device (block));
           goto out;
         }
     }
@@ -543,15 +543,15 @@ handle_lock (UDisksEncrypted        *encrypted,
       if (cleartext_device_from_file != 0)
         {
           udisks_cleanup_unignore_unlocked_luks (cleanup,
-                                                 makedev (udisks_block_device_get_major (cleartext_block),
-                                                          udisks_block_device_get_minor (cleartext_block)));
+                                                 makedev (udisks_block_get_major (cleartext_block),
+                                                          udisks_block_get_minor (cleartext_block)));
         }
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error locking %s (%s): %s",
-                                             udisks_block_device_get_device (cleartext_block),
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (cleartext_block),
+                                             udisks_block_get_device (block),
                                              error_message);
       goto out;
     }
@@ -561,8 +561,8 @@ handle_lock (UDisksEncrypted        *encrypted,
     {
       error = NULL;
       if (!udisks_cleanup_remove_unlocked_luks (cleanup,
-                                                makedev (udisks_block_device_get_major (cleartext_block),
-                                                         udisks_block_device_get_minor (cleartext_block)),
+                                                makedev (udisks_block_get_major (cleartext_block),
+                                                         udisks_block_get_minor (cleartext_block)),
                                                 &error))
         {
           if (error == NULL)
@@ -571,7 +571,7 @@ handle_lock (UDisksEncrypted        *encrypted,
                                                      UDISKS_ERROR,
                                                      UDISKS_ERROR_FAILED,
                                                      "Error removing entry for `%s' from unlocked-luks: Entry not found",
-                                                     udisks_block_device_get_device (cleartext_block));
+                                                     udisks_block_get_device (cleartext_block));
             }
           else
             {
@@ -579,25 +579,25 @@ handle_lock (UDisksEncrypted        *encrypted,
                                                      UDISKS_ERROR,
                                                      UDISKS_ERROR_FAILED,
                                                      "Error removing entry for `%s' from unlocked-luks: %s (%s, %d)",
-                                                     udisks_block_device_get_device (cleartext_block),
+                                                     udisks_block_get_device (cleartext_block),
                                                      error->message,
                                                      g_quark_to_string (error->domain),
                                                      error->code);
               g_error_free (error);
             }
           udisks_cleanup_unignore_unlocked_luks (cleanup,
-                                                 makedev (udisks_block_device_get_major (cleartext_block),
-                                                          udisks_block_device_get_minor (cleartext_block)));
+                                                 makedev (udisks_block_get_major (cleartext_block),
+                                                          udisks_block_get_minor (cleartext_block)));
           goto out;
         }
       udisks_cleanup_unignore_unlocked_luks (cleanup,
-                                             makedev (udisks_block_device_get_major (cleartext_block),
-                                                      udisks_block_device_get_minor (cleartext_block)));
+                                             makedev (udisks_block_get_major (cleartext_block),
+                                                      udisks_block_get_minor (cleartext_block)));
     }
 
   udisks_notice ("Locked LUKS device %s (was unlocked as %s)",
-                 udisks_block_device_get_device (block),
-                 udisks_block_device_get_device (cleartext_block));
+                 udisks_block_get_device (block),
+                 udisks_block_get_device (cleartext_block));
 
   udisks_encrypted_complete_lock (encrypted, invocation);
 
index cdc1df7..cd13214 100644 (file)
@@ -449,7 +449,7 @@ prepend_default_mount_options (const FSMountOptions *fsmo,
 
 /*
  * calculate_fs_type: <internal>
- * @block: A #UDisksBlockDevice.
+ * @block: A #UDisksBlock.
  * @given_options: The a{sv} #GVariant.
  * @error: Return location for error or %NULL.
  *
@@ -458,7 +458,7 @@ prepend_default_mount_options (const FSMountOptions *fsmo,
  * Returns: A valid UTF-8 string with the filesystem type (may be "auto") or %NULL if @error is set. Free with g_free().
  */
 static gchar *
-calculate_fs_type (UDisksBlockDevice         *block,
+calculate_fs_type (UDisksBlock               *block,
                    GVariant                  *given_options,
                    GError                   **error)
 {
@@ -468,7 +468,7 @@ calculate_fs_type (UDisksBlockDevice         *block,
 
   probed_fs_type = NULL;
   if (block != NULL)
-    probed_fs_type = udisks_block_device_get_id_type (block);
+    probed_fs_type = udisks_block_get_id_type (block);
 
   fs_type_to_use = NULL;
   if (g_variant_lookup (given_options,
@@ -494,7 +494,7 @@ calculate_fs_type (UDisksBlockDevice         *block,
 
 /*
  * calculate_mount_options: <internal>
- * @block: A #UDisksBlockDevice.
+ * @block: A #UDisksBlock.
  * @caller_uid: The uid of the caller making the request.
  * @fs_type: The filesystem type to use or %NULL.
  * @options: Options requested by the caller.
@@ -506,7 +506,7 @@ calculate_fs_type (UDisksBlockDevice         *block,
  * Returns: A string with mount options or %NULL if @error is set. Free with g_free().
  */
 static gchar *
-calculate_mount_options (UDisksBlockDevice         *block,
+calculate_mount_options (UDisksBlock               *block,
                          uid_t                      caller_uid,
                          const gchar               *fs_type,
                          GVariant                  *options,
@@ -601,7 +601,7 @@ ensure_utf8 (const gchar *s)
 
 /*
  * calculate_mount_point: <internal>
- * @block: A #UDisksBlockDevice.
+ * @block: A #UDisksBlock.
  * @fs_type: The file system type to mount with
  * @error: Return location for error or %NULL.
  *
@@ -610,7 +610,7 @@ ensure_utf8 (const gchar *s)
  * Returns: A UTF-8 string with the mount point to use or %NULL if @error is set. Free with g_free().
  */
 static gchar *
-calculate_mount_point (UDisksBlockDevice         *block,
+calculate_mount_point (UDisksBlock               *block,
                        const gchar               *fs_type,
                        GError                   **error)
 {
@@ -626,8 +626,8 @@ calculate_mount_point (UDisksBlockDevice         *block,
   uuid = NULL;
   if (block != NULL)
     {
-      label = udisks_block_device_get_id_label (block);
-      uuid = udisks_block_device_get_id_uuid (block);
+      label = udisks_block_get_id_label (block);
+      uuid = udisks_block_get_id_uuid (block);
     }
 
   /* NOTE: UTF-8 has the nice property that valid UTF-8 strings only contains
@@ -694,7 +694,7 @@ calculate_mount_point (UDisksBlockDevice         *block,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_in_fstab (UDisksBlockDevice  *block,
+is_in_fstab (UDisksBlock        *block,
              const gchar        *fstab_path,
              gchar             **out_mount_point)
 {
@@ -749,8 +749,8 @@ is_in_fstab (UDisksBlockDevice  *block,
 
       /* udisks_debug ("device %d:%d for entry %s", major (sb.st_rdev), minor (sb.st_rdev), m->mnt_fsname); */
 
-      if (makedev (udisks_block_device_get_major (block),
-                   udisks_block_device_get_minor (block)) == sb.st_rdev)
+      if (makedev (udisks_block_get_major (block),
+                   udisks_block_get_minor (block)) == sb.st_rdev)
         {
           ret = TRUE;
           if (out_mount_point != NULL)
@@ -773,7 +773,7 @@ is_in_fstab (UDisksBlockDevice  *block,
  * TODO: check if systemd has a specific "unit" for the device
  */
 static gboolean
-is_system_managed (UDisksBlockDevice  *block,
+is_system_managed (UDisksBlock        *block,
                    gchar             **out_mount_point)
 {
   gboolean ret;
@@ -799,7 +799,7 @@ handle_mount (UDisksFilesystem       *filesystem,
               GVariant               *options)
 {
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   UDisksCleanup *cleanup;
   uid_t caller_uid;
@@ -827,7 +827,7 @@ handle_mount (UDisksFilesystem       *filesystem,
   system_managed = FALSE;
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (filesystem)));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
   cleanup = udisks_daemon_get_cleanup (daemon);
 
@@ -854,7 +854,7 @@ handle_mount (UDisksFilesystem       *filesystem,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_ALREADY_MOUNTED,
                                              "Device %s is already mounted at %s.\n",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              str->str);
       g_string_free (str, TRUE);
       goto out;
@@ -885,7 +885,7 @@ handle_mount (UDisksFilesystem       *filesystem,
                                                      UDISKS_ERROR_FAILED,
                                                      "Error creating directory `%s' to be used for mounting %s: %m",
                                                      mount_point_to_use,
-                                                     udisks_block_device_get_device (block));
+                                                     udisks_block_get_device (block));
               goto out;
             }
         }
@@ -922,19 +922,19 @@ handle_mount (UDisksFilesystem       *filesystem,
                                                  UDISKS_ERROR,
                                                  UDISKS_ERROR_FAILED,
                                                  "Error mounting system-managed device %s: %s",
-                                                 udisks_block_device_get_device (block),
+                                                 udisks_block_get_device (block),
                                                  error_message);
           goto out;
         }
       udisks_notice ("Mounted %s (system) at %s on behalf of uid %d",
-                     udisks_block_device_get_device (block),
+                     udisks_block_get_device (block),
                      mount_point_to_use,
                      caller_uid);
 
       /* update the mounted-fs file */
       if (!udisks_cleanup_add_mounted_fs (cleanup,
                                           mount_point_to_use,
-                                          makedev (udisks_block_device_get_major (block), udisks_block_device_get_minor (block)),
+                                          makedev (udisks_block_get_major (block), udisks_block_get_minor (block)),
                                           caller_uid,
                                           TRUE, /* fstab_mounted */
                                           &error))
@@ -958,7 +958,7 @@ handle_mount (UDisksFilesystem       *filesystem,
    */
   probed_fs_usage = NULL;
   if (block != NULL)
-    probed_fs_usage = udisks_block_device_get_id_usage (block);
+    probed_fs_usage = udisks_block_get_id_usage (block);
   if (probed_fs_usage != NULL && strlen (probed_fs_usage) > 0 &&
       g_strcmp0 (probed_fs_usage, "filesystem") != 0)
     {
@@ -966,7 +966,7 @@ handle_mount (UDisksFilesystem       *filesystem,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Cannot mount block device %s with probed usage `%s' - expected `filesystem'",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              probed_fs_usage);
       goto out;
     }
@@ -1002,7 +1002,7 @@ handle_mount (UDisksFilesystem       *filesystem,
    * may be racing with other threads...
    */
   action_id = "org.freedesktop.udisks2.filesystem-mount";
-  if (udisks_block_device_get_hint_system (block) &&
+  if (udisks_block_get_hint_system (block) &&
       !(udisks_daemon_util_setup_by_user (daemon, object, caller_uid)))
     action_id = "org.freedesktop.udisks2.filesystem-mount-system";
   if (!udisks_daemon_util_check_authorization_sync (daemon,
@@ -1039,7 +1039,7 @@ handle_mount (UDisksFilesystem       *filesystem,
   /* update the mounted-fs file */
   if (!udisks_cleanup_add_mounted_fs (cleanup,
                                       mount_point_to_use,
-                                      makedev (udisks_block_device_get_major (block), udisks_block_device_get_minor (block)),
+                                      makedev (udisks_block_get_major (block), udisks_block_get_minor (block)),
                                       caller_uid,
                                       FALSE, /* fstab_mounted */
                                       &error))
@@ -1063,7 +1063,7 @@ handle_mount (UDisksFilesystem       *filesystem,
                                               "mount -t \"%s\" -o \"%s\" \"%s\" \"%s\"",
                                               escaped_fs_type_to_use,
                                               escaped_mount_options_to_use,
-                                              udisks_block_device_get_device (block),
+                                              udisks_block_get_device (block),
                                               escaped_mount_point_to_use))
     {
       /* ugh, something went wrong.. we need to clean up the created mount point
@@ -1092,14 +1092,14 @@ handle_mount (UDisksFilesystem       *filesystem,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error mounting %s at %s: %s",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              mount_point_to_use,
                                              error_message);
       goto out;
     }
 
   udisks_notice ("Mounted %s at %s on behalf of uid %d",
-                 udisks_block_device_get_device (block),
+                 udisks_block_get_device (block),
                  mount_point_to_use,
                  caller_uid);
 
@@ -1126,7 +1126,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
                 GVariant               *options)
 {
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   UDisksCleanup *cleanup;
   gchar *mount_point;
@@ -1147,7 +1147,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
   opt_force = FALSE;
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (filesystem)));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
   cleanup = udisks_daemon_get_cleanup (daemon);
   system_managed = FALSE;
@@ -1167,7 +1167,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_NOT_MOUNTED,
                                              "Device `%s' is not mounted",
-                                             udisks_block_device_get_device (block));
+                                             udisks_block_get_device (block));
       goto out;
     }
 
@@ -1230,12 +1230,12 @@ handle_unmount (UDisksFilesystem       *filesystem,
                                                  UDISKS_ERROR,
                                                  UDISKS_ERROR_FAILED,
                                                  "Error unmounting system-managed device %s: %s",
-                                                 udisks_block_device_get_device (block),
+                                                 udisks_block_get_device (block),
                                                  error_message);
           goto out;
         }
       udisks_notice ("Unmounted %s (system) from %s on behalf of uid %d",
-                     udisks_block_device_get_device (block),
+                     udisks_block_get_device (block),
                      mount_point,
                      caller_uid);
       udisks_filesystem_complete_unmount (filesystem, invocation);
@@ -1244,7 +1244,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
 
   error = NULL;
   mount_point = udisks_cleanup_find_mounted_fs (cleanup,
-                                                makedev (udisks_block_device_get_major (block), udisks_block_device_get_minor (block)),
+                                                makedev (udisks_block_get_major (block), udisks_block_get_minor (block)),
                                                 &mounted_by_uid,
                                                 &fstab_mounted,
                                                 &error);
@@ -1254,7 +1254,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error when looking for entry `%s' in mounted-fs: %s (%s, %d)",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              error->message,
                                              g_quark_to_string (error->domain),
                                              error->code);
@@ -1289,7 +1289,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
                                                  UDISKS_ERROR,
                                                  UDISKS_ERROR_ALREADY_UNMOUNTING,
                                                  "Cannot unmount %s: Mount point `%s' is currently being unmounted",
-                                                 udisks_block_device_get_device (block),
+                                                 udisks_block_get_device (block),
                                                  mount_point);
           goto out;
         }
@@ -1317,7 +1317,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
                                                   NULL,  /* input_string */
                                                   "umount %s \"%s\"",
                                                   opt_force ? "-l" : "",
-                                                  udisks_block_device_get_device (block));
+                                                  udisks_block_get_device (block));
     }
 
   if (!rc)
@@ -1326,7 +1326,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error unmounting %s: %s",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              error_message);
       udisks_cleanup_unignore_mounted_fs (cleanup, mount_point);
       goto out;
@@ -1380,7 +1380,7 @@ handle_unmount (UDisksFilesystem       *filesystem,
     }
 
   udisks_notice ("Unmounted %s on behalf of uid %d",
-                 udisks_block_device_get_device (block),
+                 udisks_block_get_device (block),
                  caller_uid);
 
   udisks_filesystem_complete_unmount (filesystem, invocation);
@@ -1422,7 +1422,7 @@ handle_set_label (UDisksFilesystem       *filesystem,
                   const gchar            *label,
                   GVariant               *options)
 {
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksObject *object;
   UDisksDaemon *daemon;
   const gchar *probed_fs_usage;
@@ -1439,10 +1439,10 @@ handle_set_label (UDisksFilesystem       *filesystem,
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (filesystem)));
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
 
-  probed_fs_usage = udisks_block_device_get_id_usage (block);
-  probed_fs_type = udisks_block_device_get_id_type (block);
+  probed_fs_usage = udisks_block_get_id_usage (block);
+  probed_fs_type = udisks_block_get_id_type (block);
 
   /* TODO: add support for other fstypes */
   if (!(g_strcmp0 (probed_fs_usage, "filesystem") == 0 &&
@@ -1480,7 +1480,7 @@ handle_set_label (UDisksFilesystem       *filesystem,
     }
 
   action_id = "org.freedesktop.udisks2.modify-device";
-  if (udisks_block_device_get_hint_system (block))
+  if (udisks_block_get_hint_system (block))
     action_id = "org.freedesktop.udisks2.modify-device-system";
 
   /* Check that the user is actually authorized to change the
@@ -1501,7 +1501,7 @@ handle_set_label (UDisksFilesystem       *filesystem,
                                           0,    /* uid_t run_as_euid */
                                           NULL, /* input_string */
                                           "e2label %s %s",
-                                          udisks_block_device_get_device (block),
+                                          udisks_block_get_device (block),
                                           escaped_label);
   g_signal_connect (job,
                     "completed",
index 94bff9a..a9bd556 100644 (file)
@@ -160,7 +160,7 @@ handle_delete (UDisksLoop             *loop,
                GVariant               *options)
 {
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDaemon *daemon;
   UDisksCleanup *cleanup;
   gchar *error_message;
@@ -175,7 +175,7 @@ handle_delete (UDisksLoop             *loop,
   escaped_device = NULL;
 
   object = g_object_ref (UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (loop))));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
   cleanup = udisks_daemon_get_cleanup (daemon);
 
@@ -189,7 +189,7 @@ handle_delete (UDisksLoop             *loop,
 
   error = NULL;
   if (!udisks_cleanup_has_loop (cleanup,
-                                udisks_block_device_get_device (block),
+                                udisks_block_get_device (block),
                                 &setup_by_uid,
                                 &error))
     {
@@ -199,7 +199,7 @@ handle_delete (UDisksLoop             *loop,
                                                  UDISKS_ERROR,
                                                  UDISKS_ERROR_FAILED,
                                                  "Error when looking for entry `%s' in loop: %s (%s, %d)",
-                                                 udisks_block_device_get_device (block),
+                                                 udisks_block_get_device (block),
                                                  error->message,
                                                  g_quark_to_string (error->domain),
                                                  error->code);
@@ -220,15 +220,15 @@ handle_delete (UDisksLoop             *loop,
         goto out;
     }
 
-  escaped_device = g_strescape (udisks_block_device_get_device (block), NULL);
+  escaped_device = g_strescape (udisks_block_get_device (block), NULL);
 
-  if (!udisks_cleanup_ignore_loop (cleanup, udisks_block_device_get_device (block)))
+  if (!udisks_cleanup_ignore_loop (cleanup, udisks_block_get_device (block)))
     {
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_ALREADY_UNMOUNTING,
                                              "Cannot delete %s as it's currently being deleted",
-                                             udisks_block_device_get_device (block));
+                                             udisks_block_get_device (block));
       goto out;
     }
 
@@ -242,12 +242,12 @@ handle_delete (UDisksLoop             *loop,
                                               "losetup -d \"%s\"",
                                               escaped_device))
     {
-      udisks_cleanup_unignore_loop (cleanup, udisks_block_device_get_device (block));
+      udisks_cleanup_unignore_loop (cleanup, udisks_block_get_device (block));
       g_dbus_method_invocation_return_error (invocation,
                                              UDISKS_ERROR,
                                              UDISKS_ERROR_FAILED,
                                              "Error deleting %s: %s",
-                                             udisks_block_device_get_device (block),
+                                             udisks_block_get_device (block),
                                              error_message);
       goto out;
     }
@@ -255,7 +255,7 @@ handle_delete (UDisksLoop             *loop,
   if (setup_by_uid != -1)
     {
       error = NULL;
-      if (!udisks_cleanup_remove_loop (cleanup, udisks_block_device_get_device (block), &error))
+      if (!udisks_cleanup_remove_loop (cleanup, udisks_block_get_device (block), &error))
         {
           if (error == NULL)
             {
@@ -263,7 +263,7 @@ handle_delete (UDisksLoop             *loop,
                                                      UDISKS_ERROR,
                                                      UDISKS_ERROR_FAILED,
                                                      "Error removing entry for `%s' from loop file: Entry not found",
-                                                     udisks_block_device_get_device (block));
+                                                     udisks_block_get_device (block));
             }
           else
             {
@@ -271,20 +271,20 @@ handle_delete (UDisksLoop             *loop,
                                                      UDISKS_ERROR,
                                                      UDISKS_ERROR_FAILED,
                                                      "Error removing entry for `%s' from loop file: %s (%s, %d)",
-                                                     udisks_block_device_get_device (block),
+                                                     udisks_block_get_device (block),
                                                      error->message,
                                                      g_quark_to_string (error->domain),
                                                      error->code);
               g_error_free (error);
             }
-          udisks_cleanup_unignore_loop (cleanup, udisks_block_device_get_device (block));
+          udisks_cleanup_unignore_loop (cleanup, udisks_block_get_device (block));
           goto out;
         }
-      udisks_cleanup_unignore_loop (cleanup, udisks_block_device_get_device (block));
+      udisks_cleanup_unignore_loop (cleanup, udisks_block_get_device (block));
     }
 
   udisks_notice ("Deleted loop device %s (was backed by %s)",
-                 udisks_block_device_get_device (block),
+                 udisks_block_get_device (block),
                  udisks_loop_get_backing_file (loop));
 
   udisks_loop_complete_delete (loop, invocation);
index 4b337b1..d9fc40b 100644 (file)
@@ -215,17 +215,17 @@ wait_for_loop_object (UDisksDaemon *daemon,
                       gpointer      user_data)
 {
   WaitForLoopData *data = user_data;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksLoop *loop;
   gboolean ret;
 
   ret = FALSE;
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   loop = udisks_object_peek_loop (object);
   if (block == NULL || loop == NULL)
     goto out;
 
-  if (g_strcmp0 (udisks_block_device_get_device (block), data->loop_device) != 0)
+  if (g_strcmp0 (udisks_block_get_device (block), data->loop_device) != 0)
     goto out;
 
   if (g_strcmp0 (udisks_loop_get_backing_file (loop), data->path) != 0)
index a36046c..629d50b 100644 (file)
@@ -215,7 +215,7 @@ udisks_linux_provider_start (UDisksProvider *_provider)
 
   provider->coldplug = FALSE;
 
-  /* update BlockDevice:Configuration whenever fstab or crypttab entries are added or removed */
+  /* update Block:Configuration whenever fstab or crypttab entries are added or removed */
   g_signal_connect (udisks_daemon_get_fstab_monitor (daemon),
                     "entry-added",
                     G_CALLBACK (fstab_monitor_on_entry_added),
index 09f8d9d..92d1524 100644 (file)
@@ -156,12 +156,12 @@ handle_start (UDisksSwapspace        *swapspace,
 {
   UDisksObject *object;
   UDisksDaemon *daemon;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksBaseJob *job;
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (swapspace)));
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
 
   if (!udisks_daemon_util_check_authorization_sync (daemon,
                                                     object,
@@ -177,7 +177,7 @@ handle_start (UDisksSwapspace        *swapspace,
                                           0,    /* uid_t run_as_euid */
                                           NULL, /* input_string */
                                           "swapon %s",
-                                          udisks_block_device_get_device (block));
+                                          udisks_block_get_device (block));
   g_signal_connect (job,
                     "completed",
                     G_CALLBACK (swapspace_start_on_job_completed),
@@ -213,12 +213,12 @@ handle_stop (UDisksSwapspace        *swapspace,
 {
   UDisksObject *object;
   UDisksDaemon *daemon;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksBaseJob *job;
 
   object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (swapspace)));
   daemon = udisks_linux_block_object_get_daemon (UDISKS_LINUX_BLOCK_OBJECT (object));
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
 
   /* Now, check that the user is actually authorized to stop the swap space.
    *
@@ -239,7 +239,7 @@ handle_stop (UDisksSwapspace        *swapspace,
                                           0,    /* uid_t run_as_euid */
                                           NULL, /* input_string */
                                           "swapoff %s",
-                                          udisks_block_device_get_device (block));
+                                          udisks_block_get_device (block));
   g_signal_connect (job,
                     "completed",
                     G_CALLBACK (swapspace_stop_on_job_completed),
index 4f71a95..c9abdce 100644 (file)
@@ -402,21 +402,21 @@ lookup_object_by_device (const gchar *device)
   for (l = objects; l != NULL; l = l->next)
     {
       UDisksObject *object = UDISKS_OBJECT (l->data);
-      UDisksBlockDevice *block;
+      UDisksBlock *block;
 
-      block = udisks_object_peek_block_device (object);
+      block = udisks_object_peek_block (object);
       if (block != NULL)
         {
           const gchar * const *symlinks;
           guint n;
 
-          if (g_strcmp0 (udisks_block_device_get_device (block), device) == 0)
+          if (g_strcmp0 (udisks_block_get_device (block), device) == 0)
             {
               ret = g_object_ref (object);
               goto out;
             }
 
-          symlinks = udisks_block_device_get_symlinks (block);
+          symlinks = udisks_block_get_symlinks (block);
           for (n = 0; symlinks != NULL && symlinks[n] != NULL; n++)
             {
               if (g_strcmp0 (symlinks[n], device) == 0)
@@ -592,7 +592,7 @@ handle_command_mount_unmount (gint        *argc,
   GList *l;
   GList *objects;
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksFilesystem *filesystem;
   guint n;
   const gchar * const *mount_points;
@@ -668,7 +668,7 @@ handle_command_mount_unmount (gint        *argc,
           gboolean is_mounted;
 
           object = UDISKS_OBJECT (l->data);
-          block = udisks_object_peek_block_device (object);
+          block = udisks_object_peek_block (object);
           filesystem = udisks_object_peek_filesystem (object);
 
           if (filesystem == NULL)
@@ -697,7 +697,7 @@ handle_command_mount_unmount (gint        *argc,
       for (l = objects; l != NULL; l = l->next)
         {
           object = UDISKS_OBJECT (l->data);
-          block = udisks_object_peek_block_device (object);
+          block = udisks_object_peek_block (object);
           filesystem = udisks_object_peek_filesystem (object);
 
           if (block != NULL)
@@ -715,8 +715,8 @@ handle_command_mount_unmount (gint        *argc,
               if ((is_mount && !is_mounted) || (!is_mount && is_mounted))
                 {
                   const gchar * const *symlinks;
-                  g_print ("%s \n", udisks_block_device_get_device (block));
-                  symlinks = udisks_block_device_get_symlinks (block);
+                  g_print ("%s \n", udisks_block_get_device (block));
+                  symlinks = udisks_block_get_symlinks (block);
                   for (n = 0; symlinks != NULL && symlinks[n] != NULL; n++)
                     g_print ("%s \n", symlinks[n]);
                 }
@@ -757,7 +757,7 @@ handle_command_mount_unmount (gint        *argc,
       goto out;
     }
 
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   filesystem = udisks_object_peek_filesystem (object);
   if (filesystem == NULL)
     {
@@ -824,14 +824,14 @@ handle_command_mount_unmount (gint        *argc,
               goto try_again;
             }
           g_printerr ("Error mounting %s: %s\n",
-                      udisks_block_device_get_device (block),
+                      udisks_block_get_device (block),
                       error->message);
           g_error_free (error);
           g_object_unref (object);
           goto out;
         }
       g_print ("Mounted %s at %s.\n",
-               udisks_block_device_get_device (block),
+               udisks_block_get_device (block),
                mount_path);
       g_free (mount_path);
     }
@@ -853,14 +853,14 @@ handle_command_mount_unmount (gint        *argc,
               goto try_again;
             }
           g_printerr ("Error unmounting %s: %s\n",
-                      udisks_block_device_get_device (block),
+                      udisks_block_get_device (block),
                       error->message);
           g_error_free (error);
           g_object_unref (object);
           goto out;
         }
       g_print ("Unmounted %s.\n",
-               udisks_block_device_get_device (block));
+               udisks_block_get_device (block));
     }
 
   ret = 0;
@@ -965,12 +965,12 @@ encrypted_is_unlocked (UDisksObject *encrypted_object)
   for (l = objects; l != NULL; l = l->next)
     {
       UDisksObject *object = UDISKS_OBJECT (l->data);
-      UDisksBlockDevice *block;
+      UDisksBlock *block;
 
-      block = udisks_object_peek_block_device (object);
+      block = udisks_object_peek_block (object);
       if (block != NULL)
         {
-          if (g_strcmp0 (udisks_block_device_get_crypto_backing_device (block), encrypted_object_path) == 0)
+          if (g_strcmp0 (udisks_block_get_crypto_backing_device (block), encrypted_object_path) == 0)
             {
               ret = TRUE;
               goto out;
@@ -1072,7 +1072,7 @@ handle_command_unlock_lock (gint        *argc,
   GList *l;
   GList *objects;
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksEncrypted *encrypted;
   guint n;
   GVariant *options;
@@ -1146,7 +1146,7 @@ handle_command_unlock_lock (gint        *argc,
           gboolean is_unlocked;
 
           object = UDISKS_OBJECT (l->data);
-          block = udisks_object_peek_block_device (object);
+          block = udisks_object_peek_block (object);
           encrypted = udisks_object_peek_encrypted (object);
 
           if (encrypted == NULL)
@@ -1172,7 +1172,7 @@ handle_command_unlock_lock (gint        *argc,
       for (l = objects; l != NULL; l = l->next)
         {
           object = UDISKS_OBJECT (l->data);
-          block = udisks_object_peek_block_device (object);
+          block = udisks_object_peek_block (object);
 
           if (block != NULL)
             {
@@ -1184,8 +1184,8 @@ handle_command_unlock_lock (gint        *argc,
               if ((is_unlock && !is_unlocked) || (!is_unlock && is_unlocked))
                 {
                   const gchar * const *symlinks;
-                  g_print ("%s \n", udisks_block_device_get_device (block));
-                  symlinks = udisks_block_device_get_symlinks (block);
+                  g_print ("%s \n", udisks_block_get_device (block));
+                  symlinks = udisks_block_get_symlinks (block);
                   for (n = 0; symlinks != NULL && symlinks[n] != NULL; n++)
                     g_print ("%s \n", symlinks[n]);
                 }
@@ -1226,7 +1226,7 @@ handle_command_unlock_lock (gint        *argc,
       goto out;
     }
 
-  block = udisks_object_peek_block_device (object);
+  block = udisks_object_peek_block (object);
   encrypted = udisks_object_peek_encrypted (object);
   if (encrypted == NULL)
     {
@@ -1271,7 +1271,7 @@ handle_command_unlock_lock (gint        *argc,
               goto try_again;
             }
           g_printerr ("Error unlocking %s: %s\n",
-                      udisks_block_device_get_device (block),
+                      udisks_block_get_device (block),
                       error->message);
           g_error_free (error);
           g_object_unref (object);
@@ -1282,8 +1282,8 @@ handle_command_unlock_lock (gint        *argc,
       cleartext_object = UDISKS_OBJECT (g_dbus_object_manager_get_object (udisks_client_get_object_manager (client),
                                                                           (cleartext_object_path)));
       g_print ("Unlocked %s as %s.\n",
-               udisks_block_device_get_device (block),
-               udisks_block_device_get_device (udisks_object_get_block_device (cleartext_object)));
+               udisks_block_get_device (block),
+               udisks_block_get_device (udisks_object_get_block (cleartext_object)));
       g_object_unref (cleartext_object);
       g_free (cleartext_object_path);
     }
@@ -1305,14 +1305,14 @@ handle_command_unlock_lock (gint        *argc,
               goto try_again;
             }
           g_printerr ("Error locking %s: %s\n",
-                      udisks_block_device_get_device (block),
+                      udisks_block_get_device (block),
                       error->message);
           g_error_free (error);
           g_object_unref (object);
           goto out;
         }
       g_print ("Locked %s.\n",
-               udisks_block_device_get_device (block));
+               udisks_block_get_device (block));
     }
 
   ret = 0;
@@ -1446,7 +1446,7 @@ handle_command_loop (gint        *argc,
   GList *l;
   GList *objects;
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   guint n;
   GVariant *options;
   GVariantBuilder builder;
@@ -1536,7 +1536,7 @@ handle_command_loop (gint        *argc,
               for (l = objects; l != NULL; l = l->next)
                 {
                   object = UDISKS_OBJECT (l->data);
-                  block = udisks_object_peek_block_device (object);
+                  block = udisks_object_peek_block (object);
                   if (udisks_object_peek_loop (object) != NULL)
                     {
                       object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (object));
@@ -1554,12 +1554,12 @@ handle_command_loop (gint        *argc,
               for (l = objects; l != NULL; l = l->next)
                 {
                   object = UDISKS_OBJECT (l->data);
-                  block = udisks_object_peek_block_device (object);
+                  block = udisks_object_peek_block (object);
                   if (udisks_object_peek_loop (object) != NULL)
                     {
                       const gchar * const *symlinks;
-                      g_print ("%s \n", udisks_block_device_get_device (block));
-                      symlinks = udisks_block_device_get_symlinks (block);
+                      g_print ("%s \n", udisks_block_get_device (block));
+                      symlinks = udisks_block_get_symlinks (block);
                       for (n = 0; symlinks != NULL && symlinks[n] != NULL; n++)
                         g_print ("%s \n", symlinks[n]);
                     }
@@ -1658,7 +1658,7 @@ handle_command_loop (gint        *argc,
                                                                           (resulting_object_path)));
       g_print ("Mapped file %s as %s.\n",
                opt_loop_file,
-               udisks_block_device_get_device (udisks_object_get_block_device (resulting_object)));
+               udisks_block_get_device (udisks_object_get_block (resulting_object)));
       g_object_unref (resulting_object);
       g_free (resulting_object_path);
     }
@@ -1705,7 +1705,7 @@ handle_command_loop (gint        *argc,
               goto delete_try_again;
             }
           g_printerr ("Error deleting loop device %s: %s\n",
-                      udisks_block_device_get_device (udisks_object_peek_block_device (object)),
+                      udisks_block_get_device (udisks_object_peek_block (object)),
                       error->message);
           g_error_free (error);
           goto out;
@@ -1755,7 +1755,7 @@ handle_command_info (gint        *argc,
   GList *l;
   GList *objects;
   UDisksObject *object;
-  UDisksBlockDevice *block;
+  UDisksBlock *block;
   UDisksDrive *drive;
   guint n;
 
@@ -1839,12 +1839,12 @@ handle_command_info (gint        *argc,
       for (l = objects; l != NULL; l = l->next)
         {
           object = UDISKS_OBJECT (l->data);
-          block = udisks_object_peek_block_device (object);
+          block = udisks_object_peek_block (object);
           if (block != NULL)
             {
               const gchar * const *symlinks;
-              g_print ("%s \n", udisks_block_device_get_device (block));
-              symlinks = udisks_block_device_get_symlinks (block);
+              g_print ("%s \n", udisks_block_get_device (block));
+              symlinks = udisks_block_get_symlinks (block);
               for (n = 0; symlinks != NULL && symlinks[n] != NULL; n++)
                 g_print ("%s \n", symlinks[n]);
             }
@@ -2337,8 +2337,8 @@ handle_command_monitor (gint        *argc,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static GList *
-find_block_devices_for_drive (GList       *objects,
-                              const gchar *drive_object_path)
+find_blocks_for_drive (GList       *objects,
+                       const gchar *drive_object_path)
 {
   GList *ret;
   GList *l;
@@ -2347,13 +2347,13 @@ find_block_devices_for_drive (GList       *objects,
   for (l = objects; l != NULL; l = l->next)
     {
       UDisksObject *object = UDISKS_OBJECT (l->data);
-      UDisksBlockDevice *block;
+      UDisksBlock *block;
 
-      block = udisks_object_get_block_device (object);
+      block = udisks_object_get_block (object);
       if (block == NULL)
         continue;
 
-      if (g_strcmp0 (udisks_block_device_get_drive (block), drive_object_path) == 0)
+      if (g_strcmp0 (udisks_block_get_drive (block), drive_object_path) == 0)
         {
           ret = g_list_append (ret, g_object_ref (block));
         }
@@ -2456,14 +2456,14 @@ handle_command_status (gint        *argc,
     {
       UDisksObject *object = UDISKS_OBJECT (l->data);
       UDisksDrive *drive;
-      GList *block_devices;
+      GList *blocks;
       const gchar *vendor;
       const gchar *model;
       const gchar *revision;
       const gchar *serial;
       gchar *vendor_model;
       GString *str;
-      gchar *block_device;
+      gchar *block;
       GList *j;
 
       drive = udisks_object_peek_drive (object);
@@ -2471,16 +2471,16 @@ handle_command_status (gint        *argc,
         continue;
 
       str = g_string_new (NULL);
-      block_devices = find_block_devices_for_drive (objects, g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
-      for (j = block_devices; j != NULL; j = j->next)
+      blocks = find_blocks_for_drive (objects, g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
+      for (j = blocks; j != NULL; j = j->next)
         {
-          UDisksBlockDevice *block = UDISKS_BLOCK_DEVICE (j->data);
-          if (!udisks_block_device_get_part_entry (block))
+          UDisksBlock *block = UDISKS_BLOCK (j->data);
+          if (!udisks_block_get_part_entry (block))
             {
               const gchar *device_file;
               if (str->len > 0)
                 g_string_append (str, " ");
-              device_file = udisks_block_device_get_device (block);
+              device_file = udisks_block_get_device (block);
               if (g_str_has_prefix (device_file, "/dev/"))
                 g_string_append (str, device_file + 5);
               else
@@ -2489,9 +2489,9 @@ handle_command_status (gint        *argc,
         }
       if (str->len == 0)
         g_string_append (str, "-");
-      block_device = g_string_free (str, FALSE);
-      g_list_foreach (block_devices, (GFunc) g_object_unref, NULL);
-      g_list_free (block_devices);
+      block = g_string_free (str, FALSE);
+      g_list_foreach (blocks, (GFunc) g_object_unref, NULL);
+      g_list_free (blocks);
 
       vendor = udisks_drive_get_vendor (drive);
       model = udisks_drive_get_model (drive);
@@ -2517,8 +2517,8 @@ handle_command_status (gint        *argc,
                vendor_model,
                revision,
                serial,
-               block_device);
-      g_free (block_device);
+               block);
+      g_free (block);
     }
 
 
index 3d6e965..e48f30f 100644 (file)
@@ -31,8 +31,8 @@
 #include <udisks/udisks.h>
 
 static UDisksObject *
-lookup_object_for_block_device (UDisksClient  *client,
-                                dev_t          block_device)
+lookup_object_for_block (UDisksClient  *client,
+                         dev_t          block_device)
 {
   UDisksObject *ret;
   GList *objects;
@@ -44,13 +44,13 @@ lookup_object_for_block_device (UDisksClient  *client,
   for (l = objects; l != NULL; l = l->next)
     {
       UDisksObject *object = UDISKS_OBJECT (l->data);
-      UDisksBlockDevice *block;
+      UDisksBlock *block;
 
-      block = udisks_object_peek_block_device (object);
+      block = udisks_object_peek_block (object);
       if (block != NULL)
         {
-          if (block_device == makedev (udisks_block_device_get_major (block),
-                                       udisks_block_device_get_minor (block)))
+          if (block_device == makedev (udisks_block_get_major (block),
+                                       udisks_block_get_minor (block)))
             {
               ret = g_object_ref (object);
               goto out;
@@ -110,7 +110,7 @@ main (int argc, char *argv[])
       goto out;
     }
 
-  object = lookup_object_for_block_device (client, block_device);
+  object = lookup_object_for_block (client, block_device);
   if (object == NULL)
     {
       g_printerr ("Error finding object for block device %d:%d\n", major (block_device), minor (block_device));