Edit owner trust level.

Inplace editing with a combobox if user is allowed. in app config file.
This commit is contained in:
SET
2020-10-25 17:28:47 +01:00
parent ca2105733b
commit e434315940
16 changed files with 304 additions and 28 deletions

View File

@@ -13,10 +13,12 @@
#include <gpgme++/context.h>
#include <gpgme++/error.h>
#include <gpgme++/key.h>
#include <gpgme++/gpgsetownertrusteditinteractor.h>
#include <vector>
using namespace std;
using namespace GpgME;
/**
* Main class for GPGME OP, except deleting keys.
*/
@@ -50,10 +52,34 @@ public:
* @return the keyid
*/
const string ImportKey(const char * filePath, Error& e);
/**
* Inplace editing of owner trust if allowed
* @param anyFullId
* @param trustLevel : New trust level in key owner
* @return
*/
const Error EditOwnerTrust(const char * anyFullId, GpgME::Key::OwnerTrust trustLevel);
private:
Context * m_ctx;
};
/**
* Edit trust in key owner
*/
class SetOwnerTrustEditInteractor : public GpgSetOwnerTrustEditInteractor
{
public:
/**
*
* @param ownerTrust : New trust level
*/
SetOwnerTrustEditInteractor(GpgME::Key::OwnerTrust ownerTrust)
: GpgSetOwnerTrustEditInteractor(ownerTrust) {}
virtual ~SetOwnerTrustEditInteractor() {}
};
#endif /* GPGMEWORKER_H */