Commit Graph

10 Commits

Author SHA1 Message Date
Andre Heinecke
4d384d7bfe cpp: Add support for gpgme_op_tofu_policy
* src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart):
New.
2016-09-16 16:58:39 +02:00
Andre Heinecke
ece8b02a83 Cpp: Add support for spawn engine
* lang/cpp/src/context.cpp (Context::spawn, Context::spawnAsync): New.
* lang/cpp/src/context.h: Add prototypes.
(SpawnFlags): New.
* lang/cpp/src/global.h (SpawnEngine): Added.
2016-08-25 11:41:57 +02:00
Werner Koch
e20b0f0201 cpp: Get rid of AssuanResult due to its deprecation.
* lang/cpp/src/assuanresult.cpp: Remove.
* lang/cpp/src/assuanresult.h: Remove.
* lang/cpp/src/Makefile.am: Remove these files.
* lang/cpp/src/context.cpp: Remove header assuanresult.h
(assuanTransact): Change return type to Error.  Use
gpgme_op_assuan_transact_ext.
(startAssuanTransaction): Change return type to Error.
(assuanResult): Remove
* lang/cpp/src/context.h (assuanResult): Adjust for changes.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-24 14:15:58 +02:00
Andre Heinecke
64194b0f8d Cpp: Fix some pedantic warnings
* lang/cpp/src/context.cpp,
lang/cpp/src/context.h (Context::getKeysFromRecipients): Remove
ignored / invalid const qualifier.
* lang/cpp/src/result.h: Don't shadow error function in ctor.
2016-08-17 07:23:05 +02:00
Andre Heinecke
09667a6006 Cpp: Handle empty recipients consistently
* lang/cpp/src/context.cpp (Context::getKeysFromRecipients):
New helper.
(Context::encrypt, Context::startEncryption, Context::signAndEncrypt)
(Context::startCombinedSigningAndEncryption): Use new helper.
* lang/cpp/src/context.h (Context::getKeysFromRecipients): Add
as private helper.

--
bf776ce was incomplete as the code to handle recpients
was duplicated four times. This is now unified and constently
uses a nullptr instead of an empty array.
2016-08-10 14:12:33 +02:00
Andre Heinecke
21d5e71d48 Cpp: Clarify ownership of provider classes
* lang/cpp/src/context.h: Note that the context does not take
ownership of providers.
2016-08-10 12:07:56 +02:00
Andre Heinecke
1737239379 Cpp: Add support for all EncryptionFlags
* lang/cpp/src/context.h (EncryptionFlags): Extend.
* lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto.
2016-08-09 14:23:51 +02:00
Andre Heinecke
d75c118aae Cpp: Add support for pinentry_mode
* lang/cpp/src/context.cpp (Context::pinentryMode): Return mode.
(Context::setPinentryMode): Set mode.
* lang/cpp/src/context.h (PinentryMode): Add enum.
2016-07-04 11:44:38 +02:00
Andre Heinecke
9b36ebf37a Qt / Cpp: Port auto_ptr to unique_ptr
* lang/cpp/src/context.cpp,
lang/cpp/src/context.h,
lang/cpp/src/context_p.h (Context::createForEngine),
(Context::edit, Context::startEditing),
(Context::takeLastEditInteractor, Context::cardEdit),
(Context::startCardEditing, Context::takeLastCardEditInteractor),
(Context::assuanTransact, Context::startAssuanTransaction),
(Context::takeLastAssuanTransaction): Port to unique_ptr.
* lang/qt/src/qgpgmeadduseridjob.cpp,
lang/qt/src/qgpgmechangeexpiryjob.cpp,
lang/qt/src/qgpgmechangeownertrustjob.cpp,
lang/qt/src/qgpgmechangepasswdjob.cpp,
lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly.

