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

KIO

  • kio
  • kio
forwardingslavebase.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (c) 2004 Kevin Ottens <ervin@ipsquad.net>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
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#ifndef _FORWARDING_SLAVE_BASE_H_
21#define _FORWARDING_SLAVE_BASE_H_
22
23#include <kio/slavebase.h>
24#include <kio/jobclasses.h>
25
26#include <QtCore/QObject>
27#include <QtCore/QEventLoop>
28
29namespace KIO
30{
31
32class ForwardingSlaveBasePrivate;
33
88class KIO_EXPORT ForwardingSlaveBase : public QObject, public SlaveBase
89{
90Q_OBJECT
91public:
92 ForwardingSlaveBase(const QByteArray &protocol,
93 const QByteArray &poolSocket,
94 const QByteArray &appSocket);
95 virtual ~ForwardingSlaveBase();
96
97 virtual void get(const KUrl &url);
98
99 virtual void put(const KUrl &url, int permissions,
100 JobFlags flags);
101
102 virtual void stat(const KUrl &url);
103
104 virtual void mimetype(const KUrl &url);
105
106 virtual void listDir(const KUrl &url);
107
108 virtual void mkdir(const KUrl &url, int permissions);
109
110 virtual void rename(const KUrl &src, const KUrl &dest, JobFlags flags);
111
112 virtual void symlink(const QString &target, const KUrl &dest,
113 JobFlags flags);
114
115 virtual void chmod(const KUrl &url, int permissions);
116
117 virtual void setModificationTime(const KUrl& url, const QDateTime& mtime);
118
119 virtual void copy(const KUrl &src, const KUrl &dest,
120 int permissions, JobFlags flags);
121
122 virtual void del(const KUrl &url, bool isfile);
123
124protected:
137 virtual bool rewriteUrl(const KUrl &url, KUrl &newURL)=0;
138
149 virtual void prepareUDSEntry(KIO::UDSEntry &entry,
150 bool listing=false) const;
151
156 KUrl processedUrl() const;
157
162 KUrl requestedUrl() const;
163
164private:
165 // KIO::Job
166 Q_PRIVATE_SLOT(d, void _k_slotResult(KJob *job))
167 Q_PRIVATE_SLOT(d, void _k_slotWarning(KJob *job, const QString &msg))
168 Q_PRIVATE_SLOT(d, void _k_slotInfoMessage(KJob *job, const QString &msg))
169 Q_PRIVATE_SLOT(d, void _k_slotTotalSize(KJob *job, qulonglong size))
170 Q_PRIVATE_SLOT(d, void _k_slotProcessedSize(KJob *job, qulonglong size))
171 Q_PRIVATE_SLOT(d, void _k_slotSpeed(KJob *job, unsigned long bytesPerSecond))
172
173 // KIO::SimpleJob subclasses
174 Q_PRIVATE_SLOT(d, void _k_slotRedirection(KIO::Job *job, const KUrl &url))
175
176 // KIO::ListJob
177 Q_PRIVATE_SLOT(d, void _k_slotEntries(KIO::Job *job, const KIO::UDSEntryList &entries))
178
179 // KIO::TransferJob
180 Q_PRIVATE_SLOT(d, void _k_slotData(KIO::Job *job, const QByteArray &data))
181 Q_PRIVATE_SLOT(d, void _k_slotDataReq(KIO::Job *job, QByteArray &data))
182 Q_PRIVATE_SLOT(d, void _k_slotMimetype (KIO::Job *job, const QString &type))
183 Q_PRIVATE_SLOT(d, void _k_slotCanResume (KIO::Job *job, KIO::filesize_t offset))
184
185 friend class ForwardingSlaveBasePrivate;
186 ForwardingSlaveBasePrivate *const d;
187};
188
189}
190
191#endif
KIO::ForwardingSlaveBase
This class should be used as a base for ioslaves acting as a forwarder to other ioslaves.
Definition: forwardingslavebase.h:89
KIO::ForwardingSlaveBase::rewriteUrl
virtual bool rewriteUrl(const KUrl &url, KUrl &newURL)=0
Rewrite an url to its forwarded counterpart.
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KIO::SlaveBase
There are two classes that specifies the protocol between application (job) and kioslave.
Definition: slavebase.h:51
KIO::UDSEntry
Universal Directory Service.
Definition: udsentry.h:59
KJob
KUrl
QList< UDSEntry >
QObject
jobclasses.h
chmod
int chmod(const QString &path, mode_t mode)
mkdir
int mkdir(const QString &pathname, mode_t)
stat
int stat(const QString &path, KDE_struct_stat *buf)
rename
int rename(const QString &in, const QString &out)
KIO
A namespace for KIO globals.
Definition: kbookmarkmenu.h:55
KIO::setModificationTime
SimpleJob * setModificationTime(const KUrl &url, const QDateTime &mtime)
Changes the modification time on a file or directory.
Definition: job.cpp:724
KIO::put
TransferJob * put(const KUrl &url, int permissions, JobFlags flags=DefaultFlags)
Put (a.k.a.
Definition: job.cpp:1700
KIO::listDir
ListJob * listDir(const KUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
List the contents of url, which is assumed to be a directory.
Definition: job.cpp:2735
KIO::get
TransferJob * get(const KUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
Get (a.k.a.
Definition: job.cpp:1369
KIO::mimetype
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
Find mimetype for one file or directory.
Definition: job.cpp:1856
KIO::filesize_t
qulonglong filesize_t
64-bit file size
Definition: global.h:57
KIO::symlink
SimpleJob * symlink(const QString &target, const KUrl &dest, JobFlags flags=DefaultFlags)
Create or move a symlink.
Definition: job.cpp:738
copy
KAction * copy(const QObject *recvr, const char *slot, QObject *parent)
del
KGuiItem del()
slavebase.h
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