1 | /* |
2 | Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either |
7 | version 2.1 of the License, or (at your option) version 3, or any |
8 | later version accepted by the membership of KDE e.V. (or its |
9 | successor approved by the membership of KDE e.V.), which shall |
10 | act as a proxy defined in Section 6 of version 3 of the license. |
11 | |
12 | This library is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | Lesser General Public License for more details. |
16 | |
17 | You should have received a copy of the GNU Lesser General Public |
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. |
19 | */ |
20 | |
21 | #ifndef SOLID_BACKENDS_UDISKS2_H |
22 | #define SOLID_BACKENDS_UDISKS2_H |
23 | |
24 | #include <QMetaType> |
25 | #include <QtDBus> |
26 | #include <QVariant> |
27 | #include <QMap> |
28 | #include <QList> |
29 | |
30 | typedef QList<QByteArray> QByteArrayList; |
31 | Q_DECLARE_METATYPE(QByteArrayList) |
32 | |
33 | typedef QMap<QString,QVariantMap> QVariantMapMap; |
34 | Q_DECLARE_METATYPE(QVariantMapMap) |
35 | |
36 | typedef QMap<QDBusObjectPath, QVariantMapMap> DBUSManagerStruct; |
37 | Q_DECLARE_METATYPE(DBUSManagerStruct) |
38 | |
39 | /* UDisks2 */ |
40 | #define UD2_DBUS_SERVICE "org.freedesktop.UDisks2" |
41 | #define UD2_DBUS_PATH "/org/freedesktop/UDisks2" |
42 | #define UD2_UDI_DISKS_PREFIX "/org/freedesktop/UDisks2" |
43 | #define UD2_DBUS_PATH_MANAGER "/org/freedesktop/UDisks2/Manager" |
44 | #define UD2_DBUS_PATH_DRIVES "/org/freedesktop/UDisks2/drives/" |
45 | #define UD2_DBUS_PATH_JOBS "/org/freedesktop/UDisks2/jobs/" |
46 | #define DBUS_INTERFACE_PROPS "org.freedesktop.DBus.Properties" |
47 | #define DBUS_INTERFACE_INTROSPECT "org.freedesktop.DBus.Introspectable" |
48 | #define DBUS_INTERFACE_MANAGER "org.freedesktop.DBus.ObjectManager" |
49 | #define UD2_DBUS_INTERFACE_BLOCK "org.freedesktop.UDisks2.Block" |
50 | #define UD2_DBUS_INTERFACE_DRIVE "org.freedesktop.UDisks2.Drive" |
51 | #define UD2_DBUS_INTERFACE_PARTITION "org.freedesktop.UDisks2.Partition" |
52 | #define UD2_DBUS_INTERFACE_PARTITIONTABLE "org.freedesktop.UDisks2.PartitionTable" |
53 | #define UD2_DBUS_INTERFACE_FILESYSTEM "org.freedesktop.UDisks2.Filesystem" |
54 | #define UD2_DBUS_INTERFACE_ENCRYPTED "org.freedesktop.UDisks2.Encrypted" |
55 | #define UD2_DBUS_INTERFACE_SWAP "org.freedesktop.UDisks2.Swapspace" |
56 | #define UD2_DBUS_INTERFACE_LOOP "org.freedesktop.UDisks2.Loop" |
57 | |
58 | /* errors */ |
59 | #define UD2_ERROR_UNAUTHORIZED "org.freedesktop.PolicyKit.Error.NotAuthorized" |
60 | #define UD2_ERROR_BUSY "org.freedesktop.UDisks2.Error.DeviceBusy" |
61 | #define UD2_ERROR_FAILED "org.freedesktop.UDisks2.Error.Failed" |
62 | #define UD2_ERROR_CANCELED "org.freedesktop.UDisks2.Error.Cancelled" |
63 | #define UD2_ERROR_INVALID_OPTION "org.freedesktop.UDisks2.Error.OptionNotPermitted" |
64 | #define UD2_ERROR_MISSING_DRIVER "org.freedesktop.UDisks2.Error.NotSupported" |
65 | |
66 | #define UD2_ERROR_ALREADY_MOUNTED "org.freedesktop.UDisks2.Error.AlreadyMounted" |
67 | #define UD2_ERROR_NOT_MOUNTED "org.freedesktop.UDisks2.Error.NotMounted" |
68 | #define UD2_ERROR_MOUNTED_BY_OTHER_USER "org.freedesktop.UDisks2.Error.MountedByOtherUser" |
69 | #define UD2_ERROR_ALREADY_UNMOUNTING "org.freedesktop.UDisks2.Error.AlreadyUnmounting" |
70 | #define UD2_ERROR_TIMED_OUT "org.freedesktop.UDisks2.Error.Timedout" |
71 | #define UD2_ERROR_WOULD_WAKEUP "org.freedesktop.UDisks2.Error.WouldWakeup" |
72 | #define UD2_ERROR_ALREADY_CANCELLED "org.freedesktop.UDisks2.Error.AlreadyCancelled" |
73 | |
74 | #define UD2_ERROR_NOT_AUTHORIZED "org.freedesktop.UDisks2.Error.NotAuthorized" |
75 | #define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain" |
76 | #define UD2_ERROR_NOT_AUTHORIZED_DISMISSED "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed" |
77 | |
78 | #endif // SOLID_BACKENDS_UDISKS2_H |
79 | |