Baloo

kio_timeline.h
1 /*
2  This file is part of the KDE Baloo Project
3  SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #ifndef KIO_TIMELINE_H_
9 #define KIO_TIMELINE_H_
10 
11 #include <KIO/WorkerBase>
12 
13 #include <QDate>
14 
15 namespace Baloo
16 {
17 
18 class TimelineProtocol : public KIO::WorkerBase
19 {
20 public:
21  TimelineProtocol(const QByteArray& poolSocket, const QByteArray& appSocket);
22  ~TimelineProtocol() override;
23 
24  /**
25  * List all files and folders tagged with the corresponding tag.
26  */
27  KIO::WorkerResult listDir(const QUrl& url) override;
28 
29  /**
30  * Files will be forwarded.
31  * Folders will be created as virtual folders.
32  */
33  KIO::WorkerResult mimetype(const QUrl& url) override;
34 
35  /**
36  * Files will be forwarded.
37  * Folders will be created as virtual folders.
38  */
39  KIO::WorkerResult stat(const QUrl& url) override;
40 
41 private:
42  void listDays(int month, int year);
43  void listThisYearsMonths();
44  bool filesInDate(const QDate& date);
45 
46  /// temp vars for the currently handled URL
47  QDate m_date;
48  QString m_filename;
49 };
50 }
51 
52 #endif // KIO_TIMELINE_H_
KIOCORE_EXPORT MimetypeJob * mimetype(const QUrl &url, JobFlags flags=DefaultFlags)
Implements storage for docIds without any associated data Instantiated for:
Definition: coding.cpp:11
KIOCORE_EXPORT ListJob * listDir(const QUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
int stat(const QString &path, KDE_struct_stat *buf)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 03:56:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.