KNewStuff

core/downloadmanager.h
1 /*
2  SPDX-FileCopyrightText: 2010 Frederik Gladhorn <[email protected]>
3  SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 
8 #ifndef KNSCORE_DownloadManager_H
9 #define KNSCORE_DownloadManager_H
10 
11 #include "knewstuffcore_export.h"
12 #include "entryinternal.h"
13 
14 #if KNEWSTUFFCORE_ENABLE_DEPRECATED_SINCE(5, 79)
15 namespace KNSCore
16 {
17 class DownloadManagerPrivate;
24 class KNEWSTUFFCORE_EXPORT DownloadManager : public QObject
25 {
26  Q_OBJECT
27 
28 public:
29  enum SortOrder {
30  Newest,
31  Alphabetical,
32  Rating,
33  Downloads,
34  };
35 
43  KNEWSTUFF_DEPRECATED_VERSION(5, 79, "Use KNSCore::Cache for details on installed entries, or KNSCore::Engine directly for update and installation functionality")
44  explicit DownloadManager(QObject *parent = nullptr);
45 
52  KNEWSTUFF_DEPRECATED_VERSION(5, 79, "Use KNSCore::Cache for details on installed entries, or KNSCore::Engine directly for update and installation functionality")
53  explicit DownloadManager(const QString &configFile, QObject *parent = nullptr);
54 
58  ~DownloadManager();
59 
63  void search(int page = 0, int pageSize = 100);
64 
69  void checkForUpdates();
70 
77  void checkForInstalled();
78 
83  void installEntry(const EntryInternal &entry);
84 
89  void uninstallEntry(const EntryInternal &entry);
90 
96  void setSearchTerm(const QString &searchTerm);
97 
104  void setSearchOrder(SortOrder order);
105 
113  void fetchEntryById(const QString &id);
114 
115 Q_SIGNALS:
121  void searchResult(const EntryInternal::List &entries);
122 
128  void entryStatusChanged(const EntryInternal &entry);
129 
133  void errorFound(const QString &errorMessage);
134 
135 public Q_SLOTS:
136  void slotProvidersLoaded();
137 
138 private:
139  DownloadManagerPrivate *const d;
140  Q_DISABLE_COPY(DownloadManager)
141 };
142 
143 }
144 #endif
145 #endif
Rating
KNewStuff update checker.
Contains the core functionality for handling interaction with NewStuff providers. ...
KCALUTILS_EXPORT QString errorMessage(const KCalendarCore::Exception &exception)
KNewStuff data entry container.
Definition: entryinternal.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 22:43:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.