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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <QMutex>
|
|
|
|
#include <QThread>
|
2012-02-15 12:30:37 +04:00
|
|
|
#include <QString>
|
2011-04-07 21:04:07 +04:00
|
|
|
|
2012-02-15 12:30:37 +04:00
|
|
|
#include "mirall/csyncthread.h"
|
2011-04-07 21:04:07 +04:00
|
|
|
#include "mirall/folder.h"
|
|
|
|
|
|
|
|
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;
|
|
|
|
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-03-22 19:22:08 +04:00
|
|
|
QStringList _errors;
|
2011-04-07 21:04:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|