Commit 935ad262 authored by Lukas Appelhans's avatar Lukas Appelhans

Docu for deltas

parent fdb19f90
...@@ -80,6 +80,7 @@ bool Delta::checkMD5Sum() ...@@ -80,6 +80,7 @@ bool Delta::checkMD5Sum()
return true; return true;
} }
//FIXME: We should use the md5sum checker of Lisa here! :)
// Check integrity // Check integrity
if (Helpers::md5sumOfFile(d->pathToDelta) != d->md5sum) { if (Helpers::md5sumOfFile(d->pathToDelta) != d->md5sum) {
d->_p_md5checked = false; d->_p_md5checked = false;
......
...@@ -17,28 +17,79 @@ ...@@ -17,28 +17,79 @@
namespace Akabei { namespace Akabei {
class DeltaPrivate; class DeltaPrivate;
/**
* \class Delta Akabei/Delta
*
* \brief This class describes a binary patch we use to upgrade from one package version to another.
*
* Akabei Deltas can either be loaded from the \c Database or from a local file (\c Backend). If both the
* path to the .delta.tar.xz-file and the original package are set, it's just a matter of running the command
* generated by \c xdeltaApplyCommand.
* @see setPathToDelta()
* @see setPathToSource()
* @see xdeltaApplyCommand
*/
class Delta { class Delta {
Q_DISABLE_COPY(Delta) Q_DISABLE_COPY(Delta)
Q_DECLARE_PRIVATE(Delta) Q_DECLARE_PRIVATE(Delta)
public: public:
virtual ~Delta(); virtual ~Delta();
/**
* @returns the correct md5sum of the delta
*/
QByteArray md5sum() const; QByteArray md5sum() const;
/**
* @returns the name of the package the delta needs to be applied on
*/
QString targetName() const; QString targetName() const;
/**
* @returns the version of the package which the delta needs to be applied on
*/
QByteArray versionFrom() const; QByteArray versionFrom() const;
/**
* @returns the version of the package which is generated after the delta got applied to
* a package with \c versionFrom
*/
QByteArray versionTo() const; QByteArray versionTo() const;
/**
* @returns the filename of the .delta.tar.xz-file on disk
*/
QString filename() const; QString filename() const;
/**
* Checks whether the md5sum given in the .DELTAINFO and the real md5sum match
* @returns true when both match
*/
bool checkMD5Sum(); bool checkMD5Sum();
/**
* @returns the command used for generating the package with version \c versionTo
* @param pathToDestination the path to the package with \c versionTo, not existent at this point
*/
QString xdeltaApplyCommand(const QString &pathToDestination) const; QString xdeltaApplyCommand(const QString &pathToDestination) const;
/**
* @returns the path to the .delta.tar.xz-file
*/
QString pathToDelta() const; QString pathToDelta() const;
/**
* Set the path to the .delta.tar.xz-file
* @param path the path of the file
*/
void setPathToDelta(const QString &path); void setPathToDelta(const QString &path);
/**
* @returns the path to the package with version \c versionFrom
*/
QString pathToSource() const; QString pathToSource() const;
/**
* Sets the path to the package with version \c versionFrom
* @param path the path to the package
*/
void setPathToSource(const QString &path); void setPathToSource(const QString &path);
private: private:
......
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