KIO
forwardingworkerbase.cpp
29 ForwardingWorkerBasePrivate(const QByteArray &protocol, QObject *eventLoopParent, ForwardingWorkerBase *qq)
74 // These are intentionally private to force us to go through [[nodiscard]] helper functions, lest we forget to retrieve the result.
79ForwardingWorkerBase::ForwardingWorkerBase(const QByteArray &protocol, const QByteArray &poolSocket, const QByteArray &appSocket)
102void ForwardingWorkerBase::adjustUDSEntry(KIO::UDSEntry &entry, UDSEntryCreationMode creationMode) const
250WorkerResult ForwardingWorkerBase::symlink(const QString &target, const QUrl &dest, JobFlags flags)
288WorkerResult ForwardingWorkerBase::copy(const QUrl &src, const QUrl &dest, int permissions, JobFlags flags)
358 q->connect(job, SIGNAL(redirection(KIO::Job *, QUrl)), SLOT(_k_slotRedirection(KIO::Job *, QUrl)));
365 q->connect(job, &KIO::ListJob::entries, q, [this](KIO::Job *job, const KIO::UDSEntryList &entries) {
379 q->connect(job, &KIO::TransferJob::mimeTypeFound, q, [this](KIO::Job *job, const QString &mimeType) {
382 q->connect(job, &KIO::TransferJob::canResume, q, [this](KIO::Job *job, KIO::filesize_t offset) {
425void ForwardingWorkerBasePrivate::_k_slotSpeed(KJob * /*job*/, unsigned long bytesPerSecond) const
441void ForwardingWorkerBasePrivate::_k_slotEntries(KIO::Job * /*job*/, const KIO::UDSEntryList &entries) const
468void ForwardingWorkerBasePrivate::_k_slotCanResume(KIO::Job * /*job*/, KIO::filesize_t offset) const
WorkerResult mimetype(const QUrl &url) override
Finds MIME type for one file or directory.
Definition forwardingworkerbase.cpp:196
virtual void adjustUDSEntry(KIO::UDSEntry &entry, UDSEntryCreationMode creationMode) const
Adjusts a UDSEntry before it's sent in the reply to the KIO worker endpoint.
Definition forwardingworkerbase.cpp:102
WorkerResult listDir(const QUrl &url) override
Lists the contents of url.
Definition forwardingworkerbase.cpp:208
QUrl processedUrl() const
Return the URL being processed by the KIO worker Only access it inside adjustUDSEntry()
Definition forwardingworkerbase.cpp:150
WorkerResult stat(const QUrl &url) override
Finds all details for one file or directory.
Definition forwardingworkerbase.cpp:184
WorkerResult symlink(const QString &target, const QUrl &dest, JobFlags flags) override
Creates a symbolic link named dest, pointing to target, which may be a relative or an absolute path.
Definition forwardingworkerbase.cpp:250
QUrl requestedUrl() const
Return the URL asked to the KIO worker Only access it inside adjustUDSEntry()
Definition forwardingworkerbase.cpp:155
WorkerResult put(const QUrl &url, int permissions, JobFlags flags) override
put, i.e. write data into a file.
Definition forwardingworkerbase.cpp:172
WorkerResult chmod(const QUrl &url, int permissions) override
Change permissions on url.
Definition forwardingworkerbase.cpp:264
WorkerResult setModificationTime(const QUrl &url, const QDateTime &mtime) override
Sets the modification time for @url.
Definition forwardingworkerbase.cpp:276
UDSEntryCreationMode
Definition forwardingworkerbase.h:108
@ UDSEntryCreationInListDir
The entry is created during a listDir operation.
Definition forwardingworkerbase.h:110
WorkerResult mkdir(const QUrl &url, int permissions) override
Create a directory.
Definition forwardingworkerbase.cpp:220
WorkerResult copy(const QUrl &src, const QUrl &dest, int permissions, JobFlags flags) override
Copy src into dest.
Definition forwardingworkerbase.cpp:288
WorkerResult del(const QUrl &url, bool isfile) override
Delete a file or directory.
Definition forwardingworkerbase.cpp:306
WorkerResult rename(const QUrl &src, const QUrl &dest, JobFlags flags) override
Rename oldname into newname.
Definition forwardingworkerbase.cpp:232
void setMetaData(const KIO::MetaData &metaData)
Set meta data to be sent to the worker, replacing existing meta data.
Definition job.cpp:215
A ListJob is allows you to get the get the content of a directory.
Definition listjob.h:28
void entries(KIO::Job *job, const KIO::UDSEntryList &list)
This signal emits the entry found by the job while listing.
The transfer job pumps data into and/or out of a KIO worker.
Definition transferjob.h:26
void mimeTypeFound(KIO::Job *job, const QString &mimeType)
MIME type determined.
void data(KIO::Job *job, const QByteArray &data)
Data from the worker has arrived.
void canResume(KIO::Job *job, KIO::filesize_t offset)
@ UDS_LOCAL_PATH
A local file path if the KIO worker display files sitting on the local filesystem (but in another hie...
Definition udsentry.h:227
void replace(uint field, const QString &value)
Replace or insert field with string value.
Definition udsentry.cpp:400
WorkerBase is the class to use to implement a worker - simply inherit WorkerBase in your worker.
Definition workerbase.h:82
The result of a worker call When using the Result type always mark the function Q_REQUIRED_RESULT to ...
Definition workerbase.h:36
static WorkerResult fail(int _error=KIO::ERR_UNKNOWN, const QString &_errorString=QString())
Constructs a failure results.
Definition workerbase.cpp:478
int error() const
void processedSize(KJob *job, qulonglong size)
void result(KJob *job)
void warning(KJob *job, const QString &message)
void infoMessage(KJob *job, const QString &message)
void totalSize(KJob *job, qulonglong size)
QString errorText() const
bool kill(KJob::KillVerbosity verbosity=KJob::Quietly)
void setUiDelegate(KJobUiDelegate *delegate)
void speed(KJob *job, unsigned long speed)
KIOCORE_EXPORT ChmodJob * chmod(const KFileItemList &lstItems, int permissions, int mask, const QString &newOwner, const QString &newGroup, bool recursive, JobFlags flags=DefaultFlags)
Creates a job that changes permissions/ownership on several files or directories, optionally recursiv...
Definition chmodjob.cpp:288
KIOCORE_EXPORT DeleteJob * del(const QUrl &src, JobFlags flags=DefaultFlags)
Delete a file or directory.
Definition deletejob.cpp:597
KIOCORE_EXPORT SimpleJob * rmdir(const QUrl &url)
Removes a single directory.
Definition simplejob.cpp:322
KIOCORE_EXPORT MkdirJob * mkdir(const QUrl &url, int permissions=-1)
Creates a single directory.
Definition mkdirjob.cpp:110
KIOCORE_EXPORT SimpleJob * rename(const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
Rename a file or directory.
Definition simplejob.cpp:349
KIOCORE_EXPORT StatJob * stat(const QUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
Definition statjob.cpp:203
KIOCORE_EXPORT ListJob * listDir(const QUrl &url, JobFlags flags=DefaultFlags, ListJob::ListFlags listFlags=ListJob::ListFlag::IncludeHidden)
List the contents of url, which is assumed to be a directory.
Definition listjob.cpp:239
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
Get (means: read).
Definition transferjob.cpp:385
KIOCORE_EXPORT SimpleJob * symlink(const QString &target, const QUrl &dest, JobFlags flags=DefaultFlags)
Create or move a symlink.
Definition simplejob.cpp:356
QList< UDSEntry > UDSEntryList
A directory listing is a list of UDSEntry instances.
Definition udsentry.h:379
KIOCORE_EXPORT MimetypeJob * mimetype(const QUrl &url, JobFlags flags=DefaultFlags)
Find MIME type for one file or directory.
Definition mimetypejob.cpp:82
KIOCORE_EXPORT SimpleJob * setModificationTime(const QUrl &url, const QDateTime &mtime)
Changes the modification time on a file or directory.
Definition simplejob.cpp:342
KIOCORE_EXPORT FileCopyJob * file_copy(const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
Copy a single file.
Definition filecopyjob.cpp:635
KIOCORE_EXPORT TransferJob * put(const QUrl &url, int permissions, JobFlags flags=DefaultFlags)
Put (means: write)
Definition storedtransferjob.cpp:449
pointer data()
int indexOfSignal(const char *signal) const const
QMimeType mimeTypeForUrl(const QUrl &url) const const
name
virtual const QMetaObject * metaObject() const const
bool isEmpty() const const
QString fileName(ComponentFormattingOptions options) const const
QString path(ComponentFormattingOptions options) const const
QString scheme() const const
void setPath(const QString &path, ParsingMode mode)
QString toDisplayString(FormattingOptions options) const const
QString toLocalFile() const const
QString toString(FormattingOptions options) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.