[Pkg-owncloud-commits] [owncloud-client] 125/470: AbstractNetworkJob: Add a delete job.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:24:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 0eb104129003cb64cd8b11a20f74c42c49ede850
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri Mar 4 17:34:48 2016 +0100
AbstractNetworkJob: Add a delete job.
It is needed to easily send delete requests which happen
through the notify API.
---
src/libsync/abstractnetworkjob.cpp | 5 +++++
src/libsync/abstractnetworkjob.h | 1 +
src/libsync/account.cpp | 9 +++++++++
src/libsync/account.h | 1 +
4 files changed, 16 insertions(+)
diff --git a/src/libsync/abstractnetworkjob.cpp b/src/libsync/abstractnetworkjob.cpp
index 60ac96f..c730e14 100644
--- a/src/libsync/abstractnetworkjob.cpp
+++ b/src/libsync/abstractnetworkjob.cpp
@@ -148,6 +148,11 @@ QNetworkReply *AbstractNetworkJob::headRequest(const QUrl &url)
return addTimer(_account->headRequest(url));
}
+QNetworkReply *AbstractNetworkJob::deleteRequest(const QUrl &url)
+{
+ return addTimer(_account->deleteRequest(url));
+}
+
void AbstractNetworkJob::slotFinished()
{
_timer.stop();
diff --git a/src/libsync/abstractnetworkjob.h b/src/libsync/abstractnetworkjob.h
index 039732f..5a4728c 100644
--- a/src/libsync/abstractnetworkjob.h
+++ b/src/libsync/abstractnetworkjob.h
@@ -77,6 +77,7 @@ protected:
QNetworkReply* getRequest(const QUrl &url);
QNetworkReply* headRequest(const QString &relPath);
QNetworkReply* headRequest(const QUrl &url);
+ QNetworkReply* deleteRequest(const QUrl &url);
int maxRedirects() const { return 10; }
virtual bool finished() = 0;
diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp
index 87208a9..75a1f2a 100644
--- a/src/libsync/account.cpp
+++ b/src/libsync/account.cpp
@@ -239,6 +239,15 @@ QNetworkReply *Account::getRequest(const QUrl &url)
return _am->get(request);
}
+QNetworkReply *Account::deleteRequest( const QUrl &url)
+{
+ QNetworkRequest request(url);
+#if QT_VERSION > QT_VERSION_CHECK(4, 8, 4)
+ request.setSslConfiguration(this->getOrCreateSslConfig());
+#endif
+ return _am->deleteResource(request);
+}
+
QNetworkReply *Account::davRequest(const QByteArray &verb, const QString &relPath, QNetworkRequest req, QIODevice *data)
{
return davRequest(verb, concatUrlPath(davUrl(), relPath), req, data);
diff --git a/src/libsync/account.h b/src/libsync/account.h
index bc586c4..dc4240c 100644
--- a/src/libsync/account.h
+++ b/src/libsync/account.h
@@ -111,6 +111,7 @@ public:
QNetworkReply* headRequest(const QUrl &url);
QNetworkReply* getRequest(const QString &relPath);
QNetworkReply* getRequest(const QUrl &url);
+ QNetworkReply* deleteRequest( const QUrl &url);
QNetworkReply* davRequest(const QByteArray &verb, const QString &relPath, QNetworkRequest req, QIODevice *data = 0);
QNetworkReply* davRequest(const QByteArray &verb, const QUrl &url, QNetworkRequest req, QIODevice *data = 0);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list