/*
 * This file was generated by qdbusxml2cpp version 0.7
 * Command line was: qdbusxml2cpp -a gen.h:gen.cpp org.freedesktop.UDisks2.xml
 *
 * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd.
 *
 * This is an auto-generated file.
 * This file may have been hand-edited. Look for HAND-EDIT comments
 * before re-generating it.
 */

#ifndef ADAPTORS_H_1458980343
#define ADAPTORS_H_1458980343

#include <QtCore/QObject>
#include <QtDBus/QtDBus>
class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;
class QString;
class QVariant;

#include <QVariantMap>

struct Configuration
{
    QString type;
    QVariantMap data;
};
Q_DECLARE_METATYPE(Configuration)
QDBusArgument &operator<<(QDBusArgument &argument, const Configuration &cfg);
const QDBusArgument &operator>>(const QDBusArgument &argument, Configuration &cfg);

typedef QList<Configuration> ConfigurationList;
Q_DECLARE_METATYPE(ConfigurationList)

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Block
 */
class BlockAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Block")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Block\">\n"
"    <!-- Device: The special device file for the block device e.g. <filename>/dev/sda2</filename>. -->\n"
"    <property access=\"read\" type=\"ay\" name=\"Device\"/>\n"
"    <!-- PreferredDevice:\n"
"         The special device file to present in the UI instead of the value\n"
"         of the #org.freedesktop.UDisks2.Block:Device property.\n"
"\n"
"         For example this could be\n"
"         e.g. <filename>/dev/mapper/mpathk</filename> for a multipath\n"
"         device with special device file <filename>/dev/dm-9</filename>.\n"
"    -->\n"
"    <property access=\"read\" type=\"ay\" name=\"PreferredDevice\"/>\n"
"    <!-- Symlinks:\n"
"\n"
"         Known symlinks in <filename>/dev</filename> that points to\n"
"         the device file in the\n"
"         #org.freedesktop.UDisks2.Block:Device property.\n"
"\n"
"         For example, this array could include symlinks such as\n"
"         <filename>/dev/disk/by-id/ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</filename>\n"
"         and\n"
"         <filename>/dev/disk/by-id/wwn-0x5001517387d61905</filename>.\n"
"    -->\n"
"    <property access=\"read\" type=\"aay\" name=\"Symlinks\">\n"
"      <annotation value=\"QStringList\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <!-- DeviceNumber: The dev_t of the block device. -->\n"
"    <property access=\"read\" type=\"t\" name=\"DeviceNumber\"/>\n"
"    <!-- Id:\n"
"         @since: 2.1\n"
"         A unique and persistent identifier for the device or blank if\n"
"         no such identifier is available.\n"
"\n"
"         For devices with fixed media, this identifier is derived from\n"
"         vital product data / UUIDs / serial numbers of the drive or\n"
"         construct (e.g. LVM or MD-RAID) the block device is part\n"
"         of. For devices with removable media, this identifier is\n"
"         derived from the medium currently inserted.\n"
"\n"
"         This identifier is guaranteed to not include the slash\n"
"         character '/' (U+002F SOLIDUS) which means it can be used as\n"
"         a filename.\n"
"\n"
"         Examples:\n"
"         <quote>by-id-ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</quote>,\n"
"         <quote>by-id-ata-ST1000LM024_HN-M101MBB_S2TBJA0C230233-part3</quote>,\n"
"         <quote>by-id-usb-Kingston_DataTraveler_2.0_0013729940C4F9A166250D3E-0:0</quote>,\n"
"         <quote>by-id-dm-name-luks-6d81fe85-26b1-4f8b-b834-405454c1cd46</quote>,\n"
"         <quote>by-id-dm-name-vg_thinkpad-lv_swap</quote>,\n"
"         <quote>by-label-HARRY_POTTER_SORCERERS_STONE-</quote>,\n"
"         <quote>by-uuid-D22D-08B8</quote>.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Id\"/>\n"
"    <!-- Size: The size of the block device. -->\n"
"    <property access=\"read\" type=\"t\" name=\"Size\"/>\n"
"    <!-- ReadOnly: If %TRUE, the device can not be written to, only read from. -->\n"
"    <property access=\"read\" type=\"b\" name=\"ReadOnly\"/>\n"
"    <!-- Drive:\n"
"         The #org.freedesktop.UDisks2.Drive object that the block device\n"
"         belongs to, or '/' if no such object exists.\n"
"      -->\n"
"    <property access=\"read\" type=\"o\" name=\"Drive\"/>\n"
"    <!-- MDRaid:\n"
"         @since: 2.1\n"
"         If the block device is a running MD-RAID array, this is set\n"
"         to the #org.freedesktop.UDisks2.MDRaid object that it\n"
"         correspond to. Is '/' if no such object exists.\n"
"      -->\n"
"    <property access=\"read\" type=\"o\" name=\"MDRaid\"/>\n"
"    <!-- MDRaidMember:\n"
"         @since: 2.1\n"
"         If the block device is a member of a MD-RAID array, this\n"
"         is set to the #org.freedesktop.UDisks2.MDRaid object that it\n"
"         correspond to. Is '/' if no such object exists.\n"
"      -->\n"
"    <property access=\"read\" type=\"o\" name=\"MDRaidMember\"/>\n"
"    <!-- IdUsage:\n"
"         A result of probing for signatures on the block device. Known values include:\n"
"         <variablelist>\n"
"         <varlistentry>\n"
"           <term>filesystem</term>\n"
"           <listitem><para>Used for mountable filesystems</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>crypto</term>\n"
"           <listitem><para>Used for e.g. LUKS devices</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>raid</term>\n"
"           <listitem><para>Used for e.g. RAID members and LVM PVs</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>other</term>\n"
"           <listitem><para>Something else was detected.</para></listitem>\n"
"         </varlistentry>\n"
"         </variablelist>\n"
"         If blank, no known signature was detected. This doesn't\n"
"         necessarily mean the device contains no structured data; it\n"
"         only means that no signature known to the probing code was\n"
"         detected.\n"
"\n"
"         Applications should not rely on the value in this or the\n"
"         #org.freedesktop.UDisks2.Block:IdType property - instead,\n"
"         applications should check for whether the object in question\n"
"         implements interfaces such as\n"
"         e.g. #org.freedesktop.UDisks2.Filesystem,\n"
"         #org.freedesktop.UDisks2.Swapspace or\n"
"         #org.freedesktop.UDisks2.Encrypted.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"IdUsage\"/>\n"
"    <!--\n"
"        IdType:\n"
"        This property contains more information about the result of\n"
"        probing the block device. Its value depends of the value the\n"
"        #org.freedesktop.UDisks2.Block:IdUsage property:\n"
"        <variablelist>\n"
"        <varlistentry><term>filesystem</term>\n"
"          <listitem><para>The mountable file system that was detected (e.g. <literal>vfat</literal>).</para></listitem>\n"
"        </varlistentry>\n"
"        <varlistentry><term>crypto</term>\n"
"          <listitem><para>Encrypted data. Known values include <literal>crypto_LUKS</literal>.</para></listitem>\n"
"        </varlistentry>\n"
"        <varlistentry><term>raid</term>\n"
"          <listitem><para><ulink url=\"http://en.wikipedia.org/wiki/RAID\">RAID</ulink> or similar. Known values include <literal>LVM2_member</literal> (for LVM2 components), <literal>linux_raid_member</literal> (for MD-RAID components.)</para></listitem>\n"
"        </varlistentry>\n"
"        <varlistentry><term>other</term>\n"
"          <listitem><para>Something else. Known values include <literal>swap</literal> (for swap space), <literal>suspend</literal> (data used when resuming from suspend-to-disk.</para></listitem>\n"
"        </varlistentry>\n"
"        </variablelist>\n"
"        See the note for the #org.freedesktop.UDisks2.Block:IdUsage property about usage.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"IdType\"/>\n"
"    <!-- IdVersion:\n"
"         The version of the filesystem or other structured data on the block device.\n"
"         Do not make any assumptions about the format.\n"
"\n"
"         This property is blank if there is no version or the version is unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"IdVersion\"/>\n"
"    <!-- IdLabel:\n"
"         The label of the filesystem or other structured data on the block device.\n"
"\n"
"         This property is blank if there is no label or the label is unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"IdLabel\"/>\n"
"    <!-- IdUUID:\n"
"         The <ulink url=\"http://en.wikipedia.org/wiki/UUID\">UUID</ulink> of the\n"
"         filesystem or other structured data on the block device. Do not make\n"
"         any assumptions about the UUID as its format depends on what kind of\n"
"         data is on the device.\n"
"\n"
"         This property is blank if there is no UUID or the UUID is unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"IdUUID\"/>\n"
"    <!-- Configuration:\n"
"         The configuration for the device.\n"
"\n"
"         This is an array of pairs of (@type, @details) where @type is\n"
"         a string identifying the configuration source\n"
"         (e.g. <literal>fstab</literal>) and @details contains the\n"
"         actual configuration data.\n"
"\n"
"         Use the\n"
"         org.freedesktop.UDisks2.Block.AddConfigurationItem(),\n"
"         org.freedesktop.UDisks2.Block.RemoveConfigurationItem()\n"
"         and\n"
"         org.freedesktop.UDisks2.Block.UpdateConfigurationItem()\n"
"         methods to add, remove and update configuration items.\n"
"\n"
"         Use\n"
"         org.freedesktop.UDisks2.Block.GetSecretConfiguration()\n"
"         to get the secrets (e.g. passphrases) that may be part of the\n"
"         configuration but isn't exported in this property for\n"
"         security reasons.\n"
"\n"
"         For entries of type <literal>fstab</literal>, it means that\n"
"         the block device is referenced in the system-wide\n"
"         <filename>/etc/fstab</filename> file. Known configuration\n"
"         items for type <literal>fstab</literal> are\n"
"         <variablelist>\n"
"         <varlistentry>\n"
"           <term>fsname (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>The special device</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>dir (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>The mount point</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>type (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>The filesystem type</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>opts (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>Options</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>freq (type <literal>'i'</literal>)</term>\n"
"           <listitem><para>Dump frequency in days</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>passno (type <literal>'i'</literal>)</term>\n"
"           <listitem><para>Pass number of parallel fsck</para></listitem>\n"
"         </varlistentry>\n"
"         </variablelist>\n"
"\n"
"         For entries of type <literal>crypttab</literal>, it means that\n"
"         the block device is referenced in the system-wide\n"
"         <filename>/etc/crypttab</filename> file. Known configuration\n"
"         items for type <literal>crypttab</literal> are\n"
"         <variablelist>\n"
"         <varlistentry>\n"
"           <term>name (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>The name to set the device up as</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>device (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>The special device</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>passphrase-path (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>Either empty to specify that no password is set,\n"
"           otherwise a path to a file containing the encryption password.\n"
"           This may also point to a special device file in <filename>/dev</filename>\n"
"           such as <literal>/dev/random</literal>.\n"
"           </para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>passphrase-contents (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>The contents of the file containing the encryption password, if applicable.\n"
"           This is only available via the org.freedesktop.UDisks2.Block.GetSecretConfiguration()\n"
"           method.</para></listitem>\n"
"         </varlistentry>\n"
"         <varlistentry>\n"
"           <term>opts (type <literal>'ay'</literal>)</term>\n"
"           <listitem><para>Options</para></listitem>\n"
"         </varlistentry>\n"
"         </variablelist>\n"
"         For security reasons, when creating a new\n"
"         <literal>crypttab</literal> entry (via the\n"
"         org.freedesktop.UDisks2.Block.AddConfigurationItem()\n"
"         method), then the <option>passphrase-path</option> must\n"
"         reference an unexisting file in the\n"
"         <filename>/etc/luks-keys</filename> directory.\n"
"    -->\n"
"    <property access=\"read\" type=\"a(sa{sv})\" name=\"Configuration\">\n"
"      <annotation value=\"ConfigurationList\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <!-- CryptoBackingDevice:\n"
"         The #org.freedesktop.UDisks2.Block object that is\n"
"         backing the device or <literal>/</literal> if unknown or if\n"
"         the block device is not the cleartext device for an encrypted\n"
"         device.\n"
"    -->\n"
"    <property access=\"read\" type=\"o\" name=\"CryptoBackingDevice\"/>\n"
"    <!-- HintPartitionable:\n"
"         If %TRUE, the device is normally expected to be\n"
"         partitionable. Devices for which this is not the case include\n"
"         floppy drives, optical drives and LVM logical volumes.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"HintPartitionable\"/>\n"
"    <!-- HintSystem: If %TRUE, the device is considered a <emphasis>system device</emphasis>.\n"
"         System devices are devices that require additional permissions to access.\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"HintSystem\"/>\n"
"    <!-- HintIgnore: If %TRUE, the device should be hidden from users.\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"HintIgnore\"/>\n"
"    <!-- HintAuto: If %TRUE, the device should be automatically started (e.g. mounted, unlocked etc.).\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"HintAuto\"/>\n"
"    <!-- HintName: If not blank, the name to use when presenting the device.\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"HintName\"/>\n"
"    <!-- HintIconName: If not blank, the icon name to use when presenting the device.\n"
"         The name must adhere to the\n"
"         <ulink url=\"http://www.freedesktop.org/wiki/Specifications/icon-theme-spec\">freedesktop.org icon theme specification</ulink>.\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"HintIconName\"/>\n"
"    <!-- HintSymbolicIconName:\n"
"         @since: 2.1\n"
"         If not blank, the icon name to use when presenting the device using a symbolic icon.\n"
"\n"
"         The name must adhere to the\n"
"         <ulink url=\"http://www.freedesktop.org/wiki/Specifications/icon-theme-spec\">freedesktop.org icon theme specification</ulink>.\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"HintSymbolicIconName\"/>\n"
"    <!--\n"
"        AddConfigurationItem:\n"
"        @item: The configuration item to add.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Adds a new configuration item.\n"
"\n"
"        See the #org.freedesktop.UDisks2.Block:Configuration\n"
"        property for details about valid configuration items.\n"
"    -->\n"
"    <method name=\"AddConfigurationItem\">\n"
"      <arg direction=\"in\" type=\"(sa{sv})\" name=\"item\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"Configuration\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        RemoveConfigurationItem:\n"
"        @item: The configuration item to remove.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Removes an existing configuration item.\n"
"\n"
"        See the #org.freedesktop.UDisks2.Block:Configuration\n"
"        property for details about valid configuration items.\n"
"    -->\n"
"    <method name=\"RemoveConfigurationItem\">\n"
"      <arg direction=\"in\" type=\"(sa{sv})\" name=\"item\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"Configuration\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        UpdateConfigurationItem:\n"
"        @old_item: The configuration item to remove.\n"
"        @new_item: The configuration item to add. Must be of the same type as @old_item.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Removes a configuration item and adds a new one. This is\n"
"        equivalent to calling\n"
"        org.freedesktop.UDisks2.Block.RemoveConfigurationItem()\n"
"        followed by\n"
"        org.freedesktop.UDisks2.Block.AddConfigurationItem()\n"
"        with the change that only one PolicyKit check is made\n"
"        and that @new_item can be validated against @old_item.\n"
"\n"
"        See the #org.freedesktop.UDisks2.Block:Configuration\n"
"        property for details about valid configuration items.\n"
"    -->\n"
"    <method name=\"UpdateConfigurationItem\">\n"
"      <arg direction=\"in\" type=\"(sa{sv})\" name=\"old_item\"/>\n"
"      <arg direction=\"in\" type=\"(sa{sv})\" name=\"new_item\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"Configuration\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"      <annotation value=\"Configuration\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In2\"/>\n"
"    </method>\n"
"    <!--\n"
"        GetSecretConfiguration:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @configuration: The resulting configuration.\n"
"\n"
"        Returns the same value as in the\n"
"        #org.freedesktop.UDisks2.Block:Configuration property\n"
"        but without secret information filtered out.\n"
"    -->\n"
"    <method name=\"GetSecretConfiguration\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"a(sa{sv})\" name=\"configuration\"/>\n"
"      <annotation value=\"ConfigurationList\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        Format:\n"
"        @type: The type of file system, partition table or other content to format the device with.\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>label</parameter> (of type 's'), <parameter>take-ownership</parameter> (of type 'b'), <parameter>encrypt.passphrase</parameter> (of type 's'), <parameter>erase</parameter> (of type 's'), <parameter>no-block</parameter> (of type 'b') and <parameter>update-partition-type</parameter> (of type 'b').\n"
"\n"
"        Formats the device with a file system, partition table or\n"
"        other well-known content.\n"
"\n"
"        Known values for @type includes <constant>empty</constant> (to\n"
"        just zero out areas of the device known to host file system\n"
"        signatures) and <constant>swap</constant> (Linux swap space)\n"
"        and most file systems supported by the <citerefentry><refentrytitle>mkfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>\n"
"        program through its <option>-t</option> option.\n"
"\n"
"        Known partition table formats includes\n"
"        <constant>dos</constant> and <constant>gpt</constant>.\n"
"\n"
"        If @type supports it, you can specify a label with the\n"
"        <parameter>label</parameter> option in the @options parameter;\n"
"        however, note that this may not be supported on all file\n"
"        systems and, if supported, the maximum allowed length may\n"
"        vary.\n"
"\n"
"        If the file system in question supports owners and the option\n"
"        <parameter>take-ownership</parameter> is set to %TRUE then the\n"
"        root directory of the created file system will be owned by the\n"
"        caller of this method.\n"
"\n"
"        If the option <parameter>encrypt.passphrase</parameter> is\n"
"        given then a LUKS device is created with the given passphrase\n"
"        and the file system is created on the unlocked device. The\n"
"        unlocked device will be left open.\n"
"\n"
"        If the option <parameter>erase</parameter> is used then the\n"
"        underlying device will be erased. Valid values include\n"
"        <quote>zero</quote> to write zeroes over the entire device\n"
"        before formatting, <quote>ata-secure-erase</quote> to perform\n"
"        a secure erase or <quote>ata-secure-erase-enhanced</quote> to\n"
"        perform an enhanced secure erase.\n"
"\n"
"        If the option <parameter>update-partition-type</parameter> is\n"
"        set to %TRUE and the object in question is a partition, then\n"
"        its type (cf. the #org.freedesktop.UDisks2.Partition:Type\n"
"        property) will be set to the <emphasis>natural</emphasis>\n"
"        partition type matching @type, if any. For example, if\n"
"        formatting a GPT partition with a FAT filesystem, the\n"
"        <quote>Microsoft Basic Data</quote> partition type will be\n"
"        chosen; similar, if formatting a DOS partition with a Ext4\n"
"        filesystem then partition type 0x83 is chosen.\n"
"\n"
"        If the option <parameter>no-block</parameter> is set to %TRUE\n"
"        then the method returns just before the actual formatting\n"
"        takes place but after authorization and other checks are\n"
"        done. This is useful for applications that want to format\n"
"        several devices in parallel.\n"
"    -->\n"
"    <method name=\"Format\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"type\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        OpenForBackup:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @fd: An index for the returned file descriptor.\n"
"\n"
"        Gets a read-only file descriptor for the device intended for a\n"
"        byte-by-byte imaging of the device. This can only be done if\n"
"        the device is not already in use.\n"
"    -->\n"
"    <method name=\"OpenForBackup\">\n"
"      <annotation value=\"1\" name=\"org.gtk.GDBus.C.UnixFD\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"h\" name=\"fd\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        OpenForRestore:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @fd: An index for the returned file descriptor.\n"
"\n"
"        Gets a writable file descriptor for the device intended for a\n"
"        byte-by-byte restore of a disk image onto the device. This can\n"
"        only be done if the device is not already in use.\n"
"    -->\n"
"    <method name=\"OpenForRestore\">\n"
"      <annotation value=\"1\" name=\"org.gtk.GDBus.C.UnixFD\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"h\" name=\"fd\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        OpenForBenchmark:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @fd: An index for the returned file descriptor.\n"
"\n"
"        Gets a file descriptor for the device that is suitable to be\n"
"        used for benchmarking the device (transfer rate, access time\n"
"        etc.). Note that the file descriptor may be opened with the\n"
"        <literal>O_DIRECT</literal> and <literal>O_SYNC</literal>\n"
"        flags so care must be taken to only perform page-aligned I/O.\n"
"\n"
"        If the <parameter>writable</parameter> in @options is %TRUE\n"
"        then the returned file descriptor will be writable. This only\n"
"        works if the device is not already in use.\n"
"    -->\n"
"    <method name=\"OpenForBenchmark\">\n"
"      <annotation value=\"1\" name=\"org.gtk.GDBus.C.UnixFD\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"h\" name=\"fd\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        Rescan:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Request that the kernel and core OS rescans the contents of\n"
"        the device and update their state to reflect this (including\n"
"        things such as the <filename>/dev/disk/</filename> hierarchy\n"
"        of symlinks). This includes requesting that the kernel\n"
"        re-reads the partition table, if appropriate.\n"
"\n"
"        This is usually not needed since the OS automatically does\n"
"        this when the last process with a writable file descriptor for\n"
"        the device closes it.\n"
"    -->\n"
"    <method name=\"Rescan\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    BlockAdaptor(QObject *parent);
    virtual ~BlockAdaptor();

