Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-09-07 14:50:01 +0300
committerRoeland Jago Douma <rullzer@owncloud.com>2015-10-15 21:05:47 +0300
commitb293aa762c3b32fe00527647ab5b18b8dbc28541 (patch)
tree5dcab7749603a9f66a75d098051f978100b5ebce /src/gui/sharedialog.h
parentb5e75afc171f79a3fa97dee438dde997e27a5558 (diff)
Split sharing code
There is now a generic OCSJob which must be inherited by other jobs. This is in prepartion for the other OCS job that will come (for the Sharee API endpoint for example). More logic is moved from the sharedialog to the OcsShareJob. So in the GUI code we now only say what we want (a new share, set the password etc). And the code in libsync will make that happen. Error handling is for now still done in the GUI part. For now the ocsjob and ocssharejob live in gui but probabaly we should create a libshare or libocs at some point.
Diffstat (limited to 'src/gui/sharedialog.h')
-rw-r--r--src/gui/sharedialog.h44
1 files changed, 1 insertions, 43 deletions
diff --git a/src/gui/sharedialog.h b/src/gui/sharedialog.h
index fba05f31d..29f1a89fd 100644
--- a/src/gui/sharedialog.h
+++ b/src/gui/sharedialog.h
@@ -15,55 +15,13 @@
#ifndef SHAREDIALOG_H
#define SHAREDIALOG_H
-#include "networkjobs.h"
#include "accountfwd.h"
#include "QProgressIndicator.h"
#include <QDialog>
-#include <QTreeWidgetItem>
+#include <QVariantMap>
namespace OCC {
-/**
- * @brief The OcsShareJob class
- * @ingroup gui
- */
-class OcsShareJob : public AbstractNetworkJob {
- Q_OBJECT
-public:
- explicit OcsShareJob(const QByteArray& verb, const QUrl& url, AccountPtr account, QObject* parent = 0);
-
- void setPostParams(const QList<QPair<QString, QString> >& postParams);
- void addPassStatusCode(int code);
-
-public slots:
- void start() Q_DECL_OVERRIDE;
-signals:
- void jobFinished(QVariantMap reply);
-private slots:
- virtual bool finished() Q_DECL_OVERRIDE;
-private:
- QByteArray _verb;
- QUrl _url;
- QList<QPair<QString, QString> > _postParams;
- QVector<int> _passStatusCodes;
-};
-
-
-class ThumbnailJob : public AbstractNetworkJob {
- Q_OBJECT
-public:
- explicit ThumbnailJob(const QString& path, AccountPtr account, QObject* parent = 0);
-public slots:
- void start() Q_DECL_OVERRIDE;
-signals:
- void jobFinished(int statusCode, QByteArray reply);
-private slots:
- virtual bool finished() Q_DECL_OVERRIDE;
-private:
- QUrl _url;
-};
-
-
namespace Ui {
class ShareDialog;
}