KIO

listjob.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Stephan Kulow <[email protected]>
3  2000-2009 David Faure <[email protected]>
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 as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KIO_LISTJOB_H
22 #define KIO_LISTJOB_H
23 
24 #include "simplejob.h"
25 #include <kio/udsentry.h>
26 
27 namespace KIO
28 {
29 
30 class ListJobPrivate;
40 class KIOCORE_EXPORT ListJob : public SimpleJob
41 {
42  Q_OBJECT
43 
44 public:
45  ~ListJob() override;
46 
52  const QUrl &redirectionUrl() const;
53 
57  void setUnrestricted(bool unrestricted);
58 
59 Q_SIGNALS:
69  void entries(KIO::Job *job, const KIO::UDSEntryList &list); // TODO KDE5: use KIO::ListJob* argument to avoid casting
70 
79  void subError(KIO::ListJob *job, KIO::ListJob *subJob);
80 
88  void redirection(KIO::Job *job, const QUrl &url);
89 
97  void permanentRedirection(KIO::Job *job, const QUrl &fromUrl, const QUrl &toUrl);
98 
99 protected Q_SLOTS:
100  void slotFinished() override;
101  void slotMetaData(const KIO::MetaData &_metaData) override;
102  void slotResult(KJob *job) override;
103 
104 protected:
105  ListJob(ListJobPrivate &dd);
106  Q_DECLARE_PRIVATE(ListJob)
107  friend class ListJobPrivate;
108 };
109 
122 KIOCORE_EXPORT ListJob *listDir(const QUrl &url, JobFlags flags = DefaultFlags,
123  bool includeHidden = true);
124 
138 KIOCORE_EXPORT ListJob *listRecursive(const QUrl &url, JobFlags flags = DefaultFlags,
139  bool includeHidden = true);
140 
141 }
142 
143 #endif
KIOCORE_EXPORT ListJob * listDir(const QUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
List the contents of url, which is assumed to be a directory.
Definition: listjob.cpp:258
A namespace for KIO globals.
Definition: authinfo.h:34
A ListJob is allows you to get the get the content of a directory.
Definition: listjob.h:40
MetaData is a simple map of key/value strings.
Definition: metadata.h:34
Show the progress info GUI, no Resume and no Overwrite.
Definition: job_base.h:282
KIOCORE_EXPORT ListJob * listRecursive(const QUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
The same as the previous method, but recurses subdirectories.
Definition: listjob.cpp:263
The base class for all jobs.
Definition: job_base.h:57
A simple job (one url and one command).
Definition: simplejob.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 23:01:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.