2015-11-02 00:23:22 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Roeland Jago Douma <roeland@owncloud.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2016-10-25 12:00:07 +03:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2015-11-02 00:23:22 +03:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OCSSHAREEJOB_H
|
|
|
|
#define OCSSHAREEJOB_H
|
|
|
|
|
|
|
|
#include "ocsjob.h"
|
2017-04-26 12:38:10 +03:00
|
|
|
|
|
|
|
class QJsonDocument;
|
2015-11-02 00:23:22 +03:00
|
|
|
|
|
|
|
namespace OCC {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The OcsShareeJob class
|
|
|
|
* @ingroup gui
|
|
|
|
*
|
|
|
|
* Fetching sharees from the OCS Sharee API
|
|
|
|
*/
|
|
|
|
class OcsShareeJob : public OcsJob
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-11-11 15:28:20 +03:00
|
|
|
explicit OcsShareeJob(AccountPtr account);
|
2015-11-02 00:23:22 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a list of sharees
|
|
|
|
*
|
|
|
|
* @param path Path to request shares for (default all shares)
|
|
|
|
*/
|
2020-12-03 21:32:21 +03:00
|
|
|
void getSharees(const QString &search, const QString &itemType, int page = 1, int perPage = 50, bool lookup = false);
|
2015-11-02 00:23:22 +03:00
|
|
|
signals:
|
|
|
|
/**
|
|
|
|
* Result of the OCS request
|
|
|
|
*
|
|
|
|
* @param reply The reply
|
|
|
|
*/
|
2017-04-26 12:38:10 +03:00
|
|
|
void shareeJobFinished(const QJsonDocument &reply);
|
2015-11-02 00:23:22 +03:00
|
|
|
|
|
|
|
private slots:
|
2017-04-26 12:38:10 +03:00
|
|
|
void jobDone(const QJsonDocument &reply);
|
2015-11-02 00:23:22 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // OCSSHAREEJOB_H
|