2012-02-15 12:30:37 +04:00
|
|
|
#ifndef CSYNCFOLDER_H
|
|
|
|
#define CSYNCFOLDER_H
|
|
|
|
|
2011-04-07 21:04:07 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
2012-02-15 12:30:37 +04:00
|
|
|
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
2011-04-07 21:04:07 +04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-02-15 12:30:37 +04:00
|
|
|
#include "mirall/csyncthread.h"
|
2011-04-07 21:04:07 +04:00
|
|
|
#include "mirall/folder.h"
|
|
|
|
|
2012-05-21 18:48:49 +04:00
|
|
|
#include <QMutex>
|
|
|
|
#include <QThread>
|
|
|
|
#include <QString>
|
|
|
|
|
2011-04-07 21:04:07 +04:00
|
|
|
namespace Mirall {
|
|
|
|
|
|
|
|
|
|
|
|
class CSyncFolder : public Folder
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2012-02-15 12:30:37 +04:00
|
|
|
CSyncFolder(const QString &alias,
|
|
|
|
const QString &path,
|
|
|
|
const QString &secondPath, QObject *parent = 0L);
|
2011-04-07 21:04:07 +04:00
|
|
|
virtual ~CSyncFolder();
|
|
|
|
virtual void startSync(const QStringList &pathList);
|
|
|
|
virtual bool isBusy() const;
|
2012-04-30 10:56:56 +04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void slotTerminateSync();
|
|
|
|
|
2011-04-07 21:04:07 +04:00
|
|
|
protected slots:
|
|
|
|
void slotCSyncStarted();
|
|
|
|
void slotCSyncFinished();
|
2012-03-22 19:22:08 +04:00
|
|
|
void slotCSyncError( const QString& );
|
2011-04-07 21:04:07 +04:00
|
|
|
private:
|
2012-03-22 19:22:08 +04:00
|
|
|
bool _csyncError;
|
2011-04-08 12:49:28 +04:00
|
|
|
CSyncThread *_csync;
|
2012-08-26 13:47:45 +04:00
|
|
|
QThread *_thread;
|
2012-03-22 19:22:08 +04:00
|
|
|
QStringList _errors;
|
2011-04-07 21:04:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|