KIO::SimpleJob

Search for usage in LXR

#include <KIO/SimpleJob>

Inheritance diagram for KIO::SimpleJob:

Public Slots

void slotError (int, const QString &)
 
- Public Slots inherited from KJob
bool kill (KillVerbosity verbosity=Quietly)
 
bool resume ()
 
bool suspend ()
 

Public Member Functions

bool isRedirectionHandlingEnabled () const
 
virtual void putOnHold ()
 
void setRedirectionHandlingEnabled (bool handle)
 
const QUrlurl () const
 
- Public Member Functions inherited from KIO::Job
void addMetaData (const QMap< QString, QString > &values)
 
void addMetaData (const QString &key, const QString &value)
 
QStringList detailedErrorStrings (const QUrl *reqUrl=nullptr, int method=-1) const
 
QString errorString () const override
 
void mergeMetaData (const QMap< QString, QString > &values)
 
MetaData metaData () const
 
MetaData outgoingMetaData () const
 
JobparentJob () const
 
QString queryMetaData (const QString &key)
 
void setMetaData (const KIO::MetaData &metaData)
 
void setParentJob (Job *parentJob)
 
void setUiDelegateExtension (JobUiDelegateExtension *extension)
 
void start () override
 
KJobUiDelegateui () const
 
JobUiDelegateExtensionuiDelegateExtension () const
 
- Public Member Functions inherited from KCompositeJob
 KCompositeJob (QObject *parent=nullptr)
 
- Public Member Functions inherited from KJob
 KJob (QObject *parent=nullptr)
 
Capabilities capabilities () const
 
int error () const
 
QString errorText () const
 
bool exec ()
 
bool isAutoDelete () const
 
bool isFinishedNotificationHidden () const
 
bool isStartedWithExec () const
 
bool isSuspended () const
 
unsigned long percent () const
 
Q_SCRIPTABLE qulonglong processedAmount (Unit unit) const
 
void setAutoDelete (bool autodelete)
 
void setFinishedNotificationHidden (bool hide=true)
 
void setUiDelegate (KJobUiDelegate *delegate)
 
Q_SCRIPTABLE qulonglong totalAmount (Unit unit) const
 
KJobUiDelegateuiDelegate () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static void removeOnHold ()
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Protected Slots

virtual void slotFinished ()
 
virtual void slotMetaData (const KIO::MetaData &_metaData)
 
virtual void slotWarning (const QString &)
 
- Protected Slots inherited from KCompositeJob
virtual void slotInfoMessage (KJob *job, const QString &plain, const QString &rich)
 
virtual void slotResult (KJob *job)
 

Protected Member Functions

 SimpleJob (SimpleJobPrivate &dd)
 
bool doKill () override
 
bool doResume () override
 
bool doSuspend () override
 
void storeSSLSessionFromJob (const QUrl &m_redirectionURL)
 
- Protected Member Functions inherited from KIO::Job
 Job (JobPrivate &dd)
 
bool addSubjob (KJob *job) override
 
bool removeSubjob (KJob *job) override
 
- Protected Member Functions inherited from KCompositeJob
void clearSubjobs ()
 
bool hasSubjobs () const
 
const QList< KJob * > & subjobs () const
 
- Protected Member Functions inherited from KJob
void emitPercent (qulonglong processedAmount, qulonglong totalAmount)
 
void emitResult ()
 
void emitSpeed (unsigned long speed)
 
bool isFinished () const
 
void setCapabilities (Capabilities capabilities)
 
void setError (int errorCode)
 
void setErrorText (const QString &errorText)
 
void setPercent (unsigned long percentage)
 
void setProcessedAmount (Unit unit, qulonglong amount)
 
void setProgressUnit (Unit unit)
 
void setTotalAmount (Unit unit, qulonglong amount)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Types inherited from KJob
typedef QFlags< CapabilityCapabilities
 
enum  Capability
 
enum  Unit
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from KIO::Job
void canceled (KJob *job)
 
void connected (KIO::Job *job)
 
- Signals inherited from KJob
void description (KJob *job, const QString &title, const QPair< QString, QString > &field1=QPair< QString, QString >(), const QPair< QString, QString > &field2=QPair< QString, QString >())
 
void finished (KJob *job)
 
void infoMessage (KJob *job, const QString &plain, const QString &rich=QString())
 
void percent (KJob *job, unsigned long percent)
 
void percentChanged (KJob *job, unsigned long percent)
 
void processedAmount (KJob *job, KJob::Unit unit, qulonglong amount)
 
void processedAmountChanged (KJob *job, KJob::Unit unit, qulonglong amount)
 
void processedSize (KJob *job, qulonglong size)
 
void result (KJob *job)
 
void resumed (KJob *job)
 
void speed (KJob *job, unsigned long speed)
 
void suspended (KJob *job)
 
void totalAmount (KJob *job, KJob::Unit unit, qulonglong amount)
 
void totalAmountChanged (KJob *job, KJob::Unit unit, qulonglong amount)
 
void totalSize (KJob *job, qulonglong size)
 
void warning (KJob *job, const QString &plain, const QString &rich=QString())
 
- Public Attributes inherited from KJob
 Bytes
 
 Directories
 
 Files
 
 Items
 
 Killable
 
 NoCapabilities
 
 Suspendable
 
 UnitsCount
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Attributes inherited from KIO::Job
JobPrivate *const d_ptr
 

Detailed Description

A simple job (one url and one command). This is the base class for all jobs that are scheduled. Other jobs are high-level jobs (CopyJob, DeleteJob, FileCopyJob...) that manage subjobs but aren't scheduled directly.

Definition at line 26 of file simplejob.h.

Constructor & Destructor Documentation

◆ SimpleJob()

SimpleJob::SimpleJob ( SimpleJobPrivate &  dd)
protected

Creates a new simple job.

You don't need to use this constructor, unless you create a new job that inherits from SimpleJob.

Definition at line 20 of file simplejob.cpp.

Member Function Documentation

◆ doKill()

bool SimpleJob::doKill ( )
overrideprotectedvirtual

Abort job.

This kills all subjobs and deletes the job.

Reimplemented from KIO::Job.

Definition at line 40 of file simplejob.cpp.

◆ doResume()

bool SimpleJob::doResume ( )
overrideprotectedvirtual

Resume this job.

See also
suspend

Reimplemented from KIO::Job.

Reimplemented in KIO::TransferJob.

Definition at line 61 of file simplejob.cpp.

◆ doSuspend()

bool SimpleJob::doSuspend ( )
overrideprotectedvirtual

Suspend this job.

See also
resume

Reimplemented from KIO::Job.

Definition at line 52 of file simplejob.cpp.

◆ isRedirectionHandlingEnabled()

bool SimpleJob::isRedirectionHandlingEnabled ( ) const

Returns true when redirections are handled internally, the default.

Since
4.4

Definition at line 92 of file simplejob.cpp.

◆ putOnHold()

void SimpleJob::putOnHold ( )
virtual

Abort job.

Suspends slave to be reused by another job for the same request.

Definition at line 75 of file simplejob.cpp.

◆ removeOnHold()

void SimpleJob::removeOnHold ( )
static

Discard suspended slave.

Definition at line 87 of file simplejob.cpp.

◆ setRedirectionHandlingEnabled()

void SimpleJob::setRedirectionHandlingEnabled ( bool  handle)

Set handle to false to prevent the internal handling of redirections.

When this flag is set, redirection requests are simply forwarded to the caller instead of being handled internally.

Since
4.4

Definition at line 97 of file simplejob.cpp.

◆ slotError

void SimpleJob::slotError ( int  err,
const QString errorText 
)
slot

Called on a slave's error. Made public for the scheduler.

Definition at line 237 of file simplejob.cpp.

◆ slotFinished

void SimpleJob::slotFinished ( )
protectedvirtualslot

Called when the slave marks the job as finished.

Reimplemented in KIO::EmptyTrashJob.

Definition at line 200 of file simplejob.cpp.

◆ slotMetaData

void SimpleJob::slotMetaData ( const KIO::MetaData _metaData)
protectedvirtualslot

MetaData from the slave is received.

Parameters
_metaDatathe meta data
See also
metaData()

Definition at line 299 of file simplejob.cpp.

◆ slotWarning

void SimpleJob::slotWarning ( const QString errorText)
protectedvirtualslot

Called on a slave's warning.

Definition at line 249 of file simplejob.cpp.

◆ storeSSLSessionFromJob()

void SimpleJob::storeSSLSessionFromJob ( const QUrl m_redirectionURL)
protected

Allow jobs that inherit SimpleJob and are aware of redirections to store the SSL session used.

Retrieval is handled by SimpleJob::start

Parameters
m_redirectionURLReference to redirection URL, used instead of m_url if not empty

Definition at line 320 of file simplejob.cpp.

◆ url()

const QUrl & SimpleJob::url ( ) const

Returns the SimpleJob's URL.

Returns
the url

Definition at line 70 of file simplejob.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 04:20:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.