/* t-support.h
This file is part of qgpgme, the Qt API binding for gpgme
- Copyright (c) 2016 Intevation GmbH
+ Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik
+ Software engineering by Intevation GmbH
QGpgME is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
#include "interfaces/passphraseprovider.h"
#include <QObject>
+#include <gpg-error.h>
+
namespace GpgME
{
class TestPassphraseProvider : public PassphraseProvider
char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
{
- return strdup("abc");
+ char *ret;
+ gpgrt_asprintf(&ret, "abc");
+ return ret;
}
};
} // namespace GpgME
void killAgent(const QString &dir = qgetenv("GNUPGHOME"));
+/* Is the passphrase Provider / loopback Supported */
+bool loopbackSupported();
class QGpgMETest : public QObject
{
void cleanupTestCase();
};
+/* Timeout, in milliseconds, for use with QSignalSpy to wait on
+ signals. */
+#define QSIGNALSPY_TIMEOUT 60000
+
#endif // T_SUPPORT_H