akabeidelta.h 1.32 KB
Newer Older
Dario Freddi's avatar
Dario Freddi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
/*
   This file is part of the Chakra project

   Copyright (C) 2010 Dario Freddi <drf@chakra-project.org>

   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.
*/

#ifndef AKABEI_AKABEIDELTA_H
#define AKABEI_AKABEIDELTA_H

#include <QtCore/QObject>

namespace Akabei {

class DeltaPrivate;
class Delta {
    Q_DISABLE_COPY(Delta)
    Q_DECLARE_PRIVATE(Delta)
    public:
        virtual ~Delta();

        QByteArray md5sum() const;

        QString targetName() const;
        QString versionFrom() const;
        QString versionTo() const;

        QString filename() const;
        QString filenameFrom() const;

        bool checkMD5Sum();

        QString xdeltaApplyCommand(const QString &pathToDestination) const;

        QString pathToDelta() const;
        void setPathToDelta(const QString &path);

        QString pathToSource() const;
        void setPathToSource(const QString &path);

    private:
        Delta(const QString &targetName, const QString &versionFrom, const QString &versionTo);

        DeltaPrivate * const d_ptr;

        friend class Database;
        friend class DatabasePrivate;
};

}

#endif // AKABEI_AKABEIDELTA_H