File indexing completed on 2024-06-16 03:54:32
0001 /* 0002 SPDX-FileCopyrightText: 2012 Lukáš Tinkl <ltinkl@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SOLID_BACKENDS_UDISKS2_H 0008 #define SOLID_BACKENDS_UDISKS2_H 0009 0010 #include <QCoreApplication> 0011 #include <QDBusAbstractInterface> 0012 #include <QDBusObjectPath> 0013 #include <QDBusPendingReply> 0014 #include <QDBusReply> 0015 #include <QList> 0016 #include <QMap> 0017 #include <QMetaType> 0018 #include <QPointer> 0019 #include <QTimer> 0020 #include <QVariant> 0021 0022 typedef QMap<QString, QVariantMap> VariantMapMap; 0023 Q_DECLARE_METATYPE(VariantMapMap) 0024 0025 typedef QMap<QDBusObjectPath, VariantMapMap> DBUSManagerStruct; 0026 Q_DECLARE_METATYPE(DBUSManagerStruct) 0027 0028 // clang-format off 0029 0030 /* UDisks2 */ 0031 #define UD2_DBUS_SERVICE "org.freedesktop.UDisks2" 0032 #define UD2_DBUS_PATH "/org/freedesktop/UDisks2" 0033 #define UD2_UDI_DISKS_PREFIX "/org/freedesktop/UDisks2" 0034 #define UD2_DBUS_PATH_MANAGER "/org/freedesktop/UDisks2/Manager" 0035 #define UD2_DBUS_PATH_DRIVES "/org/freedesktop/UDisks2/drives" 0036 #define UD2_DBUS_PATH_JOBS "/org/freedesktop/UDisks2/jobs/" 0037 #define UD2_DBUS_PATH_BLOCKDEVICES "/org/freedesktop/UDisks2/block_devices" 0038 #define DBUS_INTERFACE_PROPS "org.freedesktop.DBus.Properties" 0039 #define DBUS_INTERFACE_INTROSPECT "org.freedesktop.DBus.Introspectable" 0040 #define DBUS_INTERFACE_MANAGER "org.freedesktop.DBus.ObjectManager" 0041 #define UD2_DBUS_INTERFACE_BLOCK "org.freedesktop.UDisks2.Block" 0042 #define UD2_DBUS_INTERFACE_DRIVE "org.freedesktop.UDisks2.Drive" 0043 #define UD2_DBUS_INTERFACE_PARTITION "org.freedesktop.UDisks2.Partition" 0044 #define UD2_DBUS_INTERFACE_PARTITIONTABLE "org.freedesktop.UDisks2.PartitionTable" 0045 #define UD2_DBUS_INTERFACE_FILESYSTEM "org.freedesktop.UDisks2.Filesystem" 0046 #define UD2_DBUS_INTERFACE_ENCRYPTED "org.freedesktop.UDisks2.Encrypted" 0047 #define UD2_DBUS_INTERFACE_SWAP "org.freedesktop.UDisks2.Swapspace" 0048 #define UD2_DBUS_INTERFACE_LOOP "org.freedesktop.UDisks2.Loop" 0049 0050 /* errors */ 0051 #define UD2_ERROR_UNAUTHORIZED "org.freedesktop.PolicyKit.Error.NotAuthorized" 0052 #define UD2_ERROR_BUSY "org.freedesktop.UDisks2.Error.DeviceBusy" 0053 #define UD2_ERROR_FAILED "org.freedesktop.UDisks2.Error.Failed" 0054 #define UD2_ERROR_CANCELED "org.freedesktop.UDisks2.Error.Cancelled" 0055 #define UD2_ERROR_INVALID_OPTION "org.freedesktop.UDisks2.Error.OptionNotPermitted" 0056 #define UD2_ERROR_MISSING_DRIVER "org.freedesktop.UDisks2.Error.NotSupported" 0057 0058 #define UD2_ERROR_ALREADY_MOUNTED "org.freedesktop.UDisks2.Error.AlreadyMounted" 0059 #define UD2_ERROR_NOT_MOUNTED "org.freedesktop.UDisks2.Error.NotMounted" 0060 #define UD2_ERROR_MOUNTED_BY_OTHER_USER "org.freedesktop.UDisks2.Error.MountedByOtherUser" 0061 #define UD2_ERROR_ALREADY_UNMOUNTING "org.freedesktop.UDisks2.Error.AlreadyUnmounting" 0062 #define UD2_ERROR_TIMED_OUT "org.freedesktop.UDisks2.Error.Timedout" 0063 #define UD2_ERROR_WOULD_WAKEUP "org.freedesktop.UDisks2.Error.WouldWakeup" 0064 #define UD2_ERROR_ALREADY_CANCELLED "org.freedesktop.UDisks2.Error.AlreadyCancelled" 0065 0066 #define UD2_ERROR_NOT_AUTHORIZED "org.freedesktop.UDisks2.Error.NotAuthorized" 0067 #define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain" 0068 #define UD2_ERROR_NOT_AUTHORIZED_DISMISSED "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed" 0069 0070 #endif // SOLID_BACKENDS_UDISKS2_H