diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-11-02 00:23:22 +0300 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-11-04 14:56:06 +0300 |
commit | 6fb4e59120f1fd6cc4a2926bf766d5f9d29ad195 (patch) | |
tree | a04c65ce8cedf919f64413933d154d251938e042 /src/gui/ocsshareejob.cpp | |
parent | 309be57a12e4d6ef4190e0cd1dd2599aae7d9fc0 (diff) |
[Sharing] First step towards proper group sharing
Diffstat (limited to 'src/gui/ocsshareejob.cpp')
-rw-r--r-- | src/gui/ocsshareejob.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/gui/ocsshareejob.cpp b/src/gui/ocsshareejob.cpp new file mode 100644 index 000000000..d62100190 --- /dev/null +++ b/src/gui/ocsshareejob.cpp @@ -0,0 +1,46 @@ +/* + * 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 + * the Free Software Foundation; version 2 of the License. + * + * 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. + */ + +#include "ocsshareejob.h" + +namespace OCC { + +OcsShareeJob::OcsShareeJob(AccountPtr account, QObject *parent) +: OcsJob(account, parent) +{ + setPath("ocs/v1.php/apps/files_sharing/api/v1/sharees"); + connect(this, SIGNAL(jobFinished(QVariantMap)), SLOT(jobDone(QVariantMap))); + +} + +void OcsShareeJob::getSharees(const QString search, + const QString itemType, + int page, + int perPage) +{ + setVerb("GET"); + + addParam(QString::fromLatin1("search"), search); + addParam(QString::fromLatin1("itemType"), itemType); + addParam(QString::fromLatin1("page"), QString::number(page)); + addParam(QString::fromLatin1("perPage"), QString::number(perPage)); + + start(); +} + +void OcsShareeJob::jobDone(const QVariantMap &reply) +{ + emit shareeJobFinished(reply); +} + +} |