• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • KIO
  • FileJob
Signals | Public Member Functions | Protected Member Functions | List of all members
KIO::FileJob Class Reference

#include <filejob.h>

Inheritance diagram for KIO::FileJob:
KIO::SimpleJob KIO::Job KCompositeJob KJob QObject

Signals

void close (KIO::Job *job)
 
void data (KIO::Job *job, const QByteArray &data)
 
void mimetype (KIO::Job *job, const QString &type)
 
void open (KIO::Job *job)
 
void position (KIO::Job *job, KIO::filesize_t offset)
 
void redirection (KIO::Job *job, const KUrl &url)
 
void written (KIO::Job *job, KIO::filesize_t written)
 
- 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=qMakePair(QString(), QString()), const QPair< QString, QString > &field2=qMakePair(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 processedAmount (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 totalSize (KJob *job, qulonglong size)
 
void warning (KJob *job, const QString &plain, const QString &rich=QString())
 

Public Member Functions

 ~FileJob ()
 
void close ()
 
void read (KIO::filesize_t size)
 
void seek (KIO::filesize_t offset)
 
KIO::filesize_t size ()
 
void write (const QByteArray &data)
 
- Public Member Functions inherited from KIO::SimpleJob
 ~SimpleJob ()
 
bool isRedirectionHandlingEnabled () const
 
virtual void putOnHold ()
 
void setRedirectionHandlingEnabled (bool handle)
 
const KUrl & url () const
 
- Public Member Functions inherited from KIO::Job
virtual ~Job ()
 
void addMetaData (const QMap< QString, QString > &values)
 
void addMetaData (const QString &key, const QString &value)
 
QStringList detailedErrorStrings (const KUrl *reqUrl=0L, int method=-1) const
 
QString errorString () const
 
bool isInteractive () const
 
void mergeMetaData (const QMap< QString, QString > &values)
 
MetaData metaData () const
 
MetaData outgoingMetaData () const
 
Job * parentJob () const
 
QString queryMetaData (const QString &key)
 
void setMetaData (const KIO::MetaData &metaData)
 
void setParentJob (Job *parentJob)
 
void showErrorDialog (QWidget *parent=0)
 
void start ()
 
JobUiDelegate * ui () const
 
- Public Member Functions inherited from KCompositeJob
 KCompositeJob (QObject *parent=0)
 
virtual ~KCompositeJob ()
 
- Public Member Functions inherited from KJob
 KJob (QObject *parent=0)
 
virtual ~KJob ()
 
Capabilities capabilities () const
 
int error () const
 
virtual QString errorString () const
 
QString errorText () const
 
bool exec ()
 
bool isAutoDelete () const
 
bool isSuspended () const
 
unsigned long percent () const
 
qulonglong processedAmount (Unit unit) const
 
void setAutoDelete (bool autodelete)
 
void setUiDelegate (KJobUiDelegate *delegate)
 
virtual void start ()=0
 
qulonglong totalAmount (Unit unit) const
 
KJobUiDelegate * uiDelegate () const
 

Protected Member Functions

 FileJob (FileJobPrivate &dd)
 
- Protected Member Functions inherited from KIO::SimpleJob
 SimpleJob (SimpleJobPrivate &dd)
 
virtual bool doKill ()
 
virtual bool doResume ()
 
virtual bool doSuspend ()
 
void storeSSLSessionFromJob (const KUrl &m_redirectionURL)
 
- Protected Member Functions inherited from KIO::Job
 Job ()
 
 Job (JobPrivate &dd)
 
virtual bool addSubjob (KJob *job)
 
virtual bool doKill ()
 
virtual bool doResume ()
 
virtual bool doSuspend ()
 
virtual bool removeSubjob (KJob *job)
 
- Protected Member Functions inherited from KCompositeJob
 KCompositeJob (KCompositeJobPrivate &dd, QObject *parent)
 
virtual bool addSubjob (KJob *job)
 
void clearSubjobs ()
 
bool hasSubjobs ()
 
virtual bool removeSubjob (KJob *job)
 
const QList< KJob * > & subjobs () const
 
- Protected Member Functions inherited from KJob
 KJob (KJobPrivate &dd, QObject *parent)
 
virtual bool doKill ()
 
virtual bool doResume ()
 
virtual bool doSuspend ()
 
void emitPercent (qulonglong processedAmount, qulonglong totalAmount)
 
void emitResult ()
 
void emitSpeed (unsigned long speed)
 
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 setTotalAmount (Unit unit, qulonglong amount)
 

Additional Inherited Members

- Public Types inherited from KJob
enum  Capability
 
enum  KillVerbosity
 
enum  Unit
 
- Public Slots inherited from KIO::SimpleJob
void slotError (int, const QString &)
 
- Public Slots inherited from KJob
bool kill (KillVerbosity verbosity=Quietly)
 
bool resume ()
 
bool suspend ()
 
- Static Public Member Functions inherited from KIO::SimpleJob
static void removeOnHold ()
 
- Public Attributes inherited from KJob
 Bytes
 
 Directories
 
 EmitResult
 
 Files
 
 Killable
 
 KilledJobError
 
 NoCapabilities
 
 NoError
 
 Quietly
 
 Suspendable
 
 UserDefinedError
 
- Protected Slots inherited from KIO::SimpleJob
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 Attributes inherited from KJob
KJobPrivate *const d_ptr
 

Detailed Description

The file-job is an asynchronious version of normal file handling.

It allows block-wise reading and writing, and allows seeking. Results are returned through signals.

Should always be created using KIO::open(KUrl&)

Definition at line 37 of file filejob.h.

Constructor & Destructor Documentation

◆ ~FileJob()

FileJob::~FileJob ( )

Definition at line 78 of file filejob.cpp.

◆ FileJob()

FileJob::FileJob ( FileJobPrivate &  dd)
protected

Definition at line 73 of file filejob.cpp.

Member Function Documentation

◆ close() [1/2]

void FileJob::close ( )

Close.

Closes the file-slave

Definition at line 109 of file filejob.cpp.

◆ close [2/2]

void KIO::FileJob::close ( KIO::Job *  job)
signal

File is closed and will accept no more commands.

Parameters
jobthe job that emitted this signal

◆ data

void KIO::FileJob::data ( KIO::Job *  job,
const QByteArray &  data 
)
signal

Data from the slave has arrived.

Parameters
jobthe job that emitted this signal
datadata received from the slave.

◆ mimetype

void KIO::FileJob::mimetype ( KIO::Job *  job,
const QString &  type 
)
signal

Mimetype determined.

Parameters
jobthe job that emitted this signal
typethe mime type

◆ open

void KIO::FileJob::open ( KIO::Job *  job)
signal

File is open, metadata has been determined and the file-slave is ready to receive commands.

Parameters
jobthe job that emitted this signal

◆ position

void KIO::FileJob::position ( KIO::Job *  job,
KIO::filesize_t  offset 
)
signal

The file has reached this position.

Emitted after seek.

Parameters
jobthe job that emitted this signal
offsetthe new position

◆ read()

void FileJob::read ( KIO::filesize_t  size)

Read block.

The slave emits the data through data().

Parameters
sizethe requested amount of data

Definition at line 82 of file filejob.cpp.

◆ redirection

void KIO::FileJob::redirection ( KIO::Job *  job,
const KUrl &  url 
)
signal

Signals the file is a redirection.

Follow this url manually to reach data

Parameters
jobthe job that emitted this signal
urlthe new URL

◆ seek()

void FileJob::seek ( KIO::filesize_t  offset)

Seek.

The slave emits position()

Parameters
offsetthe position from start to go to

Definition at line 100 of file filejob.cpp.

◆ size()

KIO::filesize_t FileJob::size ( )

Size.

Returns
the file size

Definition at line 118 of file filejob.cpp.

◆ write()

void FileJob::write ( const QByteArray &  data)

Write block.

Parameters
datathe data to write

Definition at line 92 of file filejob.cpp.

◆ written

void KIO::FileJob::written ( KIO::Job *  job,
KIO::filesize_t  written 
)
signal

Bytes written to the file.

Parameters
jobthe job that emitted this signal
writtenbytes written.

The documentation for this class was generated from the following files:
  • filejob.h
  • filejob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal