Commit 36950f29 authored by Dario Freddi's avatar Dario Freddi
Browse files

Go on with the barebone


Signed-off-by: default avatarDario Freddi <drf@kde.org>
parent 85eb9a4b
......@@ -8,9 +8,31 @@
version 2 of the License, or (at your option) any later version.
*/
#include "akabeioperation.h"
#include "akabeioperation_p.h"
Operation::Operation(QObject *parent) :
QObject(parent)
namespace Akabei {
OperationPrivate::OperationPrivate(const QString &tN)
: targetName(tN)
, uuid(QUuid::createUuid())
{
}
Operation::Operation(const QString &targetName, QObject *parent)
: QObject(parent)
, d_ptr(new OperationPrivate(targetName))
{
}
Operation::~Operation()
{
delete d_ptr;
}
bool Operation::canBeConcurrent() const
{
Q_D(Operation);
return d->canBeConcurrent;
}
}
......@@ -15,6 +15,7 @@
#include <QtCore/QUuid>
namespace Akabei {
class Error;
class Operation : public QObject
{
......@@ -73,10 +74,12 @@ protected:
void setConflictingTargets(const QStringList &targets);
void setError(Error *error);
signals:
void validated(bool result, const QString &details);
void executed(bool result, const QString &details);
void statusChanged(Akabei::Operation::Status current, Akabei::Operation::Status previous);
void progress(int percentage);
void errorOccurred(Akabei::Error *error);
private:
OperationPrivate * const d;
......
......@@ -17,8 +17,19 @@ namespace Akabei {
class OperationPrivate {
public:
OperationPrivate();
OperationPrivate(const QString &tn);
virtual ~OperationPrivate() {};
QString targetName;
QUuid uuid;
bool canBeConcurrent;
QStringList conflictingTargets;
Operation::Phase phase;
int priority;
QStringList fileSystemAdditions;
QStringList fileSystemRemovals;
Operation::Status status;
Error *error;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment