Changeset View
Changeset View
Standalone View
Standalone View
src/drive/drivesfetchjob.h
- This file was copied from src/drive/teamdrivefetchjob.h.
Show All 14 Lines | |||||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU Lesser General Public License for more details. | 17 | * GNU Lesser General Public License for more details. | ||
18 | * | 18 | * | ||
19 | * You should have received a copy of the GNU Lesser General Public | 19 | * You should have received a copy of the GNU Lesser General Public | ||
20 | * License along with this library. If not, see <https://www.gnu.org/licenses/>. | 20 | * License along with this library. If not, see <https://www.gnu.org/licenses/>. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #ifndef KGAPI2_DRIVETEAMDRIVEFETCHJOB_H | 23 | #ifndef KGAPI2_DRIVEDRIVESFETCHJOB_H | ||
24 | #define KGAPI2_DRIVETEAMDRIVEFETCHJOB_H | 24 | #define KGAPI2_DRIVEDRIVESFETCHJOB_H | ||
25 | 25 | | |||
26 | #include "fetchjob.h" | 26 | #include "fetchjob.h" | ||
27 | #include "kgapidrive_export.h" | 27 | #include "kgapidrive_export.h" | ||
28 | 28 | | |||
29 | #include "teamdrivesearchquery.h" | 29 | #include "drivessearchquery.h" | ||
30 | 30 | | |||
31 | namespace KGAPI2 | 31 | namespace KGAPI2 | ||
32 | { | 32 | { | ||
33 | 33 | | |||
34 | namespace Drive | 34 | namespace Drive | ||
35 | { | 35 | { | ||
36 | 36 | | |||
37 | class KGAPIDRIVE_EXPORT TeamdriveFetchJob : public KGAPI2::FetchJob | 37 | class KGAPIDRIVE_EXPORT DrivesFetchJob : public KGAPI2::FetchJob | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | 40 | | |||
41 | /** | 41 | /** | ||
42 | * Maximum number of teamdrives to return. | 42 | * Maximum number of shared drives to return. Acceptable | ||
43 | * values are 1 to 100, inclusive | ||||
43 | * | 44 | * | ||
44 | * Default value if missing is 10. | 45 | * Default value if missing is 10. | ||
45 | * | 46 | * | ||
46 | * This property does not have any effect when fetching a specific event and | 47 | * This property does not have any effect when fetching a specific event and | ||
47 | * can be modified only when the job is not running. | 48 | * can be modified only when the job is not running. | ||
48 | */ | 49 | */ | ||
49 | Q_PROPERTY(int maxResults | 50 | Q_PROPERTY(int maxResults | ||
50 | READ maxResults | 51 | READ maxResults | ||
51 | WRITE setMaxResults) | 52 | WRITE setMaxResults) | ||
52 | 53 | | |||
53 | /** | 54 | /** | ||
54 | * Issue the request as a domain administrator; if set to true, then all | 55 | * Issue the request as a domain administrator; if set to true, then all | ||
55 | * Team Drives of the domain in which the requester is an administrator | 56 | * shared Drives of the domain in which the requester is an administrator | ||
56 | * are returned. | 57 | * are returned. | ||
57 | * | 58 | * | ||
58 | * Default value if missing is false. | 59 | * Default value if missing is false. | ||
59 | * | 60 | * | ||
60 | * This property does not have any effect when fetching a specific event and | 61 | * This property does not have any effect when fetching a specific event and | ||
61 | * can be modified only when the job is not running. | 62 | * can be modified only when the job is not running. | ||
62 | */ | 63 | */ | ||
63 | Q_PROPERTY(bool useDomainAdminAccess | 64 | Q_PROPERTY(bool useDomainAdminAccess | ||
64 | READ useDomainAdminAccess | 65 | READ useDomainAdminAccess | ||
65 | WRITE setUseDomainAdminAccess) | 66 | WRITE setUseDomainAdminAccess) | ||
66 | 67 | | |||
67 | public: | 68 | public: | ||
68 | TeamdriveFetchJob(const TeamdriveSearchQuery &query, const AccountPtr &account, QObject *parent = nullptr); | 69 | DrivesFetchJob(const DrivesSearchQuery &query, const AccountPtr &account, QObject *parent = nullptr); | ||
69 | TeamdriveFetchJob(const AccountPtr &account, QObject *parent = nullptr); | 70 | DrivesFetchJob(const AccountPtr &account, QObject *parent = nullptr); | ||
70 | TeamdriveFetchJob(const QString &teamdriveId, const AccountPtr &account, | 71 | DrivesFetchJob(const QString &drivesId, const AccountPtr &account, | ||
71 | QObject *parent = nullptr); | 72 | QObject *parent = nullptr); | ||
72 | ~TeamdriveFetchJob() override; | 73 | ~DrivesFetchJob() override; | ||
73 | 74 | | |||
74 | int maxResults() const; | 75 | int maxResults() const; | ||
75 | void setMaxResults(int maxResults); | 76 | void setMaxResults(int maxResults); | ||
76 | 77 | | |||
77 | void setUseDomainAdminAccess(bool useDomainAdminAccess); | 78 | void setUseDomainAdminAccess(bool useDomainAdminAccess); | ||
78 | bool useDomainAdminAccess() const; | 79 | bool useDomainAdminAccess() const; | ||
79 | 80 | | |||
80 | void setFields(const QStringList &fields); | 81 | void setFields(const QStringList &fields); | ||
Show All 11 Lines | 89 | private: | |||
92 | 93 | | |||
93 | void applyRequestParameters(QUrl &url); | 94 | void applyRequestParameters(QUrl &url); | ||
94 | }; | 95 | }; | ||
95 | 96 | | |||
96 | } // namespace Drive | 97 | } // namespace Drive | ||
97 | 98 | | |||
98 | } // namespace KGAPI2 | 99 | } // namespace KGAPI2 | ||
99 | 100 | | |||
100 | #endif // KGAPI2_DRIVETEAMDRIVEFETCHJOB_H | 101 | #endif // KGAPI2_DRIVEDRIVESFETCHJOB_H |