Changeset View
Changeset View
Standalone View
Standalone View
recentlyused/recentlyused.h
Show All 21 Lines | |||||
22 | #ifndef RECENTLYUSED_H | 22 | #ifndef RECENTLYUSED_H | ||
23 | #define RECENTLYUSED_H | 23 | #define RECENTLYUSED_H | ||
24 | 24 | | |||
25 | #include <KActivities/Stats/ResultModel> | 25 | #include <KActivities/Stats/ResultModel> | ||
26 | #include <kio/slavebase.h> | 26 | #include <kio/slavebase.h> | ||
27 | 27 | | |||
28 | /** | 28 | /** | ||
29 | * Implements recentlyused:/ ioslave | 29 | * Implements recentlyused:/ ioslave | ||
30 | * It uses KActivitiesStats as a backend (as kickoff/kicker do). | 30 | * It uses KActivitiesStats as a backend (as kickoff/kicker do) to retrieve recently accessed | ||
31 | * files or folders. | ||||
32 | * It supports filtering on mimetype (option type), path, date of access or date of access range, activity and agent (meaning application). | ||||
33 | * There are also an order and limit options. | ||||
34 | * | ||||
35 | * There only three path allowed : / /files and /locations. | ||||
36 | * / does not do anything special | ||||
37 | * /files returns only files whose mimetype is known to the KActivity backend | ||||
38 | * /locations returns only folders | ||||
39 | * When /files or /locations are used the option ?type, described below, cannot be used. | ||||
31 | * | 40 | * | ||
32 | * It supports options to filter what is returned through url parameters: | 41 | * It supports options to filter what is returned through url parameters: | ||
33 | * | 42 | * | ||
34 | * ?activity=[activity UUID|any] | 43 | * ?activity=[activity UUID|any] | ||
35 | * | 44 | * | ||
36 | * Allows to filter the resources based on the activity they were used in. | 45 | * Allows to filter the resources based on the activity they were used in. | ||
37 | * Defaults to the current user activity. | 46 | * Defaults to the current user activity. | ||
38 | * any value means include resources from any activity. | 47 | * any value means include resources from any activity. | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
94 | 103 | | |||
95 | protected: | 104 | protected: | ||
96 | void listDir(const QUrl &url) override; | 105 | void listDir(const QUrl &url) override; | ||
97 | void stat(const QUrl &url) override; | 106 | void stat(const QUrl &url) override; | ||
98 | void mimetype(const QUrl &url) override; | 107 | void mimetype(const QUrl &url) override; | ||
99 | 108 | | |||
100 | private: | 109 | private: | ||
101 | KIO::UDSEntry udsEntryFromResource(const QString &resource); | 110 | KIO::UDSEntry udsEntryFromResource(const QString &resource); | ||
111 | KIO::UDSEntry udsEntryForRoot(const QString &dirName); | ||||
102 | }; | 112 | }; | ||
103 | 113 | | |||
104 | #endif | 114 | #endif |