--
This is another API break but as we already broke API with GpgME++
and QGpgME from KDE Frameworks this is a good time to do this
to avoid using a deprected C++ class in the API.
2016-05-17 17:54:53 +02:00
Andre Heinecke
0855a1296a Initial checkin of gpgmepp sources
Based on git.kde.org/pim/gpgmepp rev. 0e3ebc02

* lang/cpp/src/assuanresult.cpp,
 lang/cpp/src/assuanresult.h,
 lang/cpp/src/callbacks.cpp,
 lang/cpp/src/callbacks.h,
 lang/cpp/src/configuration.cpp,
 lang/cpp/src/configuration.h,
 lang/cpp/src/context.cpp,
 lang/cpp/src/context.h,
 lang/cpp/src/context_glib.cpp,
 lang/cpp/src/context_p.h,
 lang/cpp/src/context_qt.cpp,
 lang/cpp/src/context_vanilla.cpp,
 lang/cpp/src/data.cpp,
 lang/cpp/src/data.h,
 lang/cpp/src/data_p.h,
 lang/cpp/src/decryptionresult.cpp,
 lang/cpp/src/decryptionresult.h,
 lang/cpp/src/defaultassuantransaction.cpp,
 lang/cpp/src/defaultassuantransaction.h,
 lang/cpp/src/editinteractor.cpp,
 lang/cpp/src/editinteractor.h,
 lang/cpp/src/encryptionresult.cpp,
 lang/cpp/src/encryptionresult.h,
 lang/cpp/src/engineinfo.cpp,
 lang/cpp/src/engineinfo.h,
 lang/cpp/src/error.h,
 lang/cpp/src/eventloopinteractor.cpp,
 lang/cpp/src/eventloopinteractor.h,
 lang/cpp/src/exception.cpp,
 lang/cpp/src/exception.h,
 lang/cpp/src/global.h,
 lang/cpp/src/gpgadduserideditinteractor.cpp,
 lang/cpp/src/gpgadduserideditinteractor.h,
 lang/cpp/src/gpgagentgetinfoassuantransaction.cpp,
 lang/cpp/src/gpgagentgetinfoassuantransaction.h,
 lang/cpp/src/gpgmefw.h,
 lang/cpp/src/gpgmepp_export.h,
 lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp,
 lang/cpp/src/gpgsetexpirytimeeditinteractor.h,
 lang/cpp/src/gpgsetownertrusteditinteractor.cpp,
 lang/cpp/src/gpgsetownertrusteditinteractor.h,
 lang/cpp/src/gpgsignkeyeditinteractor.cpp,
 lang/cpp/src/gpgsignkeyeditinteractor.h,
 lang/cpp/src/importresult.cpp,
 lang/cpp/src/importresult.h,
 lang/cpp/src/key.cpp,
 lang/cpp/src/key.h,
 lang/cpp/src/keygenerationresult.cpp,
 lang/cpp/src/keygenerationresult.h,
 lang/cpp/src/keylistresult.cpp,
 lang/cpp/src/keylistresult.h,
 lang/cpp/src/notation.h,
 lang/cpp/src/result.h,
 lang/cpp/src/result_p.h,
 lang/cpp/src/scdgetinfoassuantransaction.cpp,
 lang/cpp/src/scdgetinfoassuantransaction.h,
 lang/cpp/src/signingresult.cpp,
 lang/cpp/src/signingresult.h,
 lang/cpp/src/trustitem.cpp,
 lang/cpp/src/trustitem.h,
 lang/cpp/src/util.h,
 lang/cpp/src/verificationresult.cpp,
 lang/cpp/src/verificationresult.h,
 lang/cpp/src/vfsmountresult.cpp,
 lang/cpp/src/vfsmountresult.h,
 lang/cpp/src/interfaces/assuantransaction.h,
 lang/cpp/src/interfaces/dataprovider.h,
 lang/cpp/src/interfaces/passphraseprovider.h,
 lang/cpp/src/interfaces/progressprovider.h: New.
2016-02-22 19:01:37 +01:00