[Pkg-owncloud-commits] [owncloud-client] 61/175: Propagator: checksum constants go to propatorjobs header.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Aug 8 10:36:27 UTC 2015


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 e18fd62f347293e696005538cc31493ec774a318
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Fri May 15 10:50:13 2015 +0200

    Propagator: checksum constants go to propatorjobs header.
    
    So they can be used from both up- and download propagator jobs.
---
 src/libsync/propagateupload.cpp | 10 +---------
 src/libsync/propagatorjobs.h    | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/libsync/propagateupload.cpp b/src/libsync/propagateupload.cpp
index eb5346c..bdd6a48 100644
--- a/src/libsync/propagateupload.cpp
+++ b/src/libsync/propagateupload.cpp
@@ -44,14 +44,6 @@ const char owncloudShouldSoftCancelPropertyName[] = "owncloud-should-soft-cancel
 namespace OCC {
 
 /**
- * Tags for checksum headers.
- */
-static const char checkSumMD5C[] = "MD5";
-static const char checkSumSHA1C[] = "SHA1";
-static const char checkSumAdlerC[] = "Adler32";
-static const char checkSumAdlerUpperC[] = "ADLER32";
-
-/**
  * We do not want to upload files that are currently being modified.
  * To avoid that, we don't upload files that have a modification time
  * that is too close to the current time.
@@ -503,7 +495,7 @@ void PropagateUploadFileQNAM::startNextChunk()
                 currentChunkSize = chunkSize();
             }
             if( !_item._checksum.isEmpty() ) {
-                headers["OC-Checksum"] = _item._checksum;
+                headers[checkSumHeaderC] = _item._checksum;
             }
         }
     }
diff --git a/src/libsync/propagatorjobs.h b/src/libsync/propagatorjobs.h
index 99343fe..463cb07 100644
--- a/src/libsync/propagatorjobs.h
+++ b/src/libsync/propagatorjobs.h
@@ -21,6 +21,22 @@
 
 namespace OCC {
 
+/**
+ * Tags for checksum headers.
+ * They are here for being shared between Upload- and Download Job
+ */
+
+// the header itself
+static const char checkSumHeaderC[] = "OC-Checksum";
+// ...and it's values
+static const char checkSumMD5C[] = "MD5";
+static const char checkSumSHA1C[] = "SHA1";
+static const char checkSumAdlerC[] = "Adler32";
+static const char checkSumAdlerUpperC[] = "ADLER32";
+
+/**
+ * Declaration of the other propation jobs
+ */
 class PropagateLocalRemove : public PropagateItemJob {
     Q_OBJECT
 public:

-- 
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