public: // PROPERTIES
    Q_PROPERTY(ConfigurationList Configuration READ configuration)
    ConfigurationList configuration() const;

    Q_PROPERTY(QDBusObjectPath CryptoBackingDevice READ cryptoBackingDevice)
    QDBusObjectPath cryptoBackingDevice() const;

    Q_PROPERTY(QByteArray Device READ device)
    QByteArray device() const;

    Q_PROPERTY(qulonglong DeviceNumber READ deviceNumber)
    qulonglong deviceNumber() const;

    Q_PROPERTY(QDBusObjectPath Drive READ drive)
    QDBusObjectPath drive() const;

    Q_PROPERTY(bool HintAuto READ hintAuto)
    bool hintAuto() const;

    Q_PROPERTY(QString HintIconName READ hintIconName)
    QString hintIconName() const;

    Q_PROPERTY(bool HintIgnore READ hintIgnore)
    bool hintIgnore() const;

    Q_PROPERTY(QString HintName READ hintName)
    QString hintName() const;

    Q_PROPERTY(bool HintPartitionable READ hintPartitionable)
    bool hintPartitionable() const;

    Q_PROPERTY(QString HintSymbolicIconName READ hintSymbolicIconName)
    QString hintSymbolicIconName() const;

    Q_PROPERTY(bool HintSystem READ hintSystem)
    bool hintSystem() const;

    Q_PROPERTY(QString Id READ id)
    QString id() const;

    Q_PROPERTY(QString IdLabel READ idLabel)
    QString idLabel() const;

    Q_PROPERTY(QString IdType READ idType)
    QString idType() const;

    Q_PROPERTY(QString IdUUID READ idUUID)
    QString idUUID() const;

    Q_PROPERTY(QString IdUsage READ idUsage)
    QString idUsage() const;

    Q_PROPERTY(QString IdVersion READ idVersion)
    QString idVersion() const;

    Q_PROPERTY(QDBusObjectPath MDRaid READ mDRaid)
    QDBusObjectPath mDRaid() const;

    Q_PROPERTY(QDBusObjectPath MDRaidMember READ mDRaidMember)
    QDBusObjectPath mDRaidMember() const;

    Q_PROPERTY(QByteArray PreferredDevice READ preferredDevice)
    QByteArray preferredDevice() const;

    Q_PROPERTY(bool ReadOnly READ readOnly)
    bool readOnly() const;

    Q_PROPERTY(qulonglong Size READ size)
    qulonglong size() const;

    Q_PROPERTY(QByteArrayList Symlinks READ symlinks)
    QByteArrayList symlinks() const;

