2014-02-18 14:52:38 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Olivier Goffart <ogoffart@owncloud.com>
|
|
|
|
* Copyright (C) by Klaas Freitag <freitag@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; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "owncloudpropagator.h"
|
|
|
|
#include <QFile>
|
|
|
|
#include <qdebug.h>
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
namespace OCC {
|
2014-02-18 14:52:38 +04:00
|
|
|
|
2015-05-15 11:50:13 +03:00
|
|
|
/**
|
|
|
|
* 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";
|
|
|
|
|
2015-06-26 18:07:47 +03:00
|
|
|
/*!
|
|
|
|
* \brief Declaration of the other propagation jobs
|
|
|
|
* \ingroup libsync
|
2015-05-15 11:50:13 +03:00
|
|
|
*/
|
2014-02-18 14:52:38 +04:00
|
|
|
class PropagateLocalRemove : public PropagateItemJob {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-04-15 16:19:11 +03:00
|
|
|
PropagateLocalRemove (OwncloudPropagator* propagator,const SyncFileItemPtr& item) : PropagateItemJob(propagator, item) {}
|
2014-07-10 01:22:28 +04:00
|
|
|
void start() Q_DECL_OVERRIDE;
|
2014-02-18 14:52:38 +04:00
|
|
|
};
|
2015-06-26 18:07:47 +03:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief The PropagateLocalMkdir class
|
|
|
|
* \ingroup libsync
|
|
|
|
*/
|
2014-02-18 14:52:38 +04:00
|
|
|
class PropagateLocalMkdir : public PropagateItemJob {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-04-15 16:19:11 +03:00
|
|
|
PropagateLocalMkdir (OwncloudPropagator* propagator,const SyncFileItemPtr& item) : PropagateItemJob(propagator, item) {}
|
2014-07-10 01:22:28 +04:00
|
|
|
void start() Q_DECL_OVERRIDE;
|
2014-05-23 20:54:35 +04:00
|
|
|
|
2014-02-18 14:52:38 +04:00
|
|
|
};
|
2015-06-26 18:07:47 +03:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief The PropagateLocalRename class
|
|
|
|
* \ingroup libsync
|
|
|
|
*/
|
2014-02-18 14:52:38 +04:00
|
|
|
class PropagateLocalRename : public PropagateItemJob {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-04-15 16:19:11 +03:00
|
|
|
PropagateLocalRename (OwncloudPropagator* propagator,const SyncFileItemPtr& item) : PropagateItemJob(propagator, item) {}
|
2014-07-10 01:22:28 +04:00
|
|
|
void start() Q_DECL_OVERRIDE;
|
2014-11-18 19:35:31 +03:00
|
|
|
JobParallelism parallelism() Q_DECL_OVERRIDE { return WaitForFinishedInParentDirectory; }
|
2014-04-29 18:47:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-02-18 14:52:38 +04:00
|
|
|
}
|