diff options
author | Adrien BUSTANY <madcat@mymadcat.com> | 2008-06-09 00:37:26 +0200 |
---|---|---|
committer | Adrien BUSTANY <madcat@mymadcat.com> | 2008-06-09 00:37:26 +0200 |
commit | 03ed645373d01a74164b175a40c66d83a8e21dee (patch) | |
tree | ac78e19200eff4cafd28cec2945ec82682b9676c /lib | |
parent | 82abdac2fc90432767388e642d672a457a926a83 (diff) |
InstallSignature
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SignatureType.h | 24 | ||||
-rw-r--r-- | lib/Transaction.cpp | 5 | ||||
-rw-r--r-- | lib/Transaction.h | 2 | ||||
-rw-r--r-- | lib/coverage-transaction.txt | 2 | ||||
-rw-r--r-- | lib/lib.pro | 2 |
5 files changed, 33 insertions, 2 deletions
diff --git a/lib/SignatureType.h b/lib/SignatureType.h new file mode 100644 index 0000000..d974845 --- /dev/null +++ b/lib/SignatureType.h @@ -0,0 +1,24 @@ +#ifndef SIGNATURETYPE_H +#define SIGNATURETYPE_H + +#include <QtCore> + +#include "Enum.h" + +namespace PackageKit { + +class SignatureType : public QObject { + + Q_OBJECT + Q_ENUMS(Value) + +public: + enum Value { + Gpg, + Unknown + }; +}; + +} // End namespace PackageKit + +#endif diff --git a/lib/Transaction.cpp b/lib/Transaction.cpp index 9299ea6..3c28df6 100644 --- a/lib/Transaction.cpp +++ b/lib/Transaction.cpp @@ -125,6 +125,11 @@ void Transaction::installPackage(Package *p) { proxy->InstallPackages(pids); } +void Transaction::installSignature(const SignatureType::Value &type, const QString &key_id, Package *p) { + renewTid(); + proxy->InstallSignature(EnumToString<SignatureType>(type), key_id, p->id()); +} + void Transaction::updatePackages(const QList<Package*> &packages) { renewTid(); QStringList pids; diff --git a/lib/Transaction.h b/lib/Transaction.h index 4407ba9..be68e73 100644 --- a/lib/Transaction.h +++ b/lib/Transaction.h @@ -9,6 +9,7 @@ #include "Role.h" #include "Status.h" #include "Provides.h" +#include "SignatureType.h" namespace PackageKit { @@ -43,6 +44,7 @@ public: void installPackages(const QList<Package*> &packages); void installPackage(Package *p); + void installSignature(const SignatureType::Value &type, const QString &key_id, Package *p); void updatePackages(const QList<Package*> &packages); void updatePackage(Package *p); void installFiles(const QStringList& files, bool trusted = false); diff --git a/lib/coverage-transaction.txt b/lib/coverage-transaction.txt index c75c1d6..adcde5c 100644 --- a/lib/coverage-transaction.txt +++ b/lib/coverage-transaction.txt @@ -22,7 +22,7 @@ X GetUpdateDetail X GetUpdates X InstallFiles X InstallPackages - InstallSignature +X InstallSignature X IsCallerActive X RefreshCache X RemovePackages diff --git a/lib/lib.pro b/lib/lib.pro index 0e428fd..30f3792 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -11,5 +11,5 @@ INCLUDEPATH += . QT += dbus # Input -HEADERS += CentralProxy.h constants.h Status.h Exit.h Role.h Package.h Restart.h Daemon.h Transaction.h TransactionProxy.h Provides.h +HEADERS += CentralProxy.h constants.h Status.h Exit.h Role.h Package.h Restart.h Daemon.h Transaction.h TransactionProxy.h Provides.h SignatureType.h SOURCES += CentralProxy.cpp Package.cpp Daemon.cpp TransactionProxy.cpp Transaction.cpp |