Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/file/file.h
Show All 33 Lines | |||||
34 | #include <qplatformdefs.h> // mode_t | 34 | #include <qplatformdefs.h> // mode_t | ||
35 | #include <config-kioslave-file.h> | 35 | #include <config-kioslave-file.h> | ||
36 | 36 | | |||
37 | #if HAVE_POSIX_ACL | 37 | #if HAVE_POSIX_ACL | ||
38 | #include <sys/acl.h> | 38 | #include <sys/acl.h> | ||
39 | #include <acl/libacl.h> | 39 | #include <acl/libacl.h> | ||
40 | #endif | 40 | #endif | ||
41 | 41 | | |||
42 | #include "file_p.h" | ||||
43 | | ||||
42 | #include <QLoggingCategory> | 44 | #include <QLoggingCategory> | ||
43 | Q_DECLARE_LOGGING_CATEGORY(KIO_FILE) | 45 | Q_DECLARE_LOGGING_CATEGORY(KIO_FILE) | ||
44 | 46 | | |||
45 | class FileProtocol : public QObject, public KIO::SlaveBase | 47 | class FileProtocol : public QObject, public KIO::SlaveBase | ||
46 | { | 48 | { | ||
47 | Q_OBJECT | 49 | Q_OBJECT | ||
48 | public: | 50 | public: | ||
49 | FileProtocol(const QByteArray &pool, const QByteArray &app); | 51 | FileProtocol(const QByteArray &pool, const QByteArray &app); | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 96 | bool createUDSEntry(const QString &filename, const QByteArray &path, KIO::UDSEntry &entry, | |||
95 | short int details); | 97 | short int details); | ||
96 | int setACL(const char *path, mode_t perm, bool _directoryDefault); | 98 | int setACL(const char *path, mode_t perm, bool _directoryDefault); | ||
97 | QString getUserName(KUserId uid) const; | 99 | QString getUserName(KUserId uid) const; | ||
98 | QString getGroupName(KGroupId gid) const; | 100 | QString getGroupName(KGroupId gid) const; | ||
99 | bool deleteRecursive(const QString &path); | 101 | bool deleteRecursive(const QString &path); | ||
100 | 102 | | |||
101 | void fileSystemFreeSpace(const QUrl &url); // KF6 TODO: Turn into virtual method in SlaveBase | 103 | void fileSystemFreeSpace(const QUrl &url); // KF6 TODO: Turn into virtual method in SlaveBase | ||
102 | 104 | | |||
105 | bool execWithElevatedPrivilege(ActionType action, const QVariant &arg1, | ||||
106 | const QVariant &arg2 = QVariant(), | ||||
107 | const QVariant &arg3 = QVariant()); | ||||
103 | private: | 108 | private: | ||
104 | mutable QHash<KUserId, QString> mUsercache; | 109 | mutable QHash<KUserId, QString> mUsercache; | ||
105 | mutable QHash<KGroupId, QString> mGroupcache; | 110 | mutable QHash<KGroupId, QString> mGroupcache; | ||
106 | QFile *mFile; | 111 | QFile *mFile; | ||
112 | bool mUserCanceled; | ||||
107 | }; | 113 | }; | ||
108 | 114 | | |||
109 | #endif | 115 | #endif | ||
dfaure: Why virtual? Nothing inherits from this class, right? |
Why virtual? Nothing inherits from this class, right?