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

KIO

  • kio
  • kio
filejob.h
Go to the documentation of this file.
1/*
2 * This file is part of the KDE libraries
3 * Copyright (c) 2006 Allan Sandfeld Jensen <kde@carewolf.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License version 2 as published by the Free Software Foundation.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 *
19 **/
20
21#ifndef KIO_FILEJOB_H
22#define KIO_FILEJOB_H
23
24#include <kurl.h>
25#include <kio/jobclasses.h>
26
27namespace KIO {
28
29class FileJobPrivate;
37class KIO_EXPORT FileJob : public SimpleJob
38{
39Q_OBJECT
40
41public:
42 ~FileJob();
43
50 void read( KIO::filesize_t size );
51
57 void write( const QByteArray &data );
58
64 void close();
65
72 void seek( KIO::filesize_t offset );
73
79 KIO::filesize_t size();
80
81Q_SIGNALS:
87 void data( KIO::Job *job, const QByteArray &data );
88
95 void redirection( KIO::Job *job, const KUrl &url );
96
102 void mimetype( KIO::Job *job, const QString &type );
103
109 void open(KIO::Job *job);
110
116 void written( KIO::Job *job, KIO::filesize_t written);
117
122 void close(KIO::Job *job);
123
129 void position( KIO::Job *job, KIO::filesize_t offset);
130
131protected:
132 FileJob(FileJobPrivate &dd);
133
134private:
135 Q_PRIVATE_SLOT(d_func(), void slotRedirection( const KUrl &url))
136 Q_PRIVATE_SLOT(d_func(), void slotData( const QByteArray &data))
137 Q_PRIVATE_SLOT(d_func(), void slotMimetype( const QString &mimetype ))
138 Q_PRIVATE_SLOT(d_func(), void slotOpen( ))
139 Q_PRIVATE_SLOT(d_func(), void slotWritten( KIO::filesize_t ))
140 Q_PRIVATE_SLOT(d_func(), void slotFinished( ))
141 Q_PRIVATE_SLOT(d_func(), void slotPosition( KIO::filesize_t ))
142 Q_PRIVATE_SLOT(d_func(), void slotTotalSize( KIO::filesize_t ))
143
144 Q_DECLARE_PRIVATE(FileJob)
145};
146
147} // namespace
148
149#endif
KIO::FileJob
The file-job is an asynchronious version of normal file handling.
Definition: filejob.h:38
KIO::FileJob::data
void data(KIO::Job *job, const QByteArray &data)
Data from the slave has arrived.
KIO::FileJob::written
void written(KIO::Job *job, KIO::filesize_t written)
Bytes written to the file.
KIO::FileJob::mimetype
void mimetype(KIO::Job *job, const QString &type)
Mimetype determined.
KIO::FileJob::redirection
void redirection(KIO::Job *job, const KUrl &url)
Signals the file is a redirection.
KIO::FileJob::close
void close(KIO::Job *job)
File is closed and will accept no more commands.
KIO::FileJob::open
void open(KIO::Job *job)
File is open, metadata has been determined and the file-slave is ready to receive commands.
KIO::FileJob::position
void position(KIO::Job *job, KIO::filesize_t offset)
The file has reached this position.
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KIO::SimpleJob
A simple job (one url and one command).
Definition: jobclasses.h:322
KUrl
jobclasses.h
kurl.h
KIO
A namespace for KIO globals.
Definition: kbookmarkmenu.h:55
KIO::filesize_t
qulonglong filesize_t
64-bit file size
Definition: global.h:57
close
KAction * close(const QObject *recvr, const char *slot, QObject *parent)
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