1 /*
2  * Copyright (C) by Roeland Jago Douma <roeland@owncloud.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12  * for more details.
13  */
14 
15 #ifndef OCSSHAREEJOB_H
16 #define OCSSHAREEJOB_H
17 
18 #include "ocsjob.h"
19 
20 class QJsonDocument;
21 
22 namespace OCC {
23 
24 /**
25  * @brief The OcsShareeJob class
26  * @ingroup gui
27  *
28  * Fetching sharees from the OCS Sharee API
29  */
30 class OcsShareeJob : public OcsJob
31 {
32     Q_OBJECT
33 public:
34     explicit OcsShareeJob(AccountPtr account);
35 
36     /**
37      * Get a list of sharees
38      *
39      * @param path Path to request shares for (default all shares)
40      */
41     void getSharees(const QString &search, const QString &itemType, int page = 1, int perPage = 50, bool lookup = false);
42 signals:
43     /**
44      * Result of the OCS request
45      *
46      * @param reply The reply
47      */
48     void shareeJobFinished(const QJsonDocument &reply);
49 
50 private slots:
51     void jobDone(const QJsonDocument &reply);
52 };
53 }
54 
55 #endif // OCSSHAREEJOB_H
56