kDB: Knowledge DataBase
Loading...
Searching...
No Matches
Delta.h
1#ifndef _KDB_REPOSITORY_VERSIONCONTROL_DELTA_H_
2#define _KDB_REPOSITORY_VERSIONCONTROL_DELTA_H_
3
4#include <QSharedDataPointer>
5
6#include <kDB/Forward.h>
7
8class QUuid;
9
10namespace Cyqlops::Crypto
11{
12 class RSAAlgorithm;
13}
14
15namespace kDB::Repository::VersionControl
16{
17 class Delta
18 {
20 friend class DeltaBuilder;
21 friend class RevisionBuilder;
22 public:
23 Delta();
24 Delta(const Delta& _delta);
25 Delta& operator=(const Delta& _delta);
26 ~Delta();
27 public:
28 QByteArray parent() const;
29 QByteArray child() const;
30 QByteArray hash() const;
31 QByteArray delta() const;
32 bool isValid() const;
33 bool operator==(const Delta& _rhs) const;
34 Delta reverse() const;
38 bool isSigned() const;
46 bool isSignedBy(const QUuid& _author) const;
50 void sign(const QUuid& _author, const Cyqlops::Crypto::RSAAlgorithm& _signature_algortihm);
51 private:
52 struct Private;
53 QSharedDataPointer<Private> d;
54 };
55}
56
57#endif
Definition Revision.h:9
QList< Signature > signatures() const
Definition Delta.cpp:54
bool isSigned() const
Definition Delta.cpp:59
bool isSignedBy(const QUuid &_author) const
Definition Delta.cpp:64
void sign(const QUuid &_author, const Cyqlops::Crypto::RSAAlgorithm &_signature_algortihm)
Definition Delta.cpp:76