public Q_SLOTS: // METHODS
    void AddConfigurationItem(Configuration item, const QVariantMap &options);
    void Format(const QString &type, const QVariantMap &options);
    ConfigurationList GetSecretConfiguration(const QVariantMap &options);
    QDBusUnixFileDescriptor OpenForBackup(const QVariantMap &options);
    QDBusUnixFileDescriptor OpenForBenchmark(const QVariantMap &options);
    QDBusUnixFileDescriptor OpenForRestore(const QVariantMap &options);
    void RemoveConfigurationItem(Configuration item, const QVariantMap &options);
    void Rescan(const QVariantMap &options);
    void UpdateConfigurationItem(Configuration old_item, Configuration new_item, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Drive
 */
class DriveAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Drive")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Drive\">\n"
"    <!-- Vendor: A name for the vendor of the drive or blank if unknown. -->\n"
"    <property access=\"read\" type=\"s\" name=\"Vendor\"/>\n"
"    <!-- Model: A name for the model of the drive or blank if unknown. -->\n"
"    <property access=\"read\" type=\"s\" name=\"Model\"/>\n"
"    <!-- Revision: Firmware Revision or blank if unknown. -->\n"
"    <property access=\"read\" type=\"s\" name=\"Revision\"/>\n"
"    <!-- Serial: Serial number of the drive or blank if unknown. -->\n"
"    <property access=\"read\" type=\"s\" name=\"Serial\"/>\n"
"    <!-- WWN:\n"
"\n"
"         The <ulink\n"
"         url=\"http://en.wikipedia.org/wiki/World_Wide_Name\">World Wide\n"
"         Name</ulink> of the drive or blank if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"WWN\"/>\n"
"    <!-- Id:\n"
"         A unique and persistent identifier for the device or blank if\n"
"         no such identifier is available.\n"
"\n"
"         This identifier is guaranteed to not include the slash\n"
"         character '/' (U+002F SOLIDUS) which means it can be used as\n"
"         a filename.\n"
"\n"
"         Examples:\n"
"         <quote>ST32000542AS-6XW00W51</quote>,\n"
"         <quote>HITACHI-HTS723232A7A364-E3834563KRG2HN</quote>,\n"
"         <quote>INTEL-SSDSA2MH080G1GC-CVEM842101HD080DGN</quote>.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Id\"/>\n"
"    <!-- Configuration:\n"
"         A set of configuration directives that are applied to the\n"
"         drive when it is connected (e.g. at start-up, hotplug or\n"
"         resume).\n"
"\n"
"         This is an dict of items with the following known keys:\n"
"         <variablelist>\n"
"           <varlistentry>\n"
"             <term>ata-pm-standby (type <literal>'i'</literal>)</term>\n"
"             <listitem><para>\n"
"               The spindown timeout for ATA drives (See ATA command <quote>STANDBY</quote>).\n"
"             </para></listitem>\n"
"           </varlistentry>\n"
"           <varlistentry>\n"
"             <term>ata-apm-level (type <literal>'i'</literal>)</term>\n"
"             <listitem><para>\n"
"               The APM level for ATA drives (See ATA command <quote>SET FEATURES</quote>, sub-commands 0x05 and 0x85).\n"
"             </para></listitem>\n"
"           </varlistentry>\n"
"           <varlistentry>\n"
"             <term>ata-aam-level (type <literal>'i'</literal>)</term>\n"
"             <listitem><para>\n"
"               The AAM level for ATA drives (See ATA command <quote>SET FEATURES</quote>, sub-commands 0x42 and 0xc2).\n"
"             </para></listitem>\n"
"           </varlistentry>\n"
"           <varlistentry>\n"
"             <term>ata-write-cache-enabled (type <literal>'b'</literal>)</term>\n"
"             <listitem><para>\n"
"               Whether the write-cache is enabled (See ATA command <quote>SET FEATURES</quote>, sub-commands 0x82 and 0x02). Since 2.1.\n"
"             </para></listitem>\n"
"           </varlistentry>\n"
"           <varlistentry>\n"
"             <term>ata-read-lookahead-enabled (type <literal>'b'</literal>)</term>\n"
"             <listitem><para>\n"
"               Whether the read look-ahead is enabled (See ATA command <quote>SET FEATURES</quote>, sub-commands 0x55 and 0xaa). Since 2.1.7.\n"
"             </para></listitem>\n"
"           </varlistentry>\n"
"         </variablelist>\n"
"         The contents of this property is read from the configuration\n"
"         file <filename>/etc/udisks2/IDENTIFIER.conf</filename>\n"
"         where <emphasis>IDENTIFIER</emphasis> is the value of the\n"
"         #org.freedesktop.UDisks2.Drive:Id property. See <xref\n"
"         linkend=\"udisks.8\"/> for the file format of this file.\n"
"\n"
"         Use the org.freedesktop.UDisks2.Drive.SetConfiguration()\n"
"         method to change the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"a{sv}\" name=\"Configuration\">\n"
"      <annotation value=\"Configuration\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <!-- Media: The kind of media currently in the drive or blank if unknown.\n"
"         See the #org.freedesktop.UDisks2.Drive:MediaCompatibility property for known values.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Media\"/>\n"
"    <!-- MediaCompatibility:\n"
"      The physical kind of media the drive uses or the type of the drive or blank if unknown.\n"
"      Known values include\n"
"      <variablelist>\n"
"      <varlistentry><term>thumb</term><listitem><para>The device is a thumb-drive with non-removable media (e.g. a USB stick)</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash</term><listitem><para>Flash Card</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_cf</term><listitem><para>CompactFlash</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_ms</term><listitem><para>MemoryStick</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_sm</term><listitem><para>SmartMedia</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_sd</term><listitem><para>Secure Digital</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_sdhc</term><listitem><para>Secure Digital High Capacity</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_sdxc</term><listitem><para>Secure Digital eXtended Capacity</para></listitem></varlistentry>\n"
"      <varlistentry><term>flash_mmc</term><listitem><para>MultiMediaCard</para></listitem></varlistentry>\n"
"      <varlistentry><term>floppy</term><listitem><para>Floppy Disk</para></listitem></varlistentry>\n"
"      <varlistentry><term>floppy_zip</term><listitem><para>Zip Disk</para></listitem></varlistentry>\n"
"      <varlistentry><term>floppy_jaz</term><listitem><para>Jaz Disk</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical</term><listitem><para>Optical Disc</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_cd</term><listitem><para>Compact Disc</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_cd_r</term><listitem><para>Compact Disc Recordable</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_cd_rw</term><listitem><para>Compact Disc Rewritable</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd</term><listitem><para>Digital Versatile Disc</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_r</term><listitem><para>DVD-R</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_rw</term><listitem><para>DVD-RW</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_ram</term><listitem><para>DVD-RAM</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_plus_r</term><listitem><para>DVD+R</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_plus_rw</term><listitem><para>DVD+RW</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_plus_r_dl</term><listitem><para>DVD+R Dual Layer</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_dvd_plus_rw_dl</term><listitem><para>DVD+RW Dual Layer</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_bd</term><listitem><para>Blu-ray Disc</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_bd_r</term><listitem><para>Blu-ray Recordable</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_bd_re</term><listitem><para>Blu-ray Rewritable</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_hddvd</term><listitem><para>HD-DVD</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_hddvd_r</term><listitem><para>HD-DVD Recordable</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_hddvd_rw</term><listitem><para>HD-DVD Rewritable</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_mo</term><listitem><para>Magneto Optical</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_mrw</term><listitem><para>Can read Mount Rainer media</para></listitem></varlistentry>\n"
"      <varlistentry><term>optical_mrw_w</term><listitem><para>Can write Mount Rainer media</para></listitem></varlistentry>\n"
"      </variablelist>\n"
"    -->\n"
"    <property access=\"read\" type=\"as\" name=\"MediaCompatibility\"/>\n"
"    <!-- MediaRemovable:\n"
"         Whether the media can be removed from the drive.\n"
"\n"
"         Note that this may be overridden from what the hardware\n"
"         reports - for example, USB thumb drives often report that\n"
"         they are using removable media while in fact the media\n"
"         is not removable.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"MediaRemovable\"/>\n"
"    <!-- MediaAvailable: Set to %FALSE if no medium is available.\n"
"         This is always %TRUE if #org.freedesktop.UDisks2.Drive:MediaChangeDetected is %FALSE.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"MediaAvailable\"/>\n"
"    <!-- MediaChangeDetected: Set to %TRUE only if media changes are detected.\n"
"         Media changes are detected on all modern disk drives through\n"
"         either polling or an asynchronous notification mechanism. The\n"
"         only known disk drives that cannot report media changes are\n"
"         PC floppy drives.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"MediaChangeDetected\"/>\n"
"    <!-- Size: The size of the drive (or the media currently in the drive).\n"
"         This is always 0 if #org.freedesktop.UDisks2.Drive:MediaChangeDetected is %FALSE.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"Size\"/>\n"
"    <!-- TimeDetected: The time the drive was first detected.\n"
"         This is expressed in micro-seconds since the Epoch Jan 1, 1970 0:00 UTC.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"TimeDetected\"/>\n"
"    <!-- TimeMediaDetected: The earliest time media was last detected or 0 if media is not available.\n"
"         This is expressed in micro-seconds since the Epoch Jan 1, 1970 0:00 UTC.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"TimeMediaDetected\"/>\n"
"    <!-- Optical: %TRUE if the drive contains an optical disc. -->\n"
"    <property access=\"read\" type=\"b\" name=\"Optical\"/>\n"
"    <!-- OpticalBlank: %TRUE if the disc is blank.\n"
"         This is only valid if the property #org.freedesktop.UDisks2.Drive:Optical is %TRUE.\n"
"      -->\n"
"    <property access=\"read\" type=\"b\" name=\"OpticalBlank\"/>\n"
"    <!-- OpticalNumTracks: The number of tracks.\n"
"         This is only valid if the property #org.freedesktop.UDisks2.Drive:Optical is %TRUE.\n"
"      -->\n"
"    <property access=\"read\" type=\"u\" name=\"OpticalNumTracks\"/>\n"
"    <!-- OpticalNumAudioTracks: The number of audio tracks.\n"
"         This is only valid if the property #org.freedesktop.UDisks2.Drive:Optical is %TRUE.\n"
"      -->\n"
"    <property access=\"read\" type=\"u\" name=\"OpticalNumAudioTracks\"/>\n"
"    <!-- OpticalNumDataTracks: The number of data tracks.\n"
"         This is only valid if the property #org.freedesktop.UDisks2.Drive:Optical is %TRUE.\n"
"      -->\n"
"    <property access=\"read\" type=\"u\" name=\"OpticalNumDataTracks\"/>\n"
"    <!-- OpticalNumSessions: The number of sessions.\n"
"         This is only valid if the property #org.freedesktop.UDisks2.Drive:Optical is %TRUE.\n"
"     -->\n"
"    <property access=\"read\" type=\"u\" name=\"OpticalNumSessions\"/>\n"
"    <!-- RotationRate: The rotational rate of the drive.\n"
"      <itemizedlist>\n"
"        <listitem><para>-1 if known to be rotating media but rotation rate isn't known</para></listitem>\n"
"        <listitem><para>0 if known to be non-rotating media</para></listitem>\n"
"        <listitem><para>the rotation rate in rounds per minute otherwise</para></listitem>\n"
"      </itemizedlist>\n"
"    -->\n"
"    <property access=\"read\" type=\"i\" name=\"RotationRate\"/>\n"
"    <!-- ConnectionBus:\n"
"      The physical connection bus used for the drive as seen by the\n"
"      user. This is typically used to draw a USB or Firewire emblem\n"
"      on top of an icon in an user interface.\n"
"\n"
"      Note that this property has <emphasis>nothing</emphasis> to do\n"
"      with the low-level command-set used (such as ATA-8) or what\n"
"      low-level connection bus (such as SATA, eSATA, PATA, SAS2 etc)\n"
"      is used.\n"
"\n"
"      Known values include:\n"
"      <variablelist>\n"
"      <varlistentry><term>usb</term><listitem><para>Connected via <ulink url=\"http://en.wikipedia.org/wiki/USB\">USB</ulink></para></listitem></varlistentry>\n"
"      <varlistentry><term>sdio</term><listitem><para>Connected via <ulink url=\"http://en.wikipedia.org/wiki/Secure_Digital#SDIO\">SDIO</ulink></para></listitem></varlistentry>\n"
"      <varlistentry><term>ieee1394</term><listitem><para>Connected via <ulink url=\"http://en.wikipedia.org/wiki/Firewire\">Firewire</ulink></para></listitem></varlistentry>\n"
"      </variablelist>\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"ConnectionBus\"/>\n"
"    <!-- Seat:\n"
"         A string identifying what seat the drive is plugged into, if any.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Seat\"/>\n"
"    <!--\n"
"        Removable:\n"
"        A hint whether the drive and/or its media is considered\n"
"        <emphasis>removable</emphasis> by the user.\n"
"\n"
"        This includes drives with removable media (cf. the\n"
"        #org.freedesktop.UDisks2.Drive:MediaRemovable property), Flash\n"
"        media such as SD cards and drives on hotpluggable buses such\n"
"        as USB or Firewire (cf. the\n"
"        #org.freedesktop.UDisks2.Drive:ConnectionBus property).\n"
"\n"
"        Note that this is only a <emphasis>guess</emphasis>.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"Removable\"/>\n"
"    <!-- Ejectable:\n"
"         Whether the media can be ejected from the drive or the drive\n"
"         accepts an eject command to switch its state so it displays\n"
"         e.g. a \"Safe To Remove\" message to the user.\n"
"\n"
"         Note that this is only a <emphasis>guess</emphasis>.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"Ejectable\"/>\n"
"    <!-- SortKey:\n"
"         A string that can be used for sorting drive objects.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"SortKey\"/>\n"
"    <!--\n"
"        Eject:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Ejects media from the drive. This is only meaningful to do on\n"
"        drives with removable media.\n"
"\n"
"        There are not a lot of guarantees associated with this method\n"
"        so it should only be called in response to an user action.\n"
"\n"
"        On some hardware the media may be physically ejected while on\n"
"        other hardware may simply eject the disc. On some hardware it\n"
"        may not do anything physical but it may cause e.g. a display\n"
"        on the hardware to show e.g. <quote>It is now safe to remove\n"
"        the device</quote>.\n"
"    -->\n"
"<property name=\"bsdisks_IsHotpluggable\" type=\"b\" access=\"read\"/>"
"<property name=\"bsdisks_ConnectionBus\" type=\"s\" access=\"read\"/>"
"<property name=\"bsdisks_AtaSata\" type=\"s\" access=\"read\"/>"
"    <method name=\"Eject\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        SetConfiguration:\n"
"        @value: The configuration value to set.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Sets the configuration for the drive. This will store the\n"
"        configuration in the file-system and also apply it to the\n"
"        drive.\n"
"\n"
"        See the #org.freedesktop.UDisks2.Drive:Configuration property\n"
"        for details about valid values and the location of the\n"
"        configuration file that @value will be written to.\n"
"    -->\n"
"    <method name=\"SetConfiguration\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"value\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        PowerOff:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @since: 2.1\n"
"\n"
"        Arranges for the drive to be safely removed and powered\n"
"        off. On the OS side this includes ensuring that no process is\n"
"        using the drive, then requesting that in-flight buffers and\n"
"        caches are committed to stable storage. The exact steps for\n"
"        powering off the drive depends on the drive itself and the\n"
"        interconnect used. For drives connected through USB, the\n"
"        effect is that the USB device will be deconfigured followed by\n"
"        disabling the upstream hub port it is connected to.\n"
"\n"
"        Note that as some physical devices contain multiple drives\n"
"        (for example 4-in-1 flash card reader USB devices) powering\n"
"        off one drive may affect other drives. Applications can\n"
"        examine the #org.freedesktop.UDisks2.Drive:SiblingId property\n"
"        to determine such relationships.\n"
"\n"
"        There are not a lot of guarantees associated with this method\n"
"        so it should only be called in response to an user\n"
"        action. Usually the effect is that the drive disappears as if\n"
"        it was unplugged.\n"
"\n"
"        This method only works if the\n"
"        #org.freedesktop.UDisks2.Drive:CanPowerOff property\n"
"        is set to %TRUE.\n"
"    -->\n"
"    <method name=\"PowerOff\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!-- CanPowerOff:\n"
"         @since: 2.1\n"
"         Whether the drive can be safely removed / powered off. See\n"
"         the org.freedesktop.UDisks2.Drive.PowerOff() method for more\n"
"         information.\n"
"\n"
"         See <xref linkend=\"udisks.8\"/> for how to influence the value of this property.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"CanPowerOff\"/>\n"
"    <!-- SiblingId:\n"
"         @since: 2.1\n"
"         An opaque token that, if non-blank, is used to group drives\n"
"         that are part of the same physical device.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"SiblingId\"/>\n"
"  </interface>\n"
        "")
