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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 
27 namespace KIO {
28 
29 class FileJobPrivate;
37 class KIO_EXPORT FileJob : public SimpleJob
38 {
39 Q_OBJECT
40 
41 public:
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 
81 Q_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 
131 protected:
132  FileJob(FileJobPrivate &dd);
133 
134 private:
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::filesize_t
qulonglong filesize_t
64-bit file size
Definition: global.h:57
kurl.h
QByteArray
KIO::mimetype
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
Find mimetype for one file or directory.
Definition: job.cpp:1856
KUrl
KIO::open
FileJob * open(const KUrl &url, QIODevice::OpenMode mode)
Open ( random access I/O )
Definition: filejob.cpp:211
QString
jobclasses.h
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KIO::FileJob
The file-job is an asynchronious version of normal file handling.
Definition: filejob.h:37
close
KAction * close(const QObject *recvr, const char *slot, QObject *parent)
KIO::SimpleJob
A simple job (one url and one command).
Definition: jobclasses.h:322
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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