mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Move SyncJournalDB to src/common
This commit is contained in:
parent
5fbed0d1cd
commit
a1f1775d15
56 changed files with 209 additions and 183 deletions
|
@ -31,7 +31,7 @@
|
|||
#include "creds/httpcredentials.h"
|
||||
#include "simplesslerrorhandler.h"
|
||||
#include "syncengine.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "config.h"
|
||||
#include "connectionvalidator.h"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @file c_jhash.h
|
||||
* @file common/c_jhash.h
|
||||
*
|
||||
* @brief Interface of the cynapses jhash implementation
|
||||
*
|
|
@ -1,22 +1,23 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "filesystem.h"
|
||||
#include "checksums.h"
|
||||
#include "syncfileitem.h"
|
||||
#include "propagatorjobs.h"
|
||||
#include "account.h"
|
||||
#include "filesystembase.h"
|
||||
#include "common/checksums.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <qtconcurrentrun.h>
|
|
@ -1,21 +1,24 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "owncloudlib.h"
|
||||
#include "accountfwd.h"
|
||||
#include "ocsynclib.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QByteArray>
|
||||
|
@ -23,29 +26,37 @@
|
|||
|
||||
namespace OCC {
|
||||
|
||||
/**
|
||||
* Tags for checksum headers values.
|
||||
* They are here for being shared between Upload- and Download Job
|
||||
*/
|
||||
static const char checkSumMD5C[] = "MD5";
|
||||
static const char checkSumSHA1C[] = "SHA1";
|
||||
static const char checkSumAdlerC[] = "Adler32";
|
||||
|
||||
class SyncJournalDb;
|
||||
|
||||
/// Creates a checksum header from type and value.
|
||||
QByteArray makeChecksumHeader(const QByteArray &checksumType, const QByteArray &checksum);
|
||||
OCSYNC_EXPORT QByteArray makeChecksumHeader(const QByteArray &checksumType, const QByteArray &checksum);
|
||||
|
||||
/// Parses a checksum header
|
||||
bool parseChecksumHeader(const QByteArray &header, QByteArray *type, QByteArray *checksum);
|
||||
OCSYNC_EXPORT bool parseChecksumHeader(const QByteArray &header, QByteArray *type, QByteArray *checksum);
|
||||
|
||||
/// Convenience for getting the type from a checksum header, null if none
|
||||
QByteArray parseChecksumHeaderType(const QByteArray &header);
|
||||
OCSYNC_EXPORT QByteArray parseChecksumHeaderType(const QByteArray &header);
|
||||
|
||||
/// Checks OWNCLOUD_DISABLE_CHECKSUM_UPLOAD
|
||||
bool uploadChecksumEnabled();
|
||||
OCSYNC_EXPORT bool uploadChecksumEnabled();
|
||||
|
||||
/// Checks OWNCLOUD_CONTENT_CHECKSUM_TYPE (default: SHA1)
|
||||
QByteArray contentChecksumType();
|
||||
OCSYNC_EXPORT QByteArray contentChecksumType();
|
||||
|
||||
|
||||
/**
|
||||
* Computes the checksum of a file.
|
||||
* \ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT ComputeChecksum : public QObject
|
||||
class OCSYNC_EXPORT ComputeChecksum : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -87,7 +98,7 @@ private:
|
|||
* Checks whether a file's checksum matches the expected value.
|
||||
* @ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT ValidateChecksumHeader : public QObject
|
||||
class OCSYNC_EXPORT ValidateChecksumHeader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -118,7 +129,7 @@ private:
|
|||
* Hooks checksum computations into csync.
|
||||
* @ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT CSyncChecksumHook : public QObject
|
||||
class OCSYNC_EXPORT CSyncChecksumHook : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
|
@ -2,6 +2,10 @@
|
|||
# Essentially they could be in the same directory but are separate to
|
||||
# help keep track of the different code licenses.
|
||||
set(common_SOURCES
|
||||
${CMAKE_CURRENT_LIST_DIR}/checksums.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/filesystembase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/ownsql.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/syncjournaldb.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/syncjournalfilerecord.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/utility.cpp
|
||||
)
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
|
@ -22,7 +25,7 @@
|
|||
|
||||
#include "ownsql.h"
|
||||
#include "common/utility.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#define SQLITE_SLEEP_TIME_USEC 100000
|
||||
#define SQLITE_REPEAT_COUNT 20
|
|
@ -1,15 +1,19 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef OWNSQL_H
|
||||
|
@ -20,7 +24,7 @@
|
|||
#include <QObject>
|
||||
#include <QVariant>
|
||||
|
||||
#include "owncloudlib.h"
|
||||
#include "ocsynclib.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
|
@ -28,7 +32,7 @@ namespace OCC {
|
|||
* @brief The SqlDatabase class
|
||||
* @ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT SqlDatabase
|
||||
class OCSYNC_EXPORT SqlDatabase
|
||||
{
|
||||
Q_DISABLE_COPY(SqlDatabase)
|
||||
public:
|
||||
|
@ -56,7 +60,7 @@ private:
|
|||
* @brief The SqlQuery class
|
||||
* @ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT SqlQuery
|
||||
class OCSYNC_EXPORT SqlQuery
|
||||
{
|
||||
Q_DISABLE_COPY(SqlQuery)
|
||||
public:
|
|
@ -1,15 +1,19 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <QCryptographicHash>
|
||||
|
@ -20,17 +24,13 @@
|
|||
#include <QUrl>
|
||||
#include <QDir>
|
||||
|
||||
#include "ownsql.h"
|
||||
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "version.h"
|
||||
#include "filesystem.h"
|
||||
#include "asserts.h"
|
||||
#include "checksums.h"
|
||||
#include "filesystembase.h"
|
||||
#include "common/asserts.h"
|
||||
#include "common/checksums.h"
|
||||
|
||||
#include "std/c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
|
||||
namespace OCC {
|
||||
|
|
@ -1,15 +1,19 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef SYNCJOURNALDB_H
|
||||
|
@ -21,8 +25,8 @@
|
|||
#include <QHash>
|
||||
|
||||
#include "common/utility.h"
|
||||
#include "ownsql.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/ownsql.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
|
||||
namespace OCC {
|
||||
class SyncJournalFileRecord;
|
||||
|
@ -33,7 +37,7 @@ class SyncJournalFileRecord;
|
|||
* This class is thread safe. All public functions lock the mutex.
|
||||
* @ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT SyncJournalDb : public QObject
|
||||
class OCSYNC_EXPORT SyncJournalDb : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -265,10 +269,10 @@ private:
|
|||
QString _journalMode;
|
||||
};
|
||||
|
||||
bool OWNCLOUDSYNC_EXPORT
|
||||
bool OCSYNC_EXPORT
|
||||
operator==(const SyncJournalDb::DownloadInfo &lhs,
|
||||
const SyncJournalDb::DownloadInfo &rhs);
|
||||
bool OWNCLOUDSYNC_EXPORT
|
||||
bool OCSYNC_EXPORT
|
||||
operator==(const SyncJournalDb::UploadInfo &lhs,
|
||||
const SyncJournalDb::UploadInfo &rhs);
|
||||
|
|
@ -1,18 +1,22 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
|
||||
namespace OCC {
|
|
@ -1,15 +1,19 @@
|
|||
/*
|
||||
* 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 library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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.
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef SYNCJOURNALFILERECORD_H
|
||||
|
@ -18,7 +22,7 @@
|
|||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "owncloudlib.h"
|
||||
#include "ocsynclib.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
|
@ -28,7 +32,7 @@ class SyncFileItem;
|
|||
* @brief The SyncJournalFileRecord class
|
||||
* @ingroup libsync
|
||||
*/
|
||||
class OWNCLOUDSYNC_EXPORT SyncJournalFileRecord
|
||||
class OCSYNC_EXPORT SyncJournalFileRecord
|
||||
{
|
||||
public:
|
||||
SyncJournalFileRecord();
|
||||
|
@ -58,11 +62,11 @@ public:
|
|||
QByteArray _checksumHeader;
|
||||
};
|
||||
|
||||
bool OWNCLOUDSYNC_EXPORT
|
||||
bool OCSYNC_EXPORT
|
||||
operator==(const SyncJournalFileRecord &lhs,
|
||||
const SyncJournalFileRecord &rhs);
|
||||
|
||||
class SyncJournalErrorBlacklistRecord
|
||||
class OCSYNC_EXPORT SyncJournalErrorBlacklistRecord
|
||||
{
|
||||
public:
|
||||
enum Category {
|
|
@ -1,4 +1,5 @@
|
|||
project(libcsync)
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
# global needed variables
|
||||
set(APPLICATION_NAME "ocsync")
|
||||
|
||||
|
@ -134,7 +135,7 @@ if(ZLIB_FOUND)
|
|||
endif(ZLIB_FOUND)
|
||||
|
||||
find_package(Qt5Core REQUIRED)
|
||||
qt5_use_modules(${CSYNC_LIBRARY} Core)
|
||||
qt5_use_modules(${CSYNC_LIBRARY} Core Concurrent)
|
||||
|
||||
# For src/common/utility_mac.cpp
|
||||
if (APPLE)
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include "csync_log.h"
|
||||
#include "csync_rename.h"
|
||||
#include "c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
|
||||
|
||||
csync_s::csync_s(const char *localUri, const char *db_file) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "csync_util.h"
|
||||
#include "csync_statedb.h"
|
||||
#include "csync_rename.h"
|
||||
#include "c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
|
||||
#define CSYNC_LOG_CATEGORY_NAME "csync.reconciler"
|
||||
#include "csync_log.h"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "csync_exclude.h"
|
||||
|
||||
#include "c_string.h"
|
||||
#include "c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
#include "c_utf8.h"
|
||||
#include "csync_time.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
#include "csync_util.h"
|
||||
#include "vio/csync_vio.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "vio/csync_vio.h"
|
||||
#include "vio/csync_vio_local.h"
|
||||
#include "csync_statedb.h"
|
||||
#include "std/c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
|
||||
#define CSYNC_LOG_CATEGORY_NAME "csync.vio.main"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "account.h"
|
||||
#include "networkjobs.h"
|
||||
#include <QMessageBox>
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
using namespace QKeychain;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "logger.h"
|
||||
#include "configfile.h"
|
||||
#include "networkjobs.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "syncresult.h"
|
||||
#include "clientproxy.h"
|
||||
#include "syncengine.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "syncresult.h"
|
||||
#include "progressdispatcher.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "clientproxy.h"
|
||||
#include "networkjobs.h"
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "accountmanager.h"
|
||||
#include "filesystem.h"
|
||||
#include "lockwatcher.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
#include <syncengine.h>
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "folderstatusmodel.h"
|
||||
#include "folderman.h"
|
||||
#include "accountstate.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
#include <theme.h>
|
||||
#include <account.h>
|
||||
#include "folderstatusdelegate.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "accountstate.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
#include "wizard/owncloudwizard.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QDir>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "accountstate.h"
|
||||
#include "account.h"
|
||||
#include "accountmanager.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "elidedlabel.h"
|
||||
|
||||
#include "ui_issueswidget.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "notificationwidget.h"
|
||||
#include "QProgressIndicator.h"
|
||||
#include "common/utility.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "accountstate.h"
|
||||
#include "openfilemanager.h"
|
||||
#include "accountmanager.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "folderman.h"
|
||||
#include "folder.h"
|
||||
#include "theme.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "syncengine.h"
|
||||
#include "syncfileitem.h"
|
||||
#include "filesystem.h"
|
||||
|
@ -30,7 +30,7 @@
|
|||
#include "accountstate.h"
|
||||
#include "account.h"
|
||||
#include "capabilities.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
#include "guiutility.h"
|
||||
|
||||
#include <array>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "syncfileitem.h"
|
||||
#include "syncfilestatus.h"
|
||||
#include "ownsql.h"
|
||||
// #include "ownsql.h"
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#include "socketapisocket_mac.h"
|
||||
|
|
|
@ -54,12 +54,8 @@ set(libsync_SRCS
|
|||
syncfileitem.cpp
|
||||
syncfilestatus.cpp
|
||||
syncfilestatustracker.cpp
|
||||
syncjournaldb.cpp
|
||||
syncjournalfilerecord.cpp
|
||||
syncresult.cpp
|
||||
theme.cpp
|
||||
ownsql.cpp
|
||||
checksums.cpp
|
||||
excludedfiles.cpp
|
||||
creds/dummycredentials.cpp
|
||||
creds/abstractcredentials.cpp
|
||||
|
@ -125,9 +121,9 @@ GENERATE_EXPORT_HEADER( ${synclib_NAME}
|
|||
)
|
||||
|
||||
if(TOKEN_AUTH_ONLY)
|
||||
qt5_use_modules(${synclib_NAME} Network Concurrent)
|
||||
qt5_use_modules(${synclib_NAME} Network)
|
||||
else()
|
||||
qt5_use_modules(${synclib_NAME} Widgets Network Concurrent)
|
||||
qt5_use_modules(${synclib_NAME} Widgets Network)
|
||||
endif()
|
||||
|
||||
set_target_properties( ${synclib_NAME} PROPERTIES
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "creds/abstractcredentials.h"
|
||||
#include "capabilities.h"
|
||||
#include "theme.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QLoggingCategory>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "configfile.h"
|
||||
#include "theme.h"
|
||||
#include "common/utility.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include "creds/abstractcredentials.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
|
||||
namespace OCC {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "account.h"
|
||||
#include "theme.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <csync_private.h>
|
||||
#include <csync_rename.h>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
*/
|
||||
|
||||
#include "owncloudpropagator.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "propagatedownload.h"
|
||||
#include "propagateupload.h"
|
||||
#include "propagateremotedelete.h"
|
||||
|
@ -25,7 +25,7 @@
|
|||
#include "configfile.h"
|
||||
#include "common/utility.h"
|
||||
#include "account.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windef.h>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "csync_util.h"
|
||||
#include "syncfileitem.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "bandwidthmanager.h"
|
||||
#include "accountfwd.h"
|
||||
#include "discoveryphase.h"
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
#include "propagatedownload.h"
|
||||
#include "networkjobs.h"
|
||||
#include "account.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
#include "filesystem.h"
|
||||
#include "propagatorjobs.h"
|
||||
#include "checksums.h"
|
||||
#include "asserts.h"
|
||||
#include "common/checksums.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <QNetworkAccessManager>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "propagateremotedelete.h"
|
||||
#include "owncloudpropagator_p.h"
|
||||
#include "account.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
#include "propagateremotemkdir.h"
|
||||
#include "owncloudpropagator_p.h"
|
||||
#include "account.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "propagateremotedelete.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QLoggingCategory>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
#include "propagatorjobs.h"
|
||||
#include "owncloudpropagator_p.h"
|
||||
#include "account.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "filesystem.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
#include <QFile>
|
||||
#include <QStringList>
|
||||
#include <QDir>
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
#include "owncloudpropagator_p.h"
|
||||
#include "networkjobs.h"
|
||||
#include "account.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
#include "filesystem.h"
|
||||
#include "propagatorjobs.h"
|
||||
#include "checksums.h"
|
||||
#include "common/checksums.h"
|
||||
#include "syncengine.h"
|
||||
#include "propagateremotedelete.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QFileInfo>
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
#include "owncloudpropagator_p.h"
|
||||
#include "networkjobs.h"
|
||||
#include "account.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
#include "filesystem.h"
|
||||
#include "propagatorjobs.h"
|
||||
#include "syncengine.h"
|
||||
#include "propagateremotemove.h"
|
||||
#include "propagateremotedelete.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QFileInfo>
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
#include "owncloudpropagator_p.h"
|
||||
#include "networkjobs.h"
|
||||
#include "account.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
#include "filesystem.h"
|
||||
#include "propagatorjobs.h"
|
||||
#include "checksums.h"
|
||||
#include "common/checksums.h"
|
||||
#include "syncengine.h"
|
||||
#include "propagateremotedelete.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QFileInfo>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include "owncloudpropagator_p.h"
|
||||
#include "propagateremotemove.h"
|
||||
#include "common/utility.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "filesystem.h"
|
||||
#include <qfile.h>
|
||||
#include <qdir.h>
|
||||
|
|
|
@ -21,16 +21,10 @@
|
|||
namespace OCC {
|
||||
|
||||
/**
|
||||
* Tags for checksum headers.
|
||||
* They are here for being shared between Upload- and Download Job
|
||||
* Tags for checksum header.
|
||||
* It's 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";
|
||||
|
||||
/**
|
||||
* @brief Declaration of the other propagation jobs
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include "syncengine.h"
|
||||
#include "account.h"
|
||||
#include "owncloudpropagator.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "discoveryphase.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
#include "syncfilestatus.h"
|
||||
|
@ -25,7 +25,7 @@
|
|||
#include "filesystem.h"
|
||||
#include "propagateremotedelete.h"
|
||||
#include "propagatedownload.h"
|
||||
#include "asserts.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "syncfilestatustracker.h"
|
||||
#include "accountfwd.h"
|
||||
#include "discoveryphase.h"
|
||||
#include "checksums.h"
|
||||
#include "common/checksums.h"
|
||||
|
||||
class QProcess;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
|
||||
#include "syncfileitem.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/utility.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
#include "syncfilestatustracker.h"
|
||||
#include "syncengine.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "asserts.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
#include "common/asserts.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef SYNCFILESTATUSTRACKER_H
|
||||
#define SYNCFILESTATUSTRACKER_H
|
||||
|
||||
#include "ownsql.h"
|
||||
// #include "ownsql.h"
|
||||
#include "syncfileitem.h"
|
||||
#include "syncfilestatus.h"
|
||||
#include <map>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
#include "torture.h"
|
||||
|
||||
#include "std/c_jhash.h"
|
||||
#include "common/c_jhash.h"
|
||||
|
||||
#define HASHSTATE 1
|
||||
#define HASHLEN 1
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "logger.h"
|
||||
#include "filesystem.h"
|
||||
#include "syncengine.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QNetworkReply>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <QDir>
|
||||
#include <QString>
|
||||
|
||||
#include "checksums.h"
|
||||
#include "common/checksums.h"
|
||||
#include "networkjobs.h"
|
||||
#include "common/utility.h"
|
||||
#include "filesystem.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "ownsql.h"
|
||||
#include "common/ownsql.h"
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "common/syncjournaldb.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <QtTest>
|
||||
#include "syncenginetestutils.h"
|
||||
#include <syncengine.h>
|
||||
#include <syncjournaldb.h>
|
||||
#include <common/syncjournaldb.h>
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
|
|
Loading…
Reference in a new issue