public:
    DriveAdaptor(QObject *parent);
    virtual ~DriveAdaptor();

public: // PROPERTIES
    Q_PROPERTY(bool CanPowerOff READ canPowerOff)
    bool canPowerOff() const;

    Q_PROPERTY(QVariantMap Configuration READ configuration)
    QVariantMap configuration() const;

    Q_PROPERTY(QString ConnectionBus READ connectionBus)
    QString connectionBus() const;

    Q_PROPERTY(bool Ejectable READ ejectable)
    bool ejectable() const;

    Q_PROPERTY(QString Id READ id)
    QString id() const;

    Q_PROPERTY(QString Media READ media)
    QString media() const;

    Q_PROPERTY(bool MediaAvailable READ mediaAvailable)
    bool mediaAvailable() const;

    Q_PROPERTY(bool MediaChangeDetected READ mediaChangeDetected)
    bool mediaChangeDetected() const;

    Q_PROPERTY(QStringList MediaCompatibility READ mediaCompatibility)
    QStringList mediaCompatibility() const;

    Q_PROPERTY(bool MediaRemovable READ mediaRemovable)
    bool mediaRemovable() const;

    Q_PROPERTY(QString Model READ model)
    QString model() const;

    Q_PROPERTY(bool Optical READ optical)
    bool optical() const;

    Q_PROPERTY(bool OpticalBlank READ opticalBlank)
    bool opticalBlank() const;

    Q_PROPERTY(uint OpticalNumAudioTracks READ opticalNumAudioTracks)
    uint opticalNumAudioTracks() const;

    Q_PROPERTY(uint OpticalNumDataTracks READ opticalNumDataTracks)
    uint opticalNumDataTracks() const;

    Q_PROPERTY(uint OpticalNumSessions READ opticalNumSessions)
    uint opticalNumSessions() const;

    Q_PROPERTY(uint OpticalNumTracks READ opticalNumTracks)
    uint opticalNumTracks() const;

    Q_PROPERTY(bool Removable READ removable)
    bool removable() const;

    Q_PROPERTY(QString Revision READ revision)
    QString revision() const;

    Q_PROPERTY(int RotationRate READ rotationRate)
    int rotationRate() const;

    Q_PROPERTY(QString Seat READ seat)
    QString seat() const;

    Q_PROPERTY(QString Serial READ serial)
    QString serial() const;

    Q_PROPERTY(QString SiblingId READ siblingId)
    QString siblingId() const;

    Q_PROPERTY(qulonglong Size READ size)
    qulonglong size() const;

    Q_PROPERTY(QString SortKey READ sortKey)
    QString sortKey() const;

    Q_PROPERTY(qulonglong TimeDetected READ timeDetected)
    qulonglong timeDetected() const;

    Q_PROPERTY(qulonglong TimeMediaDetected READ timeMediaDetected)
    qulonglong timeMediaDetected() const;

    Q_PROPERTY(QString Vendor READ vendor)
    QString vendor() const;

    Q_PROPERTY(QString WWN READ wWN)
    QString wWN() const;

    Q_PROPERTY(bool bsdisks_IsHotpluggable READ bsdisks_IsHotpluggableR)
    bool bsdisks_IsHotpluggableR() const;
    Q_PROPERTY(QString bsdisks_ConnectionBus READ bsdisks_ConnectionBusR)
    QString bsdisks_ConnectionBusR() const;
    Q_PROPERTY(QString bsdisks_AtaSata READ bsdisks_AtaSataR)
    QString bsdisks_AtaSataR() const;

