Commit 4ebf7b59 authored by Andre Heinecke's avatar Andre Heinecke

Backport locateKeysJob from GpgME's QGpgME

parent 70406596
......@@ -644,6 +644,11 @@ public:
return 0;
}
Kleo::KeyListJob *locateKeysJob() const Q_DECL_OVERRIDE
{
return 0;
}
};
Kleo::ChiasmusBackend *Kleo::ChiasmusBackend::self = 0;
......
......@@ -372,6 +372,15 @@ public:
return new Kleo::QGpgMEAddUserIDJob(context);
}
Kleo::KeyListJob *locateKeysJob() const Q_DECL_OVERRIDE
{
GpgME::Context *context = GpgME::Context::createForProtocol(mProtocol);
if (!context) {
return Q_NULLPTR;
}
context->setKeyListMode(GpgME::Extern | GpgME::Local | GpgME::Signatures | GpgME::Validate);
return new Kleo::QGpgMEKeyListJob(context);
}
};
}
......
......@@ -132,6 +132,19 @@ public:
virtual SignKeyJob *signKeyJob() const;
virtual AddUserIDJob *addUserIDJob() const;
virtual SpecialJob *specialJob(const char *type, const QMap<QString, QVariant> &args) const = 0;
/** A key locate job.
*
* This tries to find a key in local
* and remote sources, if the key was remote it is imported
* by GnuPG. Same as KeyListJob but intended to be used
* to locate keys automatically. This ends up calling --locate-keys.
*
* Only available for OpenPGP
*
* Results are validated. As if keyListJob was called
* with both includeSigs and validate options.
*/
virtual KeyListJob *locateKeysJob() const = 0;
};
}
......
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