From 0991485170ca4ef90fd566540522027d0fc59a72 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Sun, 3 Apr 2016 02:29:14 -0800 Subject: Qt: Add static factor methods for protocol * lang/qt/src/qgpgmebackend.cpp (QGpgME::openpgp, QGpgME::smime): New. * lang/qt/src/qgpgmebackend.h: Declare. * lang/qt/tests/t-keylist.cpp (KeyListTest::testSingleKeyListSync): Use new functions. -- This replaces the cryptobackendfactory functionality from libkleo. --- lang/qt/src/qgpgmebackend.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lang/qt/src/qgpgmebackend.h') diff --git a/lang/qt/src/qgpgmebackend.h b/lang/qt/src/qgpgmebackend.h index d442fa55..16b70cf8 100644 --- a/lang/qt/src/qgpgmebackend.h +++ b/lang/qt/src/qgpgmebackend.h @@ -72,6 +72,20 @@ namespace QGpgME class CryptoConfig; class Protocol; +/** Obtain a reference to the OpenPGP Protocol. + * + * The reference is to a static object. + * @returns Refrence to the OpenPGP Protocol. + */ +Protocol *openpgp(); + +/** Obtain a reference to the smime Protocol. + * + * The reference is to a static object. + * @returns Refrence to the smime Protocol. + */ +Protocol *smime(); + class QGpgMEBackend { public: -- cgit v1.2.3