KIO

simplejob.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 Stephan Kulow <[email protected]>
4  SPDX-FileCopyrightText: 2000-2013 David Faure <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KIO_SIMPLEJOB_H
10 #define KIO_SIMPLEJOB_H
11 
12 #include "job_base.h"
13 #include <kio/global.h> // filesize_t
14 
15 namespace KIO
16 {
17 
18 class SimpleJobPrivate;
27 class KIOCORE_EXPORT SimpleJob : public KIO::Job
28 {
29  Q_OBJECT
30 
31 public:
32  ~SimpleJob() override;
33 
34 protected:
39  bool doSuspend() override;
40 
45  bool doResume() override;
46 
51  bool doKill() override;
52 
53 public:
58  const QUrl &url() const;
59 
64  virtual void putOnHold();
65 
69  static void removeOnHold();
70 
76  bool isRedirectionHandlingEnabled() const;
77 
86  void setRedirectionHandlingEnabled(bool handle);
87 
88 public Q_SLOTS:
94  void slotError(int, const QString &);
95 
96 protected Q_SLOTS:
101  virtual void slotFinished();
102 
107  virtual void slotWarning(const QString &);
108 
114  virtual void slotMetaData(const KIO::MetaData &_metaData);
115 
116 protected:
124  void storeSSLSessionFromJob(const QUrl &m_redirectionURL);
125 
130  SimpleJob(SimpleJobPrivate &dd);
131 private:
132 
133  Q_DECLARE_PRIVATE(SimpleJob)
134 };
135 
146 KIOCORE_EXPORT SimpleJob *rmdir(const QUrl &url);
147 
157 KIOCORE_EXPORT SimpleJob *chmod(const QUrl &url, int permissions);
158 
167 KIOCORE_EXPORT SimpleJob *chown(const QUrl &url, const QString &owner, const QString &group);
168 
176 KIOCORE_EXPORT SimpleJob *setModificationTime(const QUrl &url, const QDateTime &mtime);
177 
189 KIOCORE_EXPORT SimpleJob *rename(const QUrl &src, const QUrl &dest, JobFlags flags = DefaultFlags);
190 
201 KIOCORE_EXPORT SimpleJob *symlink(const QString &target, const QUrl &dest, JobFlags flags = DefaultFlags);
202 
215 KIOCORE_EXPORT SimpleJob *special(const QUrl &url, const QByteArray &data, JobFlags flags = DefaultFlags);
216 
229 KIOCORE_EXPORT SimpleJob *mount(bool ro, const QByteArray &fstype, const QString &dev, const QString &point, JobFlags flags = DefaultFlags);
230 
240 KIOCORE_EXPORT SimpleJob *unmount(const QString &point, JobFlags flags = DefaultFlags);
241 
251 KIOCORE_EXPORT SimpleJob *http_update_cache(const QUrl &url, bool no_cache, const QDateTime &expireDate);
252 
260 KIOCORE_EXPORT SimpleJob *file_delete(const QUrl &src, JobFlags flags = DefaultFlags);
261 
262 }
263 
264 #endif
KIOCORE_EXPORT SimpleJob * unmount(const QString &point, JobFlags flags=DefaultFlags)
Unmount filesystem.
Definition: simplejob.cpp:391
A namespace for KIO globals.
Definition: authinfo.h:21
KIOCORE_EXPORT SimpleJob * special(const QUrl &url, const QByteArray &data, JobFlags flags=DefaultFlags)
Execute any command that is specific to one slave (protocol).
Definition: simplejob.cpp:374
MetaData is a simple map of key/value strings.
Definition: metadata.h:23
KIOCORE_EXPORT SimpleJob * mount(bool ro, const QByteArray &fstype, const QString &dev, const QString &point, JobFlags flags=DefaultFlags)
Mount filesystem.
Definition: simplejob.cpp:380
Show the progress info GUI, no Resume and no Overwrite.
Definition: job_base.h:270
KIOCORE_EXPORT SimpleJob * rename(const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
Rename a file or directory.
Definition: simplejob.cpp:360
KIOCORE_EXPORT SimpleJob * setModificationTime(const QUrl &url, const QDateTime &mtime)
Changes the modification time on a file or directory.
Definition: simplejob.cpp:353
KIOCORE_EXPORT SimpleJob * symlink(const QString &target, const QUrl &dest, JobFlags flags=DefaultFlags)
Create or move a symlink.
Definition: simplejob.cpp:367
KIOCORE_EXPORT ChmodJob * chmod(const KFileItemList &lstItems, int permissions, int mask, const QString &newOwner, const QString &newGroup, bool recursive, JobFlags flags=DefaultFlags)
Creates a job that changes permissions/ownership on several files or directories, optionally recursiv...
Definition: chmodjob.cpp:273
The base class for all jobs.
Definition: job_base.h:45
KIOCORE_EXPORT SimpleJob * file_delete(const QUrl &src, JobFlags flags=DefaultFlags)
Delete a single file.
Definition: job.cpp:376
KIOCORE_EXPORT SimpleJob * chown(const QUrl &url, const QString &owner, const QString &group)
Changes ownership and group of a file or directory.
Definition: simplejob.cpp:347
KIOCORE_EXPORT SimpleJob * http_update_cache(const QUrl &url, bool no_cache, const QDateTime &expireDate)
HTTP cache update.
Definition: simplejob.cpp:403
KIOCORE_EXPORT SimpleJob * rmdir(const QUrl &url)
Removes a single directory.
Definition: simplejob.cpp:333
A simple job (one url and one command).
Definition: simplejob.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 14 2020 23:00:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.