public Q_SLOTS: // METHODS
    void Eject(const QVariantMap &options);
    void PowerOff(const QVariantMap &options);
    void SetConfiguration(const QVariantMap &value, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Drive.Ata
 */
class AtaAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Drive.Ata")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Drive.Ata\">\n"
"    <!-- SmartSupported: Whether the drive supports SMART. -->\n"
"    <property access=\"read\" type=\"b\" name=\"SmartSupported\"/>\n"
"    <!-- SmartEnabled: Whether SMART is enabled. -->\n"
"    <property access=\"read\" type=\"b\" name=\"SmartEnabled\"/>\n"
"    <!-- SmartUpdated:\n"
"         The point in time (seconds since the\n"
"         <ulink url=\"http://en.wikipedia.org/wiki/Unix_epoch\">Unix Epoch</ulink>)\n"
"         that the SMART status was updated or 0 if never updated.\n"
"\n"
"         The value of the other properties related to SMART are not\n"
"         meaningful if this proeprty is 0.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"SmartUpdated\"/>\n"
"    <!-- SmartFailing:\n"
"         Set to %TRUE if disk is about to fail.\n"
"\n"
"         This value is read from the disk itself and does not include\n"
"         any interpretation.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"SmartFailing\"/>\n"
"    <!-- SmartPowerOnSeconds:\n"
"         The amount of time the disk has been powered on (according to SMART data) or 0 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"SmartPowerOnSeconds\"/>\n"
"    <!-- SmartTemperature:\n"
"         The temperature (in Kelvin) of the disk according to SMART data or 0 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"d\" name=\"SmartTemperature\"/>\n"
"    <!--\n"
"        SmartNumAttributesFailing:\n"
"        The number of attributes failing right now or -1 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"i\" name=\"SmartNumAttributesFailing\"/>\n"
"    <!--\n"
"        SmartNumAttributesFailedInThePast:\n"
"        The number of attributes that have failed in the past or -1 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"i\" name=\"SmartNumAttributesFailedInThePast\"/>\n"
"    <!--\n"
"        SmartNumBadSectors:\n"
"        The number of bad sectors (ie. pending and reallocated) or -1 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"x\" name=\"SmartNumBadSectors\"/>\n"
"    <!-- SmartSelftestStatus:\n"
"         The status of the last self-test. Known values include\n"
"        <variablelist>\n"
"        <varlistentry><term>success</term>\n"
"          <listitem><para>Last self-test was a success (or never ran).</para></listitem></varlistentry>\n"
"        <varlistentry><term>aborted</term>\n"
"          <listitem><para>Last self-test was aborted.</para></listitem></varlistentry>\n"
"        <varlistentry><term>interrupted</term>\n"
"          <listitem><para>Last self-test was interrupted.</para></listitem></varlistentry>\n"
"        <varlistentry><term>fatal</term>\n"
"          <listitem><para>Last self-test did not complete.</para></listitem></varlistentry>\n"
"        <varlistentry><term>error_unknown</term>\n"
"          <listitem><para>Last self-test failed (Unknown).</para></listitem></varlistentry>\n"
"        <varlistentry><term>error_electrical</term>\n"
"          <listitem><para>Last self-test failed (Electrical).</para></listitem></varlistentry>\n"
"        <varlistentry><term>error_servo</term>\n"
"          <listitem><para>Last self-test failed (Servo).</para></listitem></varlistentry>\n"
"        <varlistentry><term>error_read</term>\n"
"          <listitem><para>Last self-test failed (Read).</para></listitem></varlistentry>\n"
"        <varlistentry><term>error_handling</term>\n"
"          <listitem><para>Last self-test failed (Damage).</para></listitem></varlistentry>\n"
"        <varlistentry><term>inprogress</term>\n"
"          <listitem><para>Self-test is currently in progress.</para></listitem></varlistentry>\n"
"        </variablelist>\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"SmartSelftestStatus\"/>\n"
"    <!--\n"
"        SmartSelftestPercentRemaining:\n"
"        The percent remaining or -1 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"i\" name=\"SmartSelftestPercentRemaining\"/>\n"
"    <!--\n"
"        SmartUpdate:\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>nowakeup</parameter> (of type 'b').\n"
"\n"
"        Reads SMART data from the drive and update relevant properties.\n"
"\n"
"        If the option @nowakeup is given and the disk is in a sleeping\n"
"        state, the error\n"
"        <literal>org.freedesktop.UDisks2.Error.WouldWakeup</literal> is\n"
"        returned.\n"
"\n"
"        The option @atasmart_blob can be used to inject libatasmart\n"
"        compatible blobs for testing how clients react to different\n"
"        kinds of SMART data. This option may be removed in the future\n"
"        without it being considered an ABI break.\n"
"    -->\n"
"    <method name=\"SmartUpdate\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        SmartGetAttributes:\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>nowakeup</parameter> (of type 'b').\n"
"        @attributes: The SMART attributes.\n"
"\n"
"        Get the SMART attributes.\n"
"        Each attribute is a struct with the following members:\n"
"        <variablelist>\n"
"        <varlistentry><term>id (type 'y')</term>\n"
"          <listitem><para>Attribute Identifier</para></listitem></varlistentry>\n"
"        <varlistentry><term>name (type 's')</term>\n"
"          <listitem><para>The identifier as a string.</para></listitem></varlistentry>\n"
"        <varlistentry><term>flags (type 'q')</term>\n"
"          <listitem><para>16-bit attribute flags (bit 0 is prefail/oldage, bit 1 is online/offline).</para></listitem></varlistentry>\n"
"        <varlistentry><term>value (type 'i')</term>\n"
"          <listitem><para>The current value or -1 if unknown.</para></listitem></varlistentry>\n"
"        <varlistentry><term>worst (type 'i')</term>\n"
"          <listitem><para>The worst value of -1 if unknown.</para></listitem></varlistentry>\n"
"        <varlistentry><term>threshold (type 'i')</term>\n"
"          <listitem><para>The threshold or -1 if unknown.</para></listitem></varlistentry>\n"
"        <varlistentry><term>pretty (type 'x')</term>\n"
"          <listitem><para>An interpretation of the value - must be ignored if @pretty_unit is 0.</para></listitem></varlistentry>\n"
"        <varlistentry><term>pretty_unit (type 'i')</term>\n"
"          <listitem><para>The unit of the @pretty value - the following units are known: 0 (unknown), 1 (dimensionless), 2 (milliseconds), 3 (sectors), 4 (millikelvin).</para></listitem></varlistentry>\n"
"        <varlistentry><term>expansion (type 'a{sv}')</term>\n"
"          <listitem><para>Currently unused. Intended for future expansion.</para></listitem></varlistentry>\n"
"        </variablelist>\n"
"        The @name parameter should be used as the authoritative identifier for the attribute since it is derived from the numerical @id and the disk's <literal>IDENTIFY</literal> data and thus handles ID collisions between drives of different make and model.\n"
"    -->\n"
"    <method name=\"SmartGetAttributes\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"a(ysqiiixia{sv})\" name=\"attributes\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"      <annotation value=\"QVariantList\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
"    </method>\n"
"    <!--\n"
"        SmartSelftestStart:\n"
"        @type: The type test to run.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Starts a SMART selftest. The @type parameter is for the type\n"
"        of test to start - valid values are <literal>short</literal>,\n"
"        <literal>extended</literal> and <literal>conveyance</literal>.\n"
"\n"
"        Note that the method returns immediately after the test has\n"
"        been started successfully.\n"
"    -->\n"
"    <method name=\"SmartSelftestStart\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"type\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        SmartSelftestAbort:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Aborts a running SMART selftest.\n"
"    -->\n"
"    <method name=\"SmartSelftestAbort\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        SmartSetEnabled:\n"
"        @value: %TRUE to enable SMART, %FALSE to disable SMART.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @since: 2.1\n"
"\n"
"        Sets whether SMART is enabled for the drive. This setting is\n"
"        stored in the non-volatile memory in the drive itself and does\n"
"        not need to be refreshed every time the drive is powered on or\n"
"        connected.\n"
"\n"
"        Since this may require authentication and thus may fail, it is\n"
"        implemented this way instead of the\n"
"        #org.freedesktop.UDisks2.Drive.Ata:SmartEnabled property being\n"
"        writable.\n"
"    -->\n"
"    <method name=\"SmartSetEnabled\">\n"
"      <arg direction=\"in\" type=\"b\" name=\"value\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!-- PmSupported: Whether the drive supports power management. -->\n"
"    <property access=\"read\" type=\"b\" name=\"PmSupported\"/>\n"
"    <!-- PmEnabled: Whether power management is enabled. -->\n"
"    <property access=\"read\" type=\"b\" name=\"PmEnabled\"/>\n"
"    <!-- ApmSupported: Whether the drive supports Advanced Power Management (APM). -->\n"
"    <property access=\"read\" type=\"b\" name=\"ApmSupported\"/>\n"
"    <!-- ApmEnabled: Whether Advanced Power Management (APM) is enabled. -->\n"
"    <property access=\"read\" type=\"b\" name=\"ApmEnabled\"/>\n"
"    <!-- AamSupported: Whether the drive supports Automatic Acoustic Management (AAM). -->\n"
"    <property access=\"read\" type=\"b\" name=\"AamSupported\"/>\n"
"    <!-- AamEnabled: Whether Automatic Acoustic Management (AAM) is enabled. -->\n"
"    <property access=\"read\" type=\"b\" name=\"AamEnabled\"/>\n"
"    <!-- AamVendorRecommendedValue: The vendor-recommended AAM value (or 0 if AAM is not supported). -->\n"
"    <property access=\"read\" type=\"i\" name=\"AamVendorRecommendedValue\"/>\n"
"    <!-- WriteCacheSupported:\n"
"         @since: 2.1\n"
"         Whether the drive supports configuring the write cache.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"WriteCacheSupported\"/>\n"
"    <!-- WriteCacheEnabled:\n"
"         @since: 2.1\n"
"         Whether the write-cache is enabled (or %FALSE if not supported).\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"WriteCacheEnabled\"/>\n"
"    <!-- ReadLookaheadSupported:\n"
"         @since: 2.1.7\n"
"         Whether the drive supports configuring the read look-ahead.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"ReadLookaheadSupported\"/>\n"
"    <!-- ReadLookaheadEnabled:\n"
"         @since: 2.1.7\n"
"         Whether the read look-ahead is enabled (or %FALSE if not supported).\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"ReadLookaheadEnabled\"/>\n"
"    <!--\n"
"        PmGetState:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @state: The current power state.\n"
"\n"
"        Get the current power mode status. This is implemented as a\n"
"        method call as it involves sending a command from the host to\n"
"        the drive and no change notification is available.\n"
"\n"
"        The format of @state is the result obtained from sending the\n"
"        ATA command <quote>CHECK POWER MODE</quote> to the drive.\n"
"        Known values include\n"
"        <variablelist>\n"
"        <varlistentry><term>0x00</term><listitem><para>Standby</para></listitem></varlistentry>\n"
"        <varlistentry><term>0x80</term><listitem><para>Idle</para></listitem></varlistentry>\n"
"        <varlistentry><term>0xff</term><listitem><para>Active/Idle</para></listitem></varlistentry>\n"
"        </variablelist>\n"
"        Typically user interfaces will report \"Drive is spun down\" if @state is\n"
"        0x00 and \"Drive is spun up\" otherwise.\n"
"    -->\n"
"    <method name=\"PmGetState\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"y\" name=\"state\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        PmStandby:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Force the drive to immediately enter the low power consumption\n"
"        <emphasis>standby</emphasis> mode, usually causing it to spin\n"
"        down. This is done by sending the ATA command\n"
"        <quote>STANDBY IMMEDIATE</quote> to the drive.\n"
"    -->\n"
"    <method name=\"PmStandby\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        PmWakeup:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Force the drive to immediately wake up (exiting the low power\n"
"        consumption <emphasis>standby</emphasis> mode), usually\n"
"        causing it to spin up. This is done by reading data from the\n"
"        disk.\n"
"    -->\n"
"    <method name=\"PmWakeup\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!-- SecurityEraseUnitMinutes:\n"
"         The estimated amount of minutes it takes to complete the\n"
"         <quote>SECURITY ERASE UNIT</quote> command or 0 if this\n"
"         command is not available.\n"
"\n"
"         If set to 510 it means that it takes at least 508 minutes to\n"
"         complete the operation.\n"
"    -->\n"
"    <property access=\"read\" type=\"i\" name=\"SecurityEraseUnitMinutes\"/>\n"
"    <!-- SecurityEnhancedEraseUnitMinutes:\n"
"         The estimated amount of minutes it takes to complete the\n"
"         <quote>SECURITY ERASE UNIT</quote> command with enhanced mode\n"
"         specified or 0 if enhanced erase is not available.\n"
"\n"
"         If set to 510 it means that it takes at least 508 minutes to\n"
"         complete the operation.\n"
"    -->\n"
"    <property access=\"read\" type=\"i\" name=\"SecurityEnhancedEraseUnitMinutes\"/>\n"
"    <!-- SecurityFrozen:\n"
"         If set to %TRUE the unit is frozen.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"SecurityFrozen\"/>\n"
"    <!--\n"
"        SecurityEraseUnit:\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>enhanced</parameter> (of type 'b').\n"
"\n"
"        Does all the necessary checks and preparations and then sends\n"
"        the <quote>SECURITY ERASE UNIT</quote> command to the\n"
"        drive. If the option @enhanced is set to %TRUE an\n"
"        <emphasis>enhanced secure erase</emphasis> is requested.\n"
"\n"
"        All data on the drive will be irrevocably erased.\n"
"\n"
"        This operation takes either\n"
"        #org.freedesktop.UDisks2.Drive.Ata:SecurityEraseUnitMinutes or\n"
"        #org.freedesktop.UDisks2.Drive.Ata:SecurityEnhancedEraseUnitMinutes\n"
"        minutes to complete depending on whether the @enhanced option\n"
"        is %TRUE.\n"
"    -->\n"
"    <method name=\"SecurityEraseUnit\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    AtaAdaptor(QObject *parent);
    virtual ~AtaAdaptor();

public: // PROPERTIES
    Q_PROPERTY(bool AamEnabled READ aamEnabled)
    bool aamEnabled() const;

    Q_PROPERTY(bool AamSupported READ aamSupported)
    bool aamSupported() const;

    Q_PROPERTY(int AamVendorRecommendedValue READ aamVendorRecommendedValue)
    int aamVendorRecommendedValue() const;

    Q_PROPERTY(bool ApmEnabled READ apmEnabled)
    bool apmEnabled() const;

    Q_PROPERTY(bool ApmSupported READ apmSupported)
    bool apmSupported() const;

    Q_PROPERTY(bool PmEnabled READ pmEnabled)
    bool pmEnabled() const;

    Q_PROPERTY(bool PmSupported READ pmSupported)
    bool pmSupported() const;

    Q_PROPERTY(bool ReadLookaheadEnabled READ readLookaheadEnabled)
    bool readLookaheadEnabled() const;

    Q_PROPERTY(bool ReadLookaheadSupported READ readLookaheadSupported)
    bool readLookaheadSupported() const;

    Q_PROPERTY(int SecurityEnhancedEraseUnitMinutes READ securityEnhancedEraseUnitMinutes)
    int securityEnhancedEraseUnitMinutes() const;

    Q_PROPERTY(int SecurityEraseUnitMinutes READ securityEraseUnitMinutes)
    int securityEraseUnitMinutes() const;

    Q_PROPERTY(bool SecurityFrozen READ securityFrozen)
    bool securityFrozen() const;

    Q_PROPERTY(bool SmartEnabled READ smartEnabled)
    bool smartEnabled() const;

    Q_PROPERTY(bool SmartFailing READ smartFailing)
    bool smartFailing() const;

    Q_PROPERTY(int SmartNumAttributesFailedInThePast READ smartNumAttributesFailedInThePast)
    int smartNumAttributesFailedInThePast() const;

    Q_PROPERTY(int SmartNumAttributesFailing READ smartNumAttributesFailing)
    int smartNumAttributesFailing() const;

    Q_PROPERTY(qlonglong SmartNumBadSectors READ smartNumBadSectors)
    qlonglong smartNumBadSectors() const;

    Q_PROPERTY(qulonglong SmartPowerOnSeconds READ smartPowerOnSeconds)
    qulonglong smartPowerOnSeconds() const;

    Q_PROPERTY(int SmartSelftestPercentRemaining READ smartSelftestPercentRemaining)
    int smartSelftestPercentRemaining() const;

    Q_PROPERTY(QString SmartSelftestStatus READ smartSelftestStatus)
    QString smartSelftestStatus() const;

    Q_PROPERTY(bool SmartSupported READ smartSupported)
    bool smartSupported() const;

    Q_PROPERTY(double SmartTemperature READ smartTemperature)
    double smartTemperature() const;

    Q_PROPERTY(qulonglong SmartUpdated READ smartUpdated)
    qulonglong smartUpdated() const;

    Q_PROPERTY(bool WriteCacheEnabled READ writeCacheEnabled)
    bool writeCacheEnabled() const;

    Q_PROPERTY(bool WriteCacheSupported READ writeCacheSupported)
    bool writeCacheSupported() const;

public Q_SLOTS: // METHODS
    uchar PmGetState(const QVariantMap &options);
    void PmStandby(const QVariantMap &options);
    void PmWakeup(const QVariantMap &options);
    void SecurityEraseUnit(const QVariantMap &options);
    QVariantList SmartGetAttributes(const QVariantMap &options);
    void SmartSelftestAbort(const QVariantMap &options);
    void SmartSelftestStart(const QString &type, const QVariantMap &options);
    void SmartSetEnabled(bool value, const QVariantMap &options);
    void SmartUpdate(const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Encrypted
 */
class EncryptedAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Encrypted")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Encrypted\">\n"
"    <!-- prereq: org.freedesktop.UDisks2.Block -->\n"
"    <!--\n"
"        Unlock:\n"
"        @passphrase: The passphrase to use.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @cleartext_device: An object path to the unlocked object implementing the #org.freedesktop.UDisks2.Block interface.\n"
"\n"
"        Tries to unlock the encrypted device using @passphrase.\n"
"\n"
"        If the device in question is referenced in a system-wide\n"
"        configuration file (such as the <filename>/etc/crypttab</filename> file),\n"
"        then name, options and passphrase (if available) is used from that\n"
"        file after requesting additional authorization.\n"
"\n"
"        If the device is removed without being locked (e.g. the user\n"
"        yanking the device or pulling the media out) the cleartext\n"
"        device will be cleaned up.\n"
"    -->\n"
"    <method name=\"Unlock\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"passphrase\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"o\" name=\"cleartext_device\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        Lock:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Locks the encrypted device.\n"
"    -->\n"
"    <method name=\"Lock\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        ChangePassphrase:\n"
"        @passphrase: The existing passphrase.\n"
"        @new_passphrase: The new passphrase to use.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Changes the passphrase to @new_passphrase. An existing passphrase is required.\n"
"\n"
"        If the device in question is referenced in a system-wide\n"
"        configuration file (such as the\n"
"        <filename>/etc/crypttab</filename> file) and this\n"
"        configuration references the passphrase, it is not\n"
"        automatically updated.\n"
"    -->\n"
"    <method name=\"ChangePassphrase\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"passphrase\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"new_passphrase\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In2\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    EncryptedAdaptor(QObject *parent);
    virtual ~EncryptedAdaptor();

public: // PROPERTIES
public Q_SLOTS: // METHODS
    void ChangePassphrase(const QString &passphrase, const QString &new_passphrase, const QVariantMap &options);
    void Lock(const QVariantMap &options);
    QDBusObjectPath Unlock(const QString &passphrase, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Filesystem
 */
class FilesystemAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Filesystem")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Filesystem\">\n"
"    <!-- prereq: org.freedesktop.UDisks2.Block -->\n"
"    <!--\n"
"        SetLabel:\n"
"        @label: The label to set.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Sets the filesystem label.\n"
"    -->\n"
"    <method name=\"SetLabel\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"label\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!-- MountPoints:\n"
"         An array of filesystems paths for where the file system on\n"
"         the device is mounted. If the device is not mounted, this\n"
"         array is empty.\n"
"    -->\n"
"    <property access=\"read\" type=\"aay\" name=\"MountPoints\">\n"
"      <annotation value=\"QByteArrayList\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <!--\n"
"        Mount:\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>fstype</parameter> (of type 's') and <parameter>options</parameter> (of type 's').\n"
"        @mount_path: The filesystem path where the device was mounted.\n"
"\n"
"        Mounts the filesystem.\n"
"\n"
"        The directory the filesystem will be mounted in is determined\n"
"        by looking at data related to the device or filesystem (such\n"
"        the filesystem UUID and label) and will be created\n"
"        automatically except if the device the filesystem resides on\n"
"        is referenced in the <filename>/etc/fstab</filename> file, see\n"
"        below. In either case, the directory the filesystem is mounted\n"
"        in, is returned in @mount_path on success - it is usually a\n"
"        sub-directory of <filename\n"
"        class='directory'>/run/media/$USER</filename> but note that\n"
"        any directory may be returned.\n"
"\n"
"        The filesystem type to use can be overridden with the @fstype\n"
"        option and mount options (a comma-separated string) can be\n"
"        given in @options option. Note that both the mount options and\n"
"        filesystem types are validated against a (small) whitelist to\n"
"        avoid unexpected privilege escalation\n"
"\n"
"        If the device in question is referenced in the\n"
"        <filename>/etc/fstab</filename> file, the\n"
"        <command>mount</command> command is called directly (as root)\n"
"        and the given options or filesystem type given in @options are\n"
"        ignored.\n"
"\n"
"        If <literal>x-udisks-auth</literal> is specified as an option\n"
"        for the device in the <filename>/etc/fstab</filename> file,\n"
"        then the <command>mount</command> command is run as the\n"
"        calling user, without performing any authorization check\n"
"        mentioned above. If this fails because of insufficient\n"
"        permissions, an authorization check is performed (which\n"
"        typically results in the user having to authenticate as an\n"
"        administrator). If authorized, the <command>mount</command>\n"
"        command is then run as root.\n"
"\n"
"        The filesystem should be unmounted using the\n"
"        org.freedesktop.UDisks2.Filesystem.Unmount() method.\n"
"\n"
"        If the device is removed without being unmounted (e.g. the\n"
"        user yanking the device or pulling the media out) or unmounted\n"
"        in a way that bypasses the\n"
"        org.freedesktop.UDisks2.Filesystem.Unmount() method\n"
"        (e.g. unmounted by the super-user by using the\n"
"        <citerefentry><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry>\n"
"        command directly), the device will be unmounted (if needed)\n"
"        and/or the mount point will be cleaned up.\n"
"    -->\n"
"    <method name=\"Mount\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"s\" name=\"mount_path\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        Unmount:\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>force</parameter> (of type 'b').\n"
"\n"
"        Unmount a mounted device.\n"
"\n"
"        If the device in question was mounted by the calling user\n"
"        via the org.freedesktop.UDisks2.Filesystem.Mount() method the\n"
"        filesystem is unmounted without any authorization checks.\n"
"        Otherwise, an authorization check is performed (which\n"
"        typically results in the user having to authenticate as an\n"
"        administrator). If authorized, the filesystem is unmounted.\n"
"\n"
"        If the filesystem is busy, this operation fails with the error\n"
"        <link linkend=\"UDISKS-ERROR-DEVICE-BUSY:CAPS\"><constant>org.freedesktop.UDisks2.Error.DeviceBusy</constant></link>\n"
"        unless the @force option is used.\n"
"    -->\n"
"    <method name=\"Unmount\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    FilesystemAdaptor(QObject *parent);
    virtual ~FilesystemAdaptor();

public: // PROPERTIES
    Q_PROPERTY(QByteArrayList MountPoints READ mountPoints)
    QByteArrayList mountPoints() const;

public Q_SLOTS: // METHODS
    QString Mount(const QVariantMap &options);
    void SetLabel(const QString &label, const QVariantMap &options);
    void Unmount(const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Job
 */
class JobAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Job")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Job\">\n"
"    <!-- Operation:\n"
"         The type of the operation that the job represents.\n"
"\n"
"         Known job operation types include:\n"
"         <variablelist>\n"
"           <varlistentry><term>ata-smart-selftest</term>\n"
"             <listitem><para>SMART self-test operation.</para></listitem></varlistentry>\n"
"           <varlistentry><term>drive-eject</term>\n"
"             <listitem><para>Ejecting the medium from a drive.</para></listitem></varlistentry>\n"
"           <varlistentry><term>encrypted-unlock</term>\n"
"             <listitem><para>Unlocking encrypted device.</para></listitem></varlistentry>\n"
"           <varlistentry><term>encrypted-lock</term>\n"
"             <listitem><para>Locking encrypted device.</para></listitem></varlistentry>\n"
"           <varlistentry><term>encrypted-modify</term>\n"
"             <listitem><para>Modifying encrypted device.</para></listitem></varlistentry>\n"
"           <varlistentry><term>swapspace-start</term>\n"
"             <listitem><para>Starting swapspace.</para></listitem></varlistentry>\n"
"           <varlistentry><term>swapspace-stop</term>\n"
"             <listitem><para>Stopping swapspace.</para></listitem></varlistentry>\n"
"           <varlistentry><term>filesystem-mount</term>\n"
"             <listitem><para>Mounting a filesystem.</para></listitem></varlistentry>\n"
"           <varlistentry><term>filesystem-unmount</term>\n"
"             <listitem><para>Unmounting a filesystem.</para></listitem></varlistentry>\n"
"           <varlistentry><term>filesystem-modify</term>\n"
"             <listitem><para>Modifying a filesystem.</para></listitem></varlistentry>\n"
"           <varlistentry><term>format-erase</term>\n"
"             <listitem><para>Erasing a device.</para></listitem></varlistentry>\n"
"           <varlistentry><term>format-mkfs</term>\n"
"             <listitem><para>Creating a filesystem.</para></listitem></varlistentry>\n"
"           <varlistentry><term>loop-setup</term>\n"
"             <listitem><para>Setting up a loop device.</para></listitem></varlistentry>\n"
"           <varlistentry><term>partition-modify</term>\n"
"             <listitem><para>Modifying a partition.</para></listitem></varlistentry>\n"
"           <varlistentry><term>partition-delete</term>\n"
"             <listitem><para>Deleting a partition.</para></listitem></varlistentry>\n"
"           <varlistentry><term>partition-create</term>\n"
"             <listitem><para>Creating a partition.</para></listitem></varlistentry>\n"
"           <varlistentry><term>cleanup</term>\n"
"             <listitem><para>Cleaning up devices that were removed without being properly unmounted or shut down.</para></listitem></varlistentry>\n"
"           <varlistentry><term>ata-secure-erase</term>\n"
"             <listitem><para>ATA Secure Erase.</para></listitem></varlistentry>\n"
"           <varlistentry><term>ata-enhanced-secure-erase</term>\n"
"             <listitem><para>ATA Enhanced Secure Erase.</para></listitem></varlistentry>\n"
"           <varlistentry><term>md-raid-stop</term>\n"
"             <listitem><para>Stopping a RAID Array.</para></listitem></varlistentry>\n"
"           <varlistentry><term>md-raid-start</term>\n"
"             <listitem><para>Starting a RAID Array.</para></listitem></varlistentry>\n"
"           <varlistentry><term>md-raid-fault-device</term>\n"
"             <listitem><para>Marking device in RAID Array as faulty.</para></listitem></varlistentry>\n"
"           <varlistentry><term>md-raid-remove-device</term>\n"
"             <listitem><para>Removing device from RAID Array.</para></listitem></varlistentry>\n"
"           <varlistentry><term>md-raid-create</term>\n"
"             <listitem><para>Create a RAID Array.</para></listitem></varlistentry>\n"
"         </variablelist>\n"
"         The\n"
"         <link linkend=\"udisks-client-get-job-description\">udisks_client_get_job_description()</link>\n"
"         function can be used to get a localized human readable description.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Operation\"/>\n"
"    <!-- Progress:\n"
"         How much progress has been made. Values are in the range 0 to 1.\n"
"\n"
"         Do not use unless #org.freedesktop.UDisks2.Job:ProgressValid is %TRUE.\n"
"    -->\n"
"    <property access=\"read\" type=\"d\" name=\"Progress\"/>\n"
"    <!-- ProgressValid: Set to %TRUE if the #org.freedesktop.UDisks2.Job:Progress is valid. -->\n"
"    <property access=\"read\" type=\"b\" name=\"ProgressValid\"/>\n"
"    <!-- Bytes:\n"
"         @since: 2.1\n"
"         If the job involves processing a known number of bytes (for\n"
"         example, erasing a disk), this property contains the total\n"
"         number of bytes to process. If not, the value of this\n"
"         property is zero.\n"
"\n"
"         The intent of this property is for user interfaces to convey\n"
"         information such as <quote>123 GB of 1.0 TB completed</quote>.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"Bytes\"/>\n"
"    <!-- Rate:\n"
"         @since: 2.1\n"
"         If the job involves processing a number of bytes (for\n"
"         example, erasing) and the rate at which the processing takes\n"
"         place is known, this property contains the rate (measured in\n"
"         bytes per second).  Otherwise the value of this property is\n"
"         zero.\n"
"\n"
"         The intent of this property is for user interfaces to convey\n"
"         information such as <quote>110 MB/sec</quote>.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"Rate\"/>\n"
"    <!-- StartTime:\n"
"\n"
"         The point in time (micro-seconds since the <ulink\n"
"         url=\"http://en.wikipedia.org/wiki/Unix_epoch\">Unix\n"
"         Epoch</ulink>) that the job was started.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"StartTime\"/>\n"
"    <!-- ExpectedEndTime:\n"
"\n"
"         The expected point in time (micro-seconds since the <ulink\n"
"         url=\"http://en.wikipedia.org/wiki/Unix_epoch\">Unix\n"
"         Epoch</ulink>) that the job will complete or 0 if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"ExpectedEndTime\"/>\n"
"    <!-- Objects: The objects that the job is related to, if any. -->\n"
"    <property access=\"read\" type=\"ao\" name=\"Objects\"/>\n"
"    <!-- StartedByUID:\n"
"         The id of the user who started the job or 0 if started\n"
"         by root or not through udisks.\n"
"    -->\n"
"    <property access=\"read\" type=\"u\" name=\"StartedByUID\"/>\n"
"    <!--\n"
"        Cancel:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Cancels the job. Fails with the\n"
"        <literal>org.freedesktop.UDisks2.Error.Failed</literal> error\n"
"        if #org.freedesktop.UDisks2.Job:Cancelable is %FALSE.\n"
"    -->\n"
"    <method name=\"Cancel\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!-- Cancelable: Whether the job can be canceled. -->\n"
"    <property access=\"read\" type=\"b\" name=\"Cancelable\"/>\n"
"    <!--\n"
"        Completed:\n"
"        @success: If %TRUE, the job completed successfully.\n"
"        @message: A message describing the completion of the job, e.g. an error message.\n"
"\n"
"        Emitted when a job completes.\n"
"    -->\n"
"    <signal name=\"Completed\">\n"
"      <arg type=\"b\" name=\"success\"/>\n"
"      <arg type=\"s\" name=\"message\"/>\n"
"    </signal>\n"
"  </interface>\n"
        "")
public:
    JobAdaptor(QObject *parent);
    virtual ~JobAdaptor();

public: // PROPERTIES
    Q_PROPERTY(qulonglong Bytes READ bytes)
    qulonglong bytes() const;

    Q_PROPERTY(bool Cancelable READ cancelable)
    bool cancelable() const;

    Q_PROPERTY(qulonglong ExpectedEndTime READ expectedEndTime)
    qulonglong expectedEndTime() const;

    Q_PROPERTY(QList<QDBusObjectPath> Objects READ objects)
    QList<QDBusObjectPath> objects() const;

    Q_PROPERTY(QString Operation READ operation)
    QString operation() const;

    Q_PROPERTY(double Progress READ progress)
    double progress() const;

    Q_PROPERTY(bool ProgressValid READ progressValid)
    bool progressValid() const;

    Q_PROPERTY(qulonglong Rate READ rate)
    qulonglong rate() const;

    Q_PROPERTY(qulonglong StartTime READ startTime)
    qulonglong startTime() const;

    Q_PROPERTY(uint StartedByUID READ startedByUID)
    uint startedByUID() const;

public Q_SLOTS: // METHODS
    void Cancel(const QVariantMap &options);
Q_SIGNALS: // SIGNALS
    void Completed(bool success, const QString &message);
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Loop
 */
class LoopAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Loop")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Loop\">\n"
"    <!-- prereq: org.freedesktop.UDisks2.Block -->\n"
"    <!--\n"
"        Delete:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Deletes the loop device.\n"
"    -->\n"
"    <method name=\"Delete\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!-- BackingFile:\n"
"         A path to the file that is backing the block device or blank\n"
"         if unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"ay\" name=\"BackingFile\"/>\n"
"    <!-- Autoclear:\n"
"         If %TRUE, the kernel will automatically clear the loop device\n"
"         when the last closer closes the device. This typically\n"
"         happens when the loop device is unmounted.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"Autoclear\"/>\n"
"    <!-- SetupByUID:\n"
"         The id of the user who set up the loop device or 0 if set up\n"
"         by root or not through udisks.\n"
"    -->\n"
"    <property access=\"read\" type=\"u\" name=\"SetupByUID\"/>\n"
"    <!--\n"
"        SetAutoclear:\n"
"        @value: The new value of autoclear.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Setter for the #org.freedesktop.UDisks2.Loop:Autoclear\n"
"        property. Since this may require authentication and thus may\n"
"        fail, it is implemented this way instead of the property being\n"
"        writable.\n"
"    -->\n"
"    <method name=\"SetAutoclear\">\n"
"      <arg direction=\"in\" type=\"b\" name=\"value\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    LoopAdaptor(QObject *parent);
    virtual ~LoopAdaptor();

public: // PROPERTIES
    Q_PROPERTY(bool Autoclear READ autoclear)
    bool autoclear() const;

    Q_PROPERTY(QByteArray BackingFile READ backingFile)
    QByteArray backingFile() const;

    Q_PROPERTY(uint SetupByUID READ setupByUID)
    uint setupByUID() const;

public Q_SLOTS: // METHODS
    void Delete(const QVariantMap &options);
    void SetAutoclear(bool value, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.MDRaid
 */
class MDRaidAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.MDRaid")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.MDRaid\">\n"
"    <!-- UUID:\n"
"         The UUID of the array.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"UUID\"/>\n"
"    <!-- Name:\n"
"         The name of the array (TODO: homehost etc).\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Name\"/>\n"
"    <!-- Level:\n"
"         The RAID level.\n"
"\n"
"         Known values include <literal>raid0</literal>, <literal>raid1</literal>, <literal>raid4</literal>, <literal>raid5</literal>, <literal>raid6</literal> and <literal>raid10</literal>.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Level\"/>\n"
"    <!-- NumDevices:\n"
"         Number of devices that are part of the array.\n"
"    -->\n"
"    <property access=\"read\" type=\"u\" name=\"NumDevices\"/>\n"
"    <!-- Size:\n"
"         The size of the array or 0 if unknown.\n"
"\n"
"         This is the usable size, e.g. for a RAID-5 array backed by 4\n"
"         1TB disks, this will be approximately 3 TB.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"Size\"/>\n"
"    <!-- SyncAction:\n"
"         The current state of the array or empty if the array is not\n"
"         running or if the array does not have any redundancy\n"
"         (e.g. RAID-0 or linear).\n"
"\n"
"         Use the org.freedesktop.UDisks2.MDRaid.RequestSyncAction()\n"
"         method to change this.\n"
"\n"
"         This property corresponds to the\n"
"         <literal>sync_action</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"SyncAction\"/>\n"
"    <!-- SyncCompleted:\n"
"         The fraction or sectors completed (always between <constant>0.0</constant> and <constant>1.0</constant>) in the sync operation or 0.0 if no operation is in progress.\n"
"\n"
"         This property corresponds to the\n"
"         <literal>sync_completed</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"d\" name=\"SyncCompleted\"/>\n"
"    <!-- SyncRate:\n"
"         The rate (or speed) at which the sync operation takes\n"
"         place. It is averaged over the last 30 seconds and measured\n"
"         in bytes per second.\n"
"\n"
"         If the rate is unknown or no operation is in progress, the\n"
"         value of this property is 0.\n"
"\n"
"         This property corresponds to the\n"
"         <literal>sync_speed</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"SyncRate\"/>\n"
"    <!-- SyncRemainingTime:\n"
"         The estimated number of micro-seconds until the operation is\n"
"         finished\n"
"\n"
"         If the amount of remaining time is unknown or no operation is\n"
"         in progress, the value of this property is 0.\n"
"\n"
"         This property is based on the value of the\n"
"         <literal>sync_speed</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"SyncRemainingTime\"/>\n"
"    <!-- Degraded:\n"
"         Number of devices by which the array is degraded (0 if not degraded or not running).\n"
"\n"
"         This property corresponds to the\n"
"         <literal>degraded</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"u\" name=\"Degraded\"/>\n"
"    <!-- BitmapLocation:\n"
"         The location of a write-intent bitmap (empty if the array is not running), if any.\n"
"\n"
"         If the RAID array does not suppor write-intent bitmaps (for\n"
"         example RAID-0 arrays), this is empty.\n"
"\n"
"         This property corresponds to the\n"
"         <literal>bitmap/location</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"ay\" name=\"BitmapLocation\"/>\n"
"    <!-- ChunkSize:\n"
"         The chunk size (0 if the array is not running or not using striping).\n"
"\n"
"         This property corresponds to the\n"
"         <literal>chunk_size</literal> sysfs file, see the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"ChunkSize\"/>\n"
"    <!-- ActiveDevices:\n"
"         This property is an array with block devices that are\n"
"         currently associated with the with the array. It is empty if\n"
"         the array is not running.\n"
"\n"
"         Each element of the array is a struct with the following members:\n"
"         <variablelist>\n"
"         <varlistentry><term>block (type 'o')</term>\n"
"         <listitem><para>The object path for the underlying block device (guaranteed to implement the #org.freedesktop.UDisks2.Block interface)</para></listitem></varlistentry>\n"
"         <varlistentry><term>slot (type 'i')</term>\n"
"         <listitem><para>-1 if the device is not currently part of the array (ie. <literal>spare</literal> or <literal>faulty</literal>), otherwise the slot number the device currently fills (between 0 and #org.freedesktop.UDisks2.MDRaid:NumDevices)</para></listitem></varlistentry>\n"
"         <varlistentry><term>state (type 'as')</term>\n"
"         <listitem><para>The state of the device - known elements include <literal>faulty</literal>, <literal>in_sync</literal>, <literal>write_mostly</literal>, <literal>blocked</literal> and <literal>spare</literal></para></listitem></varlistentry>\n"
"         <varlistentry><term>num_read_errors (type 't')</term>\n"
"         <listitem><para>An ongoing count of read errors that have been detected on this device but have not caused the device to be evicted from the array</para></listitem></varlistentry>\n"
"         <varlistentry><term>expansion (type 'a{sv}')</term>\n"
"         <listitem><para>Currently unused. Intended for future expansion.</para></listitem></varlistentry>\n"
"         </variablelist>\n"
"         This property correspond to the\n"
"         <filename>/sys/block/mdN/md/dev-*</filename> directories in sysfs and the sysfs files in each directory.\n"
"         See the\n"
"         <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"         file shipped with the kernel sources.\n"
"    -->\n"
"    <property access=\"read\" type=\"a(oiasta{sv})\" name=\"ActiveDevices\">\n"
"      <annotation value=\"QVariantList\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <!--\n"
"        Start:\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>start-degraded</parameter> (of type 'b').\n"
"\n"
"        Starts the RAID array.\n"
"\n"
"        If the @option parameter contains the key @start-degraded with\n"
"        the value %TRUE, the array will be started even if some members\n"
"        are missing.\n"
"    -->\n"
"    <method name=\"Start\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        Stop:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Stops the RAID array.\n"
"    -->\n"
"    <method name=\"Stop\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        RemoveDevice:\n"
"        @device: An object path to an object implementing the #org.freedesktop.UDisks2.Block interface.\n"
"        @options: Options - known options (in addition to <link linkend=\"udisks-std-options\">standard options</link>) includes <parameter>wipe</parameter> (of type 'b').\n"
"\n"
"        Removes @device from the array.\n"
"\n"
"        For this to work @device must already be associated with the\n"
"        array, e.g. referenced in the\n"
"        #org.freedesktop.UDisks2.MDRaid:ActiveDevices property.\n"
"\n"
"        If the @option parameter contains the key @wipe with the value\n"
"        %TRUE, all known filesystem signatures will be erased from the\n"
"        @device after removal.\n"
"    -->\n"
"    <method name=\"RemoveDevice\">\n"
"      <arg direction=\"in\" type=\"o\" name=\"device\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        AddDevice:\n"
"        @device: An object path to an object implementing the #org.freedesktop.UDisks2.Block interface.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Adds @device to the array.\n"
"    -->\n"
"    <method name=\"AddDevice\">\n"
"      <arg direction=\"in\" type=\"o\" name=\"device\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        SetBitmapLocation:\n"
"        @value: The value for the bitmap, currently only the values 'none' and 'internal' are supported.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Sets whether the array has a write-intent bitmap.\n"
"    -->\n"
"    <method name=\"SetBitmapLocation\">\n"
"      <arg direction=\"in\" type=\"ay\" name=\"value\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        RequestSyncAction:\n"
"        @sync_action: The action to request.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        This method call can be used to trigger and cancel data\n"
"        redundancy checks and repairs. Currently only the values\n"
"        <literal>check</literal>, <literal>repair</literal> and\n"
"        <literal>idle</literal> can be used for @sync_action.\n"
"\n"
"        See also the property #org.freedesktop.UDisks2.MDRaid:SyncAction.\n"
"\n"
"        This method call is similar to writing to the\n"
"        <literal>sync_action</literal> sysfs file, see the\n"
"        <filename><ulink url=\"http://www.kernel.org/doc/Documentation/md.txt\">Documentation/md.txt</ulink></filename>\n"
"        file shipped with the kernel sources.\n"
"    -->\n"
"    <method name=\"RequestSyncAction\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"sync_action\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    MDRaidAdaptor(QObject *parent);
    virtual ~MDRaidAdaptor();

public: // PROPERTIES
    Q_PROPERTY(QVariantList ActiveDevices READ activeDevices)
    QVariantList activeDevices() const;

    Q_PROPERTY(QByteArray BitmapLocation READ bitmapLocation)
    QByteArray bitmapLocation() const;

    Q_PROPERTY(qulonglong ChunkSize READ chunkSize)
    qulonglong chunkSize() const;

    Q_PROPERTY(uint Degraded READ degraded)
    uint degraded() const;

    Q_PROPERTY(QString Level READ level)
    QString level() const;

    Q_PROPERTY(QString Name READ name)
    QString name() const;

    Q_PROPERTY(uint NumDevices READ numDevices)
    uint numDevices() const;

    Q_PROPERTY(qulonglong Size READ size)
    qulonglong size() const;

    Q_PROPERTY(QString SyncAction READ syncAction)
    QString syncAction() const;

    Q_PROPERTY(double SyncCompleted READ syncCompleted)
    double syncCompleted() const;

    Q_PROPERTY(qulonglong SyncRate READ syncRate)
    qulonglong syncRate() const;

    Q_PROPERTY(qulonglong SyncRemainingTime READ syncRemainingTime)
    qulonglong syncRemainingTime() const;

    Q_PROPERTY(QString UUID READ uUID)
    QString uUID() const;

public Q_SLOTS: // METHODS
    void AddDevice(const QDBusObjectPath &device, const QVariantMap &options);
    void RemoveDevice(const QDBusObjectPath &device, const QVariantMap &options);
    void RequestSyncAction(const QString &sync_action, const QVariantMap &options);
    void SetBitmapLocation(const QByteArray &value, const QVariantMap &options);
    void Start(const QVariantMap &options);
    void Stop(const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Manager
 */
class ManagerAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Manager")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Manager\">\n"
"    <!-- Version: The version of the daemon currently running  -->\n"
"    <property access=\"read\" type=\"s\" name=\"Version\"/>\n"
"    <!--\n"
"        LoopSetup:\n"
"        @fd: An index for the file descriptor to use.\n"
"        @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'), <parameter>read-only</parameter> (of type 'b') and <parameter>no-part-scan</parameter> (of type 'b').\n"
"        @resulting_device: An object path to the object implementing the #org.freedesktop.UDisks2.Block interface.\n"
"\n"
"        Creates a block device for the file represented by @fd.\n"
"    -->\n"
"    <method name=\"LoopSetup\">\n"
"      <annotation value=\"1\" name=\"org.gtk.GDBus.C.UnixFD\"/>\n"
"      <arg direction=\"in\" type=\"h\" name=\"fd\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"o\" name=\"resulting_device\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!--\n"
"        MDRaidCreate:\n"
"        @blocks: An array of object paths to objects implementing the #org.freedesktop.UDisks2.Block interface.\n"
"        @level: The RAID level for the array.\n"
"        @name: The name for the array.\n"
"        @chunk: The chunk size (in bytes) or 0 if @level is <quote>raid1</quote>.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @resulting_array: An object path to the object implementing the #org.freedesktop.UDisks2.MDRaid interface.\n"
"        @since: 2.1\n"
"\n"
"        Creates a new RAID array on the block devices specified by\n"
"        @blocks. Each element in this array must be an object path to\n"
"        an object implementing the #org.freedesktop.UDisks2.Block\n"
"        interface.\n"
"\n"
"        Known and supported values for @level include\n"
"        <quote>raid0</quote>, <quote>raid1</quote>,\n"
"        <quote>raid4</quote>, <quote>raid5</quote>,\n"
"        <quote>raid6</quote> and <quote>raid10</quote>.\n"
"\n"
"        Before the array is created, all devices in @blocks are\n"
"        erased. Once created (but before the method returns), the RAID\n"
"        array will be erased.\n"
"    -->\n"
"    <method name=\"MDRaidCreate\">\n"
"      <arg direction=\"in\" type=\"ao\" name=\"blocks\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"level\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"name\"/>\n"
"      <arg direction=\"in\" type=\"t\" name=\"chunk\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"o\" name=\"resulting_array\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In4\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    ManagerAdaptor(QObject *parent);
    virtual ~ManagerAdaptor();

public: // PROPERTIES
    Q_PROPERTY(QString Version READ version)
    QString version() const;

public Q_SLOTS: // METHODS
    QDBusObjectPath LoopSetup(const QDBusUnixFileDescriptor &fd, const QVariantMap &options);
    QDBusObjectPath MDRaidCreate(const QList<QDBusObjectPath> &blocks, const QString &level, const QString &name, qulonglong chunk, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Partition
 */
class PartitionAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Partition")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Partition\">\n"
"    <!-- prereq: org.freedesktop.UDisks2.Block -->\n"
"    <!-- Number: The number of the partition in the partition table. -->\n"
"    <property access=\"read\" type=\"u\" name=\"Number\"/>\n"
"    <!-- Type: The type of the partition.\n"
"\n"
"         For <literal>dos</literal> partition tables, this string is a\n"
"         hexadecimal number e.g. <literal>0x83</literal> or\n"
"         <literal>0xfd</literal>. For <literal>gpt</literal> partition\n"
"         tables this is the UUID\n"
"         e.g. <literal>ebd0a0a2-b9e5-4433-87c0-68b6b72699c7</literal>.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Type\"/>\n"
"    <!-- Flags: Flags describing the partition.\n"
"\n"
"         Known flags for <literal>dos</literal> partitions include:\n"
"         <variablelist>\n"
"           <varlistentry><term>Bit 7</term><listitem><para>The partition is marked as bootable</para></listitem></varlistentry>\n"
"         </variablelist>\n"
"         Known flags for <literal>gpt</literal> partitions include:\n"
"         <variablelist>\n"
"           <varlistentry><term>Bit 0</term><listitem><para>System partition</para></listitem></varlistentry>\n"
"           <varlistentry><term>Bit 2</term><listitem><para>Legacy BIOS Bootable</para></listitem></varlistentry>\n"
"           <varlistentry><term>Bit 60</term><listitem><para>Read-only</para></listitem></varlistentry>\n"
"           <varlistentry><term>Bit 62</term><listitem><para>Hidden</para></listitem></varlistentry>\n"
"           <varlistentry><term>Bit 63</term><listitem><para>Do not automount</para></listitem></varlistentry>\n"
"         </variablelist>\n"
"    -->\n"
"    <property access=\"read\" type=\"t\" name=\"Flags\"/>\n"
"    <!-- Offset: Offset of partition, in bytes. -->\n"
"    <property access=\"read\" type=\"t\" name=\"Offset\"/>\n"
"    <!-- Size: Size of partition, in bytes. -->\n"
"    <property access=\"read\" type=\"t\" name=\"Size\"/>\n"
"    <!-- Name: Label of partition or blank if not supported or unknown. -->\n"
"    <property access=\"read\" type=\"s\" name=\"Name\"/>\n"
"    <!-- UUID: The UUID of the partition or blank if not supported or unknown. -->\n"
"    <property access=\"read\" type=\"s\" name=\"UUID\"/>\n"
"    <!-- Table:\n"
"         The object path of the #org.freedesktop.UDisks2.PartitionTable\n"
"         object that the partition entry belongs to.\n"
"    -->\n"
"    <property access=\"read\" type=\"o\" name=\"Table\"/>\n"
"    <!-- IsContainer:\n"
"         Set to %TRUE if the partition itself is a container for other\n"
"         partitions.\n"
"\n"
"         For example, for <literal>dos</literal> partition tables,\n"
"         this applies to socalled <emphasis>extended partition</emphasis> (partitions of type\n"
"         <constant>0x05</constant>, <constant>0x0f</constant> or <constant>0x85</constant>)\n"
"         containing socalled <emphasis>logical partitions</emphasis>.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"IsContainer\"/>\n"
"    <!-- IsContained:\n"
"         Set to %TRUE of the partition is contained in another partition.\n"
"         See the #org.freedesktop.UDisks2.Partition:IsContainer property for more information.\n"
"    -->\n"
"    <property access=\"read\" type=\"b\" name=\"IsContained\"/>\n"
"    <!-- SetType:\n"
"         @type: New type to set.\n"
"         @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"         Sets the partition type. See the\n"
"         #org.freedesktop.UDisks2.Partition:Type property for a\n"
"         description of known partition types.\n"
"    -->\n"
"    <method name=\"SetType\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"type\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!-- SetName:\n"
"         @name: New name to set.\n"
"         @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"         Sets the partition name.\n"
"    -->\n"
"    <method name=\"SetName\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"name\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!-- SetFlags:\n"
"         @flags: New flags to set.\n"
"         @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"         Sets the partition flags. See the\n"
"         #org.freedesktop.UDisks2.Partition:Flags property for a\n"
"         description of known flags.\n"
"    -->\n"
"    <method name=\"SetFlags\">\n"
"      <arg direction=\"in\" type=\"t\" name=\"flags\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In1\"/>\n"
"    </method>\n"
"    <!-- Delete:\n"
"         @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"         Deletes the partition.\n"
"    -->\n"
"    <method name=\"Delete\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    PartitionAdaptor(QObject *parent);
    virtual ~PartitionAdaptor();

public: // PROPERTIES
    Q_PROPERTY(qulonglong Flags READ flags)
    qulonglong flags() const;

    Q_PROPERTY(bool IsContained READ isContained)
    bool isContained() const;

    Q_PROPERTY(bool IsContainer READ isContainer)
    bool isContainer() const;

    Q_PROPERTY(QString Name READ name)
    QString name() const;

    Q_PROPERTY(uint Number READ number)
    uint number() const;

    Q_PROPERTY(qulonglong Offset READ offset)
    qulonglong offset() const;

    Q_PROPERTY(qulonglong Size READ size)
    qulonglong size() const;

    Q_PROPERTY(QDBusObjectPath Table READ table)
    QDBusObjectPath table() const;

    Q_PROPERTY(QString Type READ type)
    QString type() const;

    Q_PROPERTY(QString UUID READ uUID)
    QString uUID() const;

public Q_SLOTS: // METHODS
    void Delete(const QVariantMap &options);
    void SetFlags(qulonglong flags, const QVariantMap &options);
    void SetName(const QString &name, const QVariantMap &options);
    void SetType(const QString &type, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.PartitionTable
 */
class PartitionTableAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.PartitionTable")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.PartitionTable\">\n"
"    <!-- prereq: org.freedesktop.UDisks2.Block -->\n"
"    <!-- Type: The type of partition table detected.\n"
"         Known values include:\n"
"         <variablelist>\n"
"           <varlistentry><term>dos</term><listitem><para><ulink url=\"http://en.wikipedia.org/wiki/Master_Boot_Record\">Master Boot Record</ulink></para></listitem></varlistentry>\n"
"           <varlistentry><term>gpt</term><listitem><para><ulink url=\"http://en.wikipedia.org/wiki/GUID_Partition_Table\">GUID Partition Table</ulink></para></listitem></varlistentry>\n"
"         </variablelist>\n"
"         If blank it means that a partition table was detected but its\n"
"         scheme is unknown.\n"
"    -->\n"
"    <property access=\"read\" type=\"s\" name=\"Type\"/>\n"
"    <!--\n"
"        CreatePartition:\n"
"        @offset: The desired offset where the partition should be created, in bytes.\n"
"        @size: The desired size of the partition, in bytes.\n"
"        @type: The type of partition to create (cf. the #org.freedesktop.UDisks2.Partition:Type property) or blank to use the default for the partition table type and OS.\n"
"        @name: The name for the new partition or blank if the partition table do not support names.\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"        @created_partition: An object path to the created block device object implementing the #org.freedesktop.UDisks2.Partition interface.\n"
"\n"
"        Creates a new partition.\n"
"\n"
"        Note that the created partition won't necessarily be created\n"
"        at the exact @offset due to disk geometry and other alignment\n"
"        constraints (e.g. 1MiB alignment).\n"
"\n"
"        The newly created partition may also end up being slightly\n"
"        larger or smaller than the requested @size bytes for the same\n"
"        reasons.\n"
"\n"
"        The newly created partition will be wiped of known filesystem\n"
"        signatures using the\n"
"        <citerefentry><refentrytitle>wipefs</refentrytitle><manvolnum>8</manvolnum></citerefentry>\n"
"        command.\n"
"    -->\n"
"    <method name=\"CreatePartition\">\n"
"      <arg direction=\"in\" type=\"t\" name=\"offset\"/>\n"
"      <arg direction=\"in\" type=\"t\" name=\"size\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"type\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"name\"/>\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <arg direction=\"out\" type=\"o\" name=\"created_partition\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In4\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    PartitionTableAdaptor(QObject *parent);
    virtual ~PartitionTableAdaptor();

public: // PROPERTIES
    Q_PROPERTY(QString Type READ type)
    QString type() const;

public Q_SLOTS: // METHODS
    QDBusObjectPath CreatePartition(qulonglong offset, qulonglong size, const QString &type, const QString &name, const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

/*
 * Adaptor class for interface org.freedesktop.UDisks2.Swapspace
 */
class SwapspaceAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.UDisks2.Swapspace")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.freedesktop.UDisks2.Swapspace\">\n"
"    <!-- prereq: org.freedesktop.UDisks2.Block -->\n"
"    <!-- Active: Set to %TRUE if the device is currently in use by the OS. -->\n"
"    <property access=\"read\" type=\"b\" name=\"Active\"/>\n"
"    <!--\n"
"        Start:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Activates the swap device.\n"
"    -->\n"
"    <method name=\"Start\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"    <!--\n"
"        Stop:\n"
"        @options: Options (currently unused except for <link linkend=\"udisks-std-options\">standard options</link>).\n"
"\n"
"        Deactivates the swap device.\n"
"    -->\n"
"    <method name=\"Stop\">\n"
"      <arg direction=\"in\" type=\"a{sv}\" name=\"options\"/>\n"
"      <annotation value=\"QVariantMap\" name=\"org.qtproject.QtDBus.QtTypeName.In0\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")
public:
    SwapspaceAdaptor(QObject *parent);
    virtual ~SwapspaceAdaptor();

public: // PROPERTIES
    Q_PROPERTY(bool Active READ active)
    bool active() const;

public Q_SLOTS: // METHODS
    void Start(const QVariantMap &options);
    void Stop(const QVariantMap &options);
Q_SIGNALS: // SIGNALS
};